Bug 2185644
| Summary: | snapshot fails on cache with cachevol | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | David Teigland <teigland> |
| Component: | lvm2 | Assignee: | David Teigland <teigland> |
| lvm2 sub component: | Cache Logical Volumes | QA Contact: | cluster-qe <cluster-qe> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | high | ||
| Priority: | high | CC: | agk, cmarthal, heinzm, jbrassow, mcsontos, msnitzer, prajnoha, zkabelac |
| Version: | 9.2 | Keywords: | Triaged |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | lvm2-2.03.21-1.el9 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-11-07 08:53:33 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
David Teigland
2023-04-10 17:53:38 UTC
fixed in main https://sourceware.org/git/?p=lvm2.git;a=commit;h=317071ec53c2f6e338c53a8964fdbb61dc3e8b57 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 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) 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 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 |