Bug 1240518
| Summary: | Display ancestors and descendants for thin snapshot/origin LVs | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Peter Rajnoha <prajnoha> |
| Component: | lvm2 | Assignee: | Peter Rajnoha <prajnoha> |
| lvm2 sub component: | Thin Provisioning | QA Contact: | cluster-qe <cluster-qe> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | low | ||
| Priority: | medium | CC: | agk, cmarthal, heinzm, jbrassow, msnitzer, prajnoha, prockai, thornber, zkabelac |
| Version: | 7.2 | Keywords: | Triaged |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | lvm2-2.02.125-1.el7 | Doc Type: | Bug Fix |
| Doc Text: |
Before, there was only "origin" reporting field to display an immediate ancestor of thin snapshot LV. However, unlike thick snapshots, thin snapshots do not have a limit on the number of items chained (the only limit is the amount of resources in available in the system). This way, we can have thin snapshot of thin snapshot of another thin snapshot etc.
LVM2 now supports displaying full thin snapshot chain using new lv_ancestors and lv_descendants reporting fields which display the list of all ancestors and descendant of current thin LV.
|
Story Points: | --- |
| Clone Of: | 1163895 | Environment: | |
| Last Closed: | 2015-11-19 12:46:47 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: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1163895 | ||
|
Description
Peter Rajnoha
2015-07-07 07:33:54 UTC
Note: the new lv_ancestors and lv_descendants fields are string lists so all the selection operators supported for string lists are available for these two fields (looking for the subset or strict set - see "lvs -S help") Marking verified in the latest rpms. 3.10.0-306.el7.x86_64 lvm2-2.02.128-1.el7 BUILT: Tue Aug 18 03:45:17 CDT 2015 lvm2-libs-2.02.128-1.el7 BUILT: Tue Aug 18 03:45:17 CDT 2015 lvm2-cluster-2.02.128-1.el7 BUILT: Tue Aug 18 03:45:17 CDT 2015 device-mapper-1.02.105-1.el7 BUILT: Tue Aug 18 03:45:17 CDT 2015 device-mapper-libs-1.02.105-1.el7 BUILT: Tue Aug 18 03:45:17 CDT 2015 device-mapper-event-1.02.105-1.el7 BUILT: Tue Aug 18 03:45:17 CDT 2015 device-mapper-event-libs-1.02.105-1.el7 BUILT: Tue Aug 18 03:45:17 CDT 2015 device-mapper-persistent-data-0.5.5-1.el7 BUILT: Thu Aug 13 09:58:10 CDT 2015 cmirror-2.02.128-1.el7 BUILT: Tue Aug 18 03:45:17 CDT 2015 sanlock-3.2.4-1.el7 BUILT: Fri Jun 19 12:48:49 CDT 2015 sanlock-lib-3.2.4-1.el7 BUILT: Fri Jun 19 12:48:49 CDT 2015 lvm2-lockd-2.02.128-1.el7 BUILT: Tue Aug 18 03:45:17 CDT 2015 SCENARIO - [snap_of_thin_snaps] Create a snapshot and then attempt multiple levels of snaps of snaps [...] Making snapshot of origin volume lvcreate -k n -s /dev/snapper_thinp/origin -n stack1 # Ancestors lvcreate -k n -s /dev/snapper_thinp/stack1 -n stack2 expected:origin stack1 actual:stack1 origin lvcreate -k n -s /dev/snapper_thinp/stack2 -n stack3 expected:origin stack2 stack1 actual:stack2 stack1 origin lvcreate -k n -s /dev/snapper_thinp/stack3 -n stack4 expected:origin stack3 stack2 stack1 actual:stack3 stack2 stack1 origin # Descendants lvs --noheadings -o lv_descendants snapper_thinp/stack2 Descendants:stack3 stack4 lvs --noheadings -o lv_descendants snapper_thinp/stack3 Descendants:stack4 lvs --noheadings -o lv_descendants snapper_thinp/stack4 Descendants: Now break the chain in various spots, so only the last two should have ancestors or descendants lvremove --yes --select 'lv_name=stack1 || origin=stack1' [root@host-111 ~]# lvs -a -o +devices,lv_ancestors,lv_descendants LV Attr LSize Pool Origin Data% Meta% Devices Ancestors Descendants POOL twi-aotz-- 1.00g 16.56 4.30 POOL_tdata(0) [POOL_tdata] Twi-ao---- 1.00g /dev/sda1(1) [POOL_tmeta] ewi-ao---- 4.00m /dev/sdd1(0) [lvol0_pmspare] ewi------- 4.00m /dev/sda1(0) origin Vwi-a-tz-- 1.00g POOL 16.14 other1 Vwi-a-tz-- 1.00g POOL 0.00 other2 Vwi-a-tz-- 1.00g POOL 0.00 other3 Vwi-a-tz-- 1.00g POOL 0.00 other4 Vwi-a-tz-- 1.00g POOL 0.00 other5 Vwi-a-tz-- 1.00g POOL 0.00 stack3 Vwi-aotz-- 1.00g POOL 16.14 stack4 stack4 Vwi-aotz-- 1.00g POOL stack3 16.14 stack3 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://rhn.redhat.com/errata/RHBA-2015-2147.html |