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 2185644 - snapshot fails on cache with cachevol
Summary: snapshot fails on cache with cachevol
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: lvm2
Version: 9.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: David Teigland
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-04-10 17:53 UTC by David Teigland
Modified: 2023-11-07 11:28 UTC (History)
8 users (show)

Fixed In Version: lvm2-2.03.21-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-07 08:53:33 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CLUSTERQE-6648 0 None None None 2023-04-19 22:20:25 UTC
Red Hat Issue Tracker RHELPLAN-154306 0 None None None 2023-04-10 17:54:50 UTC
Red Hat Product Errata RHBA-2023:6633 0 None None None 2023-11-07 08:53:59 UTC

Description David Teigland 2023-04-10 17:53:38 UTC
Description of problem:

Try to create a snapshot of a cache LV using a cachevol:

$ lvs abc/main abc/fast
  LV   VG  Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  fast abc -wi-------  32.00m                                                    
  main abc -wi-a----- 128.00m                                                    

$ lvconvert --type cache --cachevol fast abc/main
Erase all existing data on abc/fast? [y/n]: y
  Logical volume abc/main is now cached.

$ lvcreate -s -n snap -L32M abc/main
  Check of pool abc/fast_cvol failed (status:1). Manual repair required!
  Failed to suspend logical volume abc/main.
  Aborting. Manual intervention required.

The failure is caused by lvconvert attempting to run cache_check which fails because the LV is active.  The cache_check is supposed to be skipped in this case.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 David Teigland 2023-04-10 17:58:02 UTC
With fix:

$ lvconvert --type cache --cachevol fast abc/main
Erase all existing data on abc/fast? [y/n]: y
  Logical volume abc/main is now cached.

$ lvcreate -s -n snap -L32M abc/main
  Logical volume "snap" created.

$ lvs abc/main
  LV   VG  Attr       LSize   Pool        Origin       Data%  Meta%  Move Log Cpy%Sync Convert
  main abc owi-a-C--- 128.00m [fast_cvol] [main_corig] 0.00   0.88            0.00            

$ lvs abc/snap
  LV   VG  Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  snap abc swi-a-s--- 32.00m      main   0.00

Comment 5 Corey Marthaler 2023-05-16 15:28:01 UTC
Marking Verified:Tested with the latest rhel9.3 build.

kernel-5.14.0-306.el9    BUILT: Sat Apr 29 05:45:15 PM CEST 2023
lvm2-2.03.21-1.el9    BUILT: Fri Apr 21 02:33:33 PM CEST 2023
lvm2-libs-2.03.21-1.el9    BUILT: Fri Apr 21 02:33:33 PM CEST 2023



[root@grant-01 ~]# lvcreate --yes --wipesignatures y  -L 4G -n corigin cache_sanity @slow
  Wiping xfs signature on /dev/cache_sanity/corigin.
  Logical volume "corigin" created.
[root@grant-01 ~]# lvcreate --yes  -L 2G -n pool cache_sanity @fast
  Logical volume "pool" created.
[root@grant-01 ~]# lvs -a -o +devices
  LV      VG           Attr       LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices     
  corigin cache_sanity -wi-a----- 4.00g                                                     /dev/sdb1(0)
  pool    cache_sanity -wi-a----- 2.00g                                                     /dev/sdc1(0)
[root@grant-01 ~]# lvconvert --yes --type cache --cachevol pool cache_sanity/corigin
  Logical volume cache_sanity/corigin is now cached.
[root@grant-01 ~]# lvs -a -o +devices
  LV              VG           Attr       LSize Pool        Origin          Data%  Meta%  Move Log Cpy%Sync Convert Devices         
  corigin         cache_sanity Cwi-a-C--- 4.00g [pool_cvol] [corigin_corig] 0.02   3.76            0.00             corigin_corig(0)
  [corigin_corig] cache_sanity owi-aoC--- 4.00g                                                                     /dev/sdb1(0)    
  [pool_cvol]     cache_sanity Cwi-aoC--- 2.00g                                                                     /dev/sdc1(0)    
[root@grant-01 ~]# lvcreate -s -n snap -L32M cache_sanity/corigin
  Logical volume "snap" created.
[root@grant-01 ~]# lvs -a -o +devices
  LV              VG           Attr       LSize  Pool        Origin          Data%  Meta%  Move Log Cpy%Sync Convert Devices         
  corigin         cache_sanity owi-a-C---  4.00g [pool_cvol] [corigin_corig] 0.01   8.79            0.00             corigin_corig(0)
  [corigin_corig] cache_sanity owi-aoC---  4.00g                                                                     /dev/sdb1(0)    
  [pool_cvol]     cache_sanity Cwi-aoC---  2.00g                                                                     /dev/sdc1(0)    
  snap            cache_sanity swi-a-s--- 32.00m             corigin         0.00                                    /dev/sdb1(1024)

Comment 9 Corey Marthaler 2023-05-25 21:08:18 UTC
Marking VERIFIED in the latest build as well.

kernel-5.14.0-306.el9    BUILT: Sat Apr 29 05:45:15 PM CEST 2023
lvm2-2.03.21-2.el9    BUILT: Thu May 25 12:03:04 AM CEST 2023
lvm2-libs-2.03.21-2.el9    BUILT: Thu May 25 12:03:04 AM CEST 2023




SCENARIO - [simple_cache_snap_merge_using_cachevol_pool]
Create snaps of cache origin which uses cachevol for pool volume (bug 2185644)

*** Cache info for this scenario ***
*  origin (slow):  /dev/sdh1
*  pool (fast):    /dev/nvme0n1p1
************************************

Adding "slow" and "fast" tags to corresponding pvs
pvchange --addtag slow /dev/sdh1
pvchange --addtag fast /dev/nvme0n1p1
Create origin (slow) volume
lvcreate --yes --wipesignatures y  -L 4G -n corigin cache_sanity @slow

lvcreate --yes  -L 2G -n pool cache_sanity @fast
lvconvert --yes --type cache --cachevol pool cache_sanity/corigin
Placing an xfs filesystem on origin volume
Mounting origin volume

Writing files to /mnt/corigin

Checking files on /mnt/corigin


Making a snapshot of the origin volume (with cvol pool bug 2185644), mounting, and verifying original data
lvcreate --yes  -s /dev/cache_sanity/corigin -c 64 -n merge -L 500M
+++ Mounting and verifying snapshot merge data +++
Checking files on /mnt/merge

Writing new origin data and then merging back the snapshot volume
Writing files to /mnt/corigin
Checking files on /mnt/corigin

Umount origin volume
Deactivating volume: corigin
Merge snapshot cache_sanity/merge back into the origin
lvconvert --yes --merge cache_sanity/merge
Activating volume: corigin

Waiting for the snap merge to complete...
Mount and verify the proper data now exists on the origin
Checking files on /mnt/corigin


Uncaching cache origin (lvconvert --yes --uncache cache_sanity/corigin) from cache cvol pool
Removing cache origin volume cache_sanity/corigin
lvremove -f /dev/cache_sanity/corigin

Comment 12 errata-xmlrpc 2023-11-07 08:53:33 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-2023:6633


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