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 1854230 - "--test" writecache conversion attempt no longer passes when origin volume is inactive
Summary: "--test" writecache conversion attempt no longer passes when origin volume is...
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
unspecified
low
Target Milestone: rc
: 8.0
Assignee: LVM and device-mapper development team
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-06 19:54 UTC by Corey Marthaler
Modified: 2021-09-07 11:51 UTC (History)
9 users (show)

Fixed In Version: lvm2-2.03.09-4.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 02:00:38 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:4546 0 None None None 2020-11-04 02:00:51 UTC

Description Corey Marthaler 2020-07-06 19:54:54 UTC
Description of problem:
[root@hayes-02 ~]# lvcreate --wipesignatures y  -L 4G -n cworigin writecache_sanity /dev/sdi1
  Logical volume "cworigin" created.
[root@hayes-02 ~]# lvcreate  -L 2G -n test_writecache writecache_sanity /dev/sdd1
  Logical volume "test_writecache" created.

[root@hayes-02 ~]# lvchange -an writecache_sanity
[root@hayes-02 ~]# lvs -a -o +devices
  LV              VG                Attr       LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices
  cworigin        writecache_sanity -wi------- 4.00g                                                     /dev/sdi1(0)
  test_writecache writecache_sanity -wi------- 2.00g                                                     /dev/sdd1(0)

# This should have passed
[root@hayes-02 ~]# lvconvert --test --yes --type writecache --cachevol writecache_sanity/test_writecache writecache_sanity/cworigin
  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
  Device for LV not found to check block size /dev//writecache_sanity/cworigin
[root@hayes-02 ~]# echo $?
5

# The actual cmd (w/o the --test) works fine
[root@hayes-02 ~]# lvconvert --yes --type writecache --cachevol writecache_sanity/test_writecache 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.
[root@hayes-02 ~]# echo $?
0


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-07 18:24:13 UTC
pushed to master
https://sourceware.org/git/?p=lvm2.git;a=commit;h=40266faaab07f5578d137f9e400fbc9190edabcd

skips fs block size check if it requires activating LV which cannot be done in test mode.

[root@null-04 lvm.git]# lvs test
  LV   VG   Attr       LSize
  fast test -wi------- 200.00m
  main test -wi-------   1.00g

[root@null-04 lvm.git]# lvconvert --test --type writecache --cachevol fast test/main
  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
Erase all existing data on test/fast? [y/n]: y
  Test mode skips checking fs block size.
  Using writecache block size 512 for unknown file system block size, logical block size 512, physical block size 512.
  Logical volume test/main now has writecache.

[root@null-04 lvm.git]# lvs test
  LV   VG   Attr       LSize   
  fast test -wi------- 200.00m
  main test -wi-------   1.00g

[root@null-04 lvm.git]# lvconvert  --type writecache --cachevol fast test/main
Erase all existing data on test/fast? [y/n]: y
  Logical volume test/main now has writecache.

[root@null-04 lvm.git]# lvs test
  LV   VG   Attr       LSize Pool        Origin        
  main test Cwi---C--- 1.00g [fast_cvol] [main_wcorig]

Comment 5 Corey Marthaler 2020-08-17 16:47:21 UTC
Fix verified in the latest rpms.

kernel-4.18.0-232.el8    BUILT: Mon Aug 10 02:17:54 CDT 2020
lvm2-2.03.09-5.el8    BUILT: Wed Aug 12 15:51:50 CDT 2020
lvm2-libs-2.03.09-5.el8    BUILT: Wed Aug 12 15:51:50 CDT 2020
lvm2-lockd-2.03.09-5.el8    BUILT: Wed Aug 12 15:51:50 CDT 2020
device-mapper-1.02.171-5.el8    BUILT: Wed Aug 12 15:51:50 CDT 2020
device-mapper-libs-1.02.171-5.el8    BUILT: Wed Aug 12 15:51:50 CDT 2020
device-mapper-event-1.02.171-5.el8    BUILT: Wed Aug 12 15:51:50 CDT 2020
device-mapper-event-libs-1.02.171-5.el8    BUILT: Wed Aug 12 15:51:50 CDT 2020


[root@hayes-01 ~]# lvcreate --wipesignatures y  -L 4G -n cworigin writecache_sanity /dev/sdi1
  Logical volume "cworigin" created.
[root@hayes-01 ~]# lvcreate  -L 2G -n test_writecache writecache_sanity /dev/sdd1
  Logical volume "test_writecache" created.
[root@hayes-01 ~]# lvchange -an writecache_sanity
[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------- 4.00g                                                     /dev/sdi1(0)
  test_writecache writecache_sanity -wi------- 2.00g                                                     /dev/sdd1(0)
[root@hayes-01 ~]# lvconvert --test --yes --type writecache --cachevol writecache_sanity/test_writecache writecache_sanity/cworigin
  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
  Test mode skips checking fs block size.
  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.
[root@hayes-01 ~]# echo $?
0

Comment 8 errata-xmlrpc 2020-11-04 02:00:38 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-2020:4546


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