Bug 1512075
| Summary: | thin volumes can now be used as origin volumes in snap conversion operations | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Corey Marthaler <cmarthal> | ||||
| Component: | lvm2 | Assignee: | LVM and device-mapper development team <lvm-team> | ||||
| lvm2 sub component: | Thin Provisioning | QA Contact: | cluster-qe <cluster-qe> | ||||
| Status: | CLOSED ERRATA | Docs Contact: | |||||
| Severity: | low | ||||||
| Priority: | unspecified | CC: | agk, cmarthal, heinzm, jbrassow, mcsontos, msnitzer, prajnoha, prockai, rbednar, rhandlin, thornber, zkabelac | ||||
| Version: | 7.5 | ||||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | lvm2-2.02.176-5.el7 | Doc Type: | If docs needed, set a value | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2018-04-10 15:22:16 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: | |||||||
| Attachments: |
|
||||||
|
Description
Corey Marthaler
2017-11-10 19:03:12 UTC
Yep - it's been just missed piece in cmdline API. lvm2 supports 'old thick snapshot' of thin LV. with lvconvert user can 'split' such snapshot - and you should be also to recombine this back i.e.: # Create thick snapshot of thin LV lvcreate -s -L10 vg/thinLV -n thickSNAP # Split origin and COW lvconvert --splitsnapshot vg/thickSNAP # Recombine back (optionally without zeroing COW with -Zn) lvconvert -s vg/thinLV thickSNAP Is there any more info needed ? Yeah, we're going to need to disallow (or fix) this in exclusively activated thins on cluster/shared VGs. lvconvert -s snapper_thinp/origin snapper_thinp/snap_to_convert --yes WARNING: Converting logical volume snapper_thinp/snap_to_convert to snapshot exception store. THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.) Internal error: LV snapper_thinp/snap_to_convert shouldn't have lock_args Created attachment 1356878 [details]
lvconvert -vvvv of thin on shared VG
Actually, this work in clvmd mode. Needs to be fixed in lockd mode (see comment #3). # CLVM [root@host-034 ~]# vgs VG #PV #LV #SN Attr VSize VFree snapper_thinp 5 8 0 wz--nc 124.98g <123.88g [root@host-034 ~]# lvconvert -s snapper_thinp/origin snapper_thinp/snap_to_convert --yes WARNING: Converting logical volume snapper_thinp/snap_to_convert to snapshot exception store. THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.) Logical volume snapper_thinp/snap_to_convert converted to snapshot. disallowed combining split snapshots in shared VG: https://sourceware.org/git/?p=lvm2.git;a=commit;h=175d06a92940dda5de3a7631e3d27cd6828a16be Marking verified with latest rpms. Added snap fs checks to this scenario. SCENARIO - [convert_vol_to_thin_snap] Convert the linear to snapshot of the origin volume Making pool volume lvcreate --thinpool POOL -L 1G --zero n --poolmetadatasize 4M snapper_thinp Sanity checking pool device (POOL) metadata thin_check /dev/mapper/snapper_thinp-meta_swap.481 examining superblock examining devices tree examining mapping tree checking space map counts Making origin volume lvcreate --virtualsize 1G -T snapper_thinp/POOL -n origin lvcreate -V 1G -T snapper_thinp/POOL -n other1 WARNING: Sum of all thin volume sizes (2.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (1.00 GiB). lvcreate --virtualsize 1G -T snapper_thinp/POOL -n other2 WARNING: Sum of all thin volume sizes (3.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (1.00 GiB). lvcreate -V 1G -T snapper_thinp/POOL -n other3 WARNING: Sum of all thin volume sizes (4.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (1.00 GiB). lvcreate --virtualsize 1G -T snapper_thinp/POOL -n other4 WARNING: Sum of all thin volume sizes (5.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (1.00 GiB). lvcreate --virtualsize 1G -T snapper_thinp/POOL -n other5 WARNING: Sum of all thin volume sizes (6.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (1.00 GiB). Making a linear volume lvcreate -n snap_to_convert -L 1G snapper_thinp WARNING: Sum of all thin volume sizes (6.00 GiB) exceeds the size of thin pools (1.00 GiB). Converting the linear to be an "oldstyle" snapshot of the origin volume (This should now work post rhel7.5 ?) lvconvert -s snapper_thinp/origin snapper_thinp/snap_to_convert --yes WARNING: Converting logical volume snapper_thinp/snap_to_convert to snapshot exception store. THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.) Placing an xfs filesystem on snapshot volume Mounting origin volume Writing files to /mnt/snap_to_convert Checking files on /mnt/snap_to_convert Removing snap volume snapper_thinp/snap_to_convert lvremove -f /dev/snapper_thinp/snap_to_convert Removing thin origin and other virtual thin volumes Removing pool snapper_thinp/POOL ========================================= NOTE: This feature is still not yet implemented for lvmlockd using sanlock: #lvconvert -s snapper_thinp/origin snapper_thinp/snap_to_convert --yes Unable to combine split snapshots in VG with lock_type sanlock 3.10.0-811.el7.x86_64 lvm2-2.02.176-5.el7 BUILT: Wed Dec 6 11:13:07 CET 2017 lvm2-libs-2.02.176-5.el7 BUILT: Wed Dec 6 11:13:07 CET 2017 lvm2-cluster-2.02.176-5.el7 BUILT: Wed Dec 6 11:13:07 CET 2017 lvm2-python-boom-0.8.1-5.el7 BUILT: Wed Dec 6 11:15:40 CET 2017 cmirror-2.02.176-5.el7 BUILT: Wed Dec 6 11:13:07 CET 2017 device-mapper-1.02.145-5.el7 BUILT: Wed Dec 6 11:13:07 CET 2017 device-mapper-libs-1.02.145-5.el7 BUILT: Wed Dec 6 11:13:07 CET 2017 device-mapper-event-1.02.145-5.el7 BUILT: Wed Dec 6 11:13:07 CET 2017 device-mapper-event-libs-1.02.145-5.el7 BUILT: Wed Dec 6 11:13:07 CET 2017 device-mapper-persistent-data-0.7.3-3.el7 BUILT: Tue Nov 14 12:07:18 CET 2017 vdo-6.1.0.72-12 BUILT: Sat Dec 2 01:01:22 CET 2017 kmod-kvdo-6.1.0.55-9.el7 BUILT: Fri Nov 17 22:48:23 CET 2017 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, 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/RHEA-2018:0853 |