RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1853471 - origin is now allowed to be online and active during conversion to writecache
Summary: origin is now allowed to be online and active during conversion to writecache
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: lvm2
Version: 8.3
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: rc
: 8.0
Assignee: David Teigland
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-02 18:41 UTC by Corey Marthaler
Modified: 2021-09-07 11:50 UTC (History)
9 users (show)

Fixed In Version: lvm2-2.03.11-0.2.20201103git8801a86.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:01:53 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Corey Marthaler 2020-07-02 18:41:17 UTC
Description of problem:
QA knew going fwd into 8.3 that active writecache restrictions would be lifted eventually, so this is not a huge surprise, however since i didn't see a BZ for this in the current build of the errata, I'm filing this to ensure that we can lift all inactive origin checks (a reversal of the checks required for 8.2 bug 1805532)?

[root@hayes-02 ~]# lvcreate --wipesignatures y  -L 4G -n cworigin writecache_sanity @slow
  Logical volume "cworigin" created.

[root@hayes-02 ~]# mkfs.xfs /dev/writecache_sanity/cworigin 
[root@hayes-02 ~]# mount /dev/writecache_sanity/cworigin /mnt
[root@hayes-02 ~]# df -h
Filesystem                              Size  Used Avail Use% Mounted on
/dev/mapper/writecache_sanity-cworigin  4.0G   61M  4.0G   2% /mnt

[root@hayes-02 ~]# lvcreate  -L 1G -n dummy_pool writecache_sanity @fast
  Logical volume "dummy_pool" created.

# WC POOL volume is still required to be inactive
[root@hayes-02 ~]# lvconvert --yes --type writecache  --cachevol writecache_sanity/dummy_pool writecache_sanity/cworigin
  LV writecache_sanity/dummy_pool must be inactive to attach.

# WC ORIGIN volume is now allowed to be active and open
[root@hayes-02 ~]# lvchange -an writecache_sanity/dummy_pool
[root@hayes-02 ~]#  lvconvert --yes --type writecache  --cachevol writecache_sanity/dummy_pool writecache_sanity/cworigin
  Using writecache block size 512 for unknown file system block size, logical block size 512, physical block size 512.
  Logical volume writecache_sanity/cworigin now has writecache.




Version-Release number of selected component (if applicable):
kernel-4.18.0-211.el8    BUILT: Thu Jun  4 03:33:39 CDT 2020
lvm2-2.03.09-3.el8    BUILT: Mon Jun 29 13:50:23 CDT 2020
lvm2-libs-2.03.09-3.el8    BUILT: Mon Jun 29 13:50:23 CDT 2020
lvm2-dbusd-2.03.09-3.el8    BUILT: Mon Jun 29 13:53:38 CDT 2020
lvm2-lockd-2.03.09-3.el8    BUILT: Mon Jun 29 13:50:23 CDT 2020
boom-boot-1.2-1.el8    BUILT: Sun Jun  7 07:20:03 CDT 2020
device-mapper-1.02.171-3.el8    BUILT: Mon Jun 29 13:50:23 CDT 2020
device-mapper-libs-1.02.171-3.el8    BUILT: Mon Jun 29 13:50:23 CDT 2020
device-mapper-event-1.02.171-3.el8    BUILT: Mon Jun 29 13:50:23 CDT 2020
device-mapper-event-libs-1.02.171-3.el8    BUILT: Mon Jun 29 13:50:23 CDT 2020

Comment 1 David Teigland 2020-07-02 19:01:33 UTC
bug 1630978 "LV sector size changes when attaching dm-writecache" is used to enable attaching a writecache to an active LV.  A mismatching sector size with the file system is the reason we had to originally disable the attachment while active.  We now have the ability to detect the correct fs block size which allows us to attach the writecache to an active LV.

Comment 2 Jonathan Earl Brassow 2020-07-15 06:00:59 UTC
Please check with corey to be sure he is ready for testing this.  May also want to remember to check release notes with Marek to ensure they do not contain stale information about writecache limitations.

Comment 5 Corey Marthaler 2020-11-12 23:22:18 UTC
Fix verified in the latest .d rpms.

kernel-4.18.0-246.el8.dt2    BUILT: Mon Nov  9 07:22:41 CST 2020
lvm2-2.03.11-0.2.20201103git8801a86.el8    BUILT: Wed Nov  4 07:04:46 CST 2020
lvm2-libs-2.03.11-0.2.20201103git8801a86.el8    BUILT: Wed Nov  4 07:04:46 CST 2020

device-mapper-1.02.175-0.2.20201103git8801a86.el8    BUILT: Wed Nov  4 07:04:46 CST 2020
device-mapper-libs-1.02.175-0.2.20201103git8801a86.el8    BUILT: Wed Nov  4 07:04:46 CST 2020
device-mapper-event-1.02.175-0.2.20201103git8801a86.el8    BUILT: Wed Nov  4 07:04:46 CST 2020
device-mapper-event-libs-1.02.175-0.2.20201103git8801a86.el8    BUILT: Wed Nov  4 07:04:46 CST 2020

[root@hayes-01 ~]# df -h
Filesystem                              Size  Used Avail Use% Mounted on
/dev/mapper/writecache_sanity-cworigin  4.0G  421M  3.6G  11% /mnt/cworigin

[root@hayes-01 ~]# lvs -a -o +devices
  LV         VG                Attr       LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices     
  cworigin   writecache_sanity -wi-ao---- 4.00g                                                     /dev/sdj1(0)
  dummy_pool writecache_sanity -wi------- 1.00g                                                     /dev/sdd1(0)

[root@hayes-01 ~]# lvconvert --test --yes --type writecache --cachevol writecache_sanity/dummy_pool writecache_sanity/cworigin
  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
  Logical volume writecache_sanity/cworigin now has writecache.

[root@hayes-01 ~]# lvconvert --yes --type writecache --cachevol writecache_sanity/dummy_pool writecache_sanity/cworigin
  Logical volume writecache_sanity/cworigin now has writecache.

[root@hayes-01 ~]# lvs -a -o +devices,segtype
  LV                VG                Attr       LSize Pool              Origin            Data%  Convert Devices    Type      
  cworigin          writecache_sanity Cwi-aoC--- 4.00g [dummy_pool_cvol] [cworigin_wcorig] 0.00   cworigin_wcorig(0) writecache
  [cworigin_wcorig] writecache_sanity owi-aoC--- 4.00g                                            /dev/sdj1(0)       linear    
  [dummy_pool_cvol] writecache_sanity Cwi-aoC--- 1.00g                                            /dev/sdd1(0)       linear

Comment 10 Corey Marthaler 2021-01-08 22:25:28 UTC
Fix verified in the latest rpms.

kernel-4.18.0-271.el8    BUILT: Fri Jan  8 03:32:43 CST 2021
lvm2-2.03.11-0.4.20201222gitb84a992.el8    BUILT: Tue Dec 22 06:33:49 CST 2020
lvm2-libs-2.03.11-0.4.20201222gitb84a992.el8    BUILT: Tue Dec 22 06:33:49 CST 2020


[root@hayes-03 ~]# df -h
Filesystem                              Size  Used Avail Use% Mounted on
/dev/mapper/writecache_sanity-cworigin  4.0G  418M  3.6G  11% /mnt/cworigin

# Active pool attempt (should fail) with ONLINE origin
[root@hayes-03 ~]# lvs -a -o +devices
  LV         VG                Attr       LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices    
  cworigin   writecache_sanity -wi-ao---- 4.00g                                                     /dev/sdp(0)
  dummy_pool writecache_sanity -wi-a----- 1.00g                                                     /dev/sdl(0)
[root@hayes-03 ~]# lvconvert --test --yes --type writecache --cachevol writecache_sanity/dummy_pool writecache_sanity/cworigin
  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
  LV writecache_sanity/dummy_pool must be inactive to attach.


# Inactive pool attempt (should pass) with ONLINE origin
[root@hayes-03 ~]# lvchange -an writecache_sanity/dummy_pool
[root@hayes-03 ~]# lvs -a -o +devices
  LV         VG                Attr       LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices    
  cworigin   writecache_sanity -wi-ao---- 4.00g                                                     /dev/sdp(0)
  dummy_pool writecache_sanity -wi------- 1.00g                                                     /dev/sdl(0)
[root@hayes-03 ~]# lvconvert --test --yes --type writecache --cachevol writecache_sanity/dummy_pool writecache_sanity/cworigin
  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
  Logical volume writecache_sanity/cworigin now has writecache.
[root@hayes-03 ~]# lvconvert --yes --type writecache --cachevol writecache_sanity/dummy_pool writecache_sanity/cworigin
  Logical volume writecache_sanity/cworigin now has writecache.
[root@hayes-03 ~]# lvs -a -o +devices,segtype
  LV                VG                Attr       LSize Pool              Origin            Data%  Meta%  Move Log Cpy%Sync Convert Devices            Type      
  cworigin          writecache_sanity Cwi-aoC--- 4.00g [dummy_pool_cvol] [cworigin_wcorig] 0.00                                    cworigin_wcorig(0) writecache
  [cworigin_wcorig] writecache_sanity owi-aoC--- 4.00g                                                                             /dev/sdp(0)        linear    
  [dummy_pool_cvol] writecache_sanity Cwi-aoC--- 1.00g                                                                             /dev/sdl(0)        linear

Comment 12 errata-xmlrpc 2021-05-18 15:01:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (lvm2 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:1659


Note You need to log in before you can comment on or make changes to this bug.