Bug 1158702
| Summary: | Internal errors when attempting to use thin virt volume as cache origin volume | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Corey Marthaler <cmarthal> | ||||
| Component: | lvm2 | Assignee: | Zdenek Kabelac <zkabelac> | ||||
| lvm2 sub component: | Cache Logical Volumes | QA Contact: | Cluster QE <mspqa-list> | ||||
| Status: | CLOSED ERRATA | Docs Contact: | |||||
| Severity: | medium | ||||||
| Priority: | unspecified | CC: | agk, heinzm, jbrassow, msnitzer, prajnoha, zkabelac | ||||
| Version: | 7.1 | ||||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | lvm2-2.02.113-1.el7 | Doc Type: | Bug Fix | ||||
| Doc Text: |
Improved validation of cache lvconvert command now properly disallows usage of internal pool's data and metadata volumes.
|
Story Points: | --- | ||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2015-03-05 13:10:24 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
2014-10-29 22:00:56 UTC
Created attachment 951916 [details]
-vvvv of the lvconvert
We should disallow any cache sub-LVs from being anything other than linear, stripe, RAID. In this case, the origin is a thinLV. So same thing for attempting to cache a thin pool origin volume? [root@host-113 ~]# lvs -a -o +devices LV Attr LSize Pool Origin Data% Meta% Cpy%Sync Devices data_linear Cwi---C--- 500.00m data_linear_cdata(0) [data_linear_cdata] Cwi------- 500.00m /dev/sdb1(0) [data_linear_cmeta] ewi------- 500.00m /dev/sdd1(0) [lvol0_pmspare] ewi------- 500.00m /dev/sda1(300) origin_thin twi-a-tz-- 500.00m 0.00 0.04 origin_thin_tdata(0) [origin_thin_tdata] Twi-ao---- 500.00m /dev/sda1(150) [origin_thin_tmeta] ewi-ao---- 100.00m /dev/sda1(275) [root@host-113 ~]# lvconvert --yes --type cache --cachepool cache_sanity/data_linear cache_sanity/origin_thin Logical volume cache_sanity/origin_thin_tdata is now cached. [root@host-113 ~]# lvs -a -o +devices LV Attr LSize Pool Origin Data% Meta% Cpy%Sync Devices [data_linear] Cwi---C--- 500.00m 0.00 0.02 100.00 data_linear_cdata(0) [data_linear_cdata] Cwi-ao---- 500.00m /dev/sdb1(0) [data_linear_cmeta] ewi-ao---- 500.00m /dev/sdd1(0) [lvol0_pmspare] ewi------- 500.00m /dev/sda1(300) origin_thin twi-a-tz-- 500.00m 0.00 0.04 origin_thin_tdata(0) [origin_thin_tdata] Cwi-aoC--- 500.00m [data_linear] [origin_thin_tdata_corig] 0.00 0.02 100.00 origin_thin_tdata_corig(0) [origin_thin_tdata_corig] owi-aoC--- 500.00m /dev/sda1(150) [origin_thin_tmeta] ewi-ao---- 100.00m /dev/sda1(275) We target to support thin-pool data volume to be cached. (So far it's the only exception where cached volume is not a top-level LV). So it's correct the thin_tdata get cache - this is expected however it's not yet adviced to be used. We do not yet support 'resize' of such volume - it needs to be uncached before resize (See Bug: #1153362) All other variants should fail with >=2.02.112. i.e.: # lvs -a LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert data_linear vg Cwi---C--- 10,00m [data_linear_cdata] vg Cwi------- 10,00m [data_linear_cmeta] vg ewi------- 4,03m [lvol0_pmspare] vg ewi------- 4,03m origin_thin vg twi-a-tz-- 20,00m 0,00 1,76 [origin_thin_tdata] vg Twi-ao---- 20,00m [origin_thin_tmeta] vg ewi-ao---- 2,00m # lvconvert -y --type cache --cachepool vg/data_linear_cmeta vg/origin_thin Names including "_cmeta" are reserved. Please choose a different LV name. Run `lvconvert --help' for more information. # lvconvert -y --type cache --cachepool vg/origin_thin_tdata vg/origin_thin Names including "_tdata" are reserved. Please choose a different LV name. Run `lvconvert --help' for more information. # lvconvert -y --type cache --cachepool vg/data_linear vg/origin_thin_tmeta Can't convert internal LV vg/origin_thin_tmeta. # lvconvert -y --type cache --cachepool vg/data_linear vg/data_linear_cdata Names including "_cdata" are reserved. Please choose a different LV name. Run `lvconvert --help' for more information. # lvconvert -y --type cache --cachepool vg/data_linear vg/data_linear_cmeta Names including "_cmeta" are reserved. Please choose a different LV name. Run `lvconvert --help' for more information. Marking verified in the latest rpms.
3.10.0-206.el7.x86_64
lvm2-2.02.114-2.el7 BUILT: Mon Dec 1 10:57:14 CST 2014
lvm2-libs-2.02.114-2.el7 BUILT: Mon Dec 1 10:57:14 CST 2014
lvm2-cluster-2.02.114-2.el7 BUILT: Mon Dec 1 10:57:14 CST 2014
device-mapper-1.02.92-2.el7 BUILT: Mon Dec 1 10:57:14 CST 2014
device-mapper-libs-1.02.92-2.el7 BUILT: Mon Dec 1 10:57:14 CST 2014
device-mapper-event-1.02.92-2.el7 BUILT: Mon Dec 1 10:57:14 CST 2014
device-mapper-event-libs-1.02.92-2.el7 BUILT: Mon Dec 1 10:57:14 CST 2014
device-mapper-persistent-data-0.4.1-2.el7 BUILT: Wed Nov 12 12:39:46 CST 2014
cmirror-2.02.114-2.el7 BUILT: Mon Dec 1 10:57:14 CST 2014
SCENARIO - [thin_virts_to_cache_conversion]
Create thin virtual volumes and attempt to build different cache volumes with them
lvcreate --thinpool to_cache -L 500M --poolmetadatasize 100M cache_sanity
lvcreate -L 100M -n originl cache_sanity
lvcreate --virtualsize 100M -T cache_sanity/to_cache -n originv
lvcreate -L 100M -n pooll cache_sanity
lvcreate --virtualsize 100M -T cache_sanity/to_cache -n poolv
lvcreate -L 100M -n metal cache_sanity
lvcreate --virtualsize 100M -T cache_sanity/to_cache -n metav
Check 1: Attempt to create cache pool volume by combining poolv (data) and metav (meta) volume
lvconvert --yes --type cache-pool --poolmetadata cache_sanity/metav cache_sanity/poolv
Pool data LV cache_sanity/poolv is of an unsupported type.
Check 2: Attempt to create cache pool volume by combining poolv (data) and metal (meta) volume
lvconvert --yes --type cache-pool --poolmetadata cache_sanity/metal cache_sanity/poolv
Pool data LV cache_sanity/poolv is of an unsupported type.
Check 3: Attempt to create cache pool volume by combining pooll (data) and metav (meta) volume
lvconvert --yes --type cache-pool --poolmetadata cache_sanity/metav cache_sanity/pooll
Pool metadata LV cache_sanity/metav is of an unsupported type.
Check 4: Attempt to create cache pool volume by combining pooll (data) and metal (meta) volume
lvconvert --yes --type cache-pool --poolmetadata cache_sanity/metal cache_sanity/pooll
WARNING: Converting logical volume cache_sanity/pooll and cache_sanity/metal to pool's data and metadata volumes.
THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
Attempt to create cached volume by combining the cache pool and thin virt origin volumes
lvconvert --yes --type cache --cachepool cache_sanity/pooll cache_sanity/originv
Cache is not supported with thin segment type of the original logical volume cache_sanity/originv.
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-0513.html |