Bug 1269679
| Summary: | lvconvert --cachepolicy currently does nothing when attempting to change policy | ||
|---|---|---|---|
| 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 <cluster-qe> |
| Status: | CLOSED CURRENTRELEASE | Docs Contact: | |
| Severity: | low | ||
| Priority: | unspecified | CC: | agk, heinzm, jbrassow, msnitzer, prajnoha, teigland, zkabelac |
| Version: | 7.2 | ||
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-10-07 17:21: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
Corey Marthaler
2015-10-07 23:09:26 UTC
Proposing this for 7.3. lvconvert should actually do the cachemode and cachepolicy changes that are requested. [root@host-123 ~]# lvs -a -o +devices,cachemode,cachepolicy LV Attr LSize Devices Cachemode Cache Policy corigin Cwi-a-C--- 4.00g corigin_corig(0) writethrough mq [corigin_corig] owi-aoC--- 4.00g /dev/sde1(0) [cpool] Cwi---C--- 500.00m cpool_cdata(0) writethrough mq [root@host-123 ~]# dmsetup table cache_sanity-corigin: 0 8388608 cache 253:3 253:2 253:4 128 1 writethrough mq 0 # LVCHANGE (works) [root@host-123 ~]# lvchange --cachepolicy cleaner cache_sanity/corigin Logical volume "corigin" changed. [root@host-123 ~]# lvs -a -o +devices,cachemode,cachepolicy LV Attr LSize Devices Cachemode Cache Policy corigin Cwi-a-C--- 4.00g corigin_corig(0) writethrough cleaner [corigin_corig] owi-aoC--- 4.00g /dev/sde1(0) [cpool] Cwi---C--- 500.00m cpool_cdata(0) writethrough cleaner [root@host-123 ~]# lvchange --cachepolicy smq cache_sanity/corigin Logical volume "corigin" changed. [root@host-123 ~]# lvs -a -o +devices,cachemode,cachepolicy LV Attr LSize Devices Cachemode Cache Policy corigin Cwi-a-C--- 4.00g corigin_corig(0) writethrough smq [corigin_corig] owi-aoC--- 4.00g /dev/sde1(0) [cpool] Cwi---C--- 500.00m cpool_cdata(0) writethrough smq [root@host-123 ~]# lvchange --cachepolicy mq cache_sanity/corigin Logical volume "corigin" changed. [root@host-123 ~]# lvs -a -o +devices,cachemode,cachepolicy LV Attr LSize Devices Cachemode Cache Policy corigin Cwi-a-C--- 4.00g corigin_corig(0) writethrough mq [corigin_corig] owi-aoC--- 4.00g /dev/sde1(0) [cpool] Cwi---C--- 500.00m cpool_cdata(0) writethrough mq # LVCONVERT (does nothing) [root@host-123 ~]# lvconvert --cachepolicy smq cache_sanity/corigin [root@host-123 ~]# lvs -a -o +devices,cachemode,cachepolicy LV Attr LSize Devices Cachemode Cache Policy corigin Cwi-a-C--- 4.00g corigin_corig(0) writethrough mq [corigin_corig] owi-aoC--- 4.00g /dev/sde1(0) [cpool] Cwi---C--- 500.00m cpool_cdata(0) writethrough mq [root@host-123 ~]# lvconvert --cachepolicy cleaner cache_sanity/corigin [root@host-123 ~]# lvs -a -o +devices,cachemode,cachepolicy LV Attr LSize Devices Cachemode Cache Policy corigin Cwi-a-C--- 4.00g corigin_corig(0) writethrough mq [corigin_corig] owi-aoC--- 4.00g /dev/sde1(0) [cpool] Cwi---C--- 500.00m cpool_cdata(0) writethrough mq [root@host-123 ~]# lvconvert --cachemode writeback cache_sanity/corigin [root@host-123 ~]# lvs -a -o +devices,cachemode,cachepolicy LV Attr LSize Devices Cachemode Cache Policy corigin Cwi-a-C--- 4.00g corigin_corig(0) writethrough mq [corigin_corig] owi-aoC--- 4.00g /dev/sde1(0) [cpool] Cwi---C--- 500.00m cpool_cdata(0) writethrough mq 3.10.0-327.el7.x86_64 lvm2-2.02.130-5.el7 BUILT: Wed Oct 14 08:27:29 CDT 2015 lvm2-libs-2.02.130-5.el7 BUILT: Wed Oct 14 08:27:29 CDT 2015 lvm2-cluster-2.02.130-5.el7 BUILT: Wed Oct 14 08:27:29 CDT 2015 device-mapper-1.02.107-5.el7 BUILT: Wed Oct 14 08:27:29 CDT 2015 device-mapper-libs-1.02.107-5.el7 BUILT: Wed Oct 14 08:27:29 CDT 2015 device-mapper-event-1.02.107-5.el7 BUILT: Wed Oct 14 08:27:29 CDT 2015 device-mapper-event-libs-1.02.107-5.el7 BUILT: Wed Oct 14 08:27:29 CDT 2015 device-mapper-persistent-data-0.5.5-1.el7 BUILT: Thu Aug 13 09:58:10 CDT 2015 cmirror-2.02.130-5.el7 BUILT: Wed Oct 14 08:27:29 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.130-5.el7 BUILT: Wed Oct 14 08:27:29 CDT 2015 This should work using lvchange, not lvconvert. lvconvert will use a specified cachepolicy when creating a new cache LV, but won't change the cachepolicy on an existing cache LV. Does it still exit silently? It appears these are all taken care of now in the latest rpms... Closing bug. lvm2-2.02.166-1.el7 BUILT: Wed Sep 28 02:26:52 CDT 2016 lvm2-libs-2.02.166-1.el7 BUILT: Wed Sep 28 02:26:52 CDT 2016 lvm2-cluster-2.02.166-1.el7 BUILT: Wed Sep 28 02:26:52 CDT 2016 device-mapper-1.02.135-1.el7 BUILT: Wed Sep 28 02:26:52 CDT 2016 [root@host-126 ~]# lvs -a -o +devices,cache_policy LV VG Attr LSize Pool Origin Data% Meta% Cpy%Sync Devices CachePolicy display_cache cache_sanity Cwi-a-C--- 4.00g [pool] [display_cache_corig] 0.00 4.39 0.00 display_cache_corig(0) mq [display_cache_corig] cache_sanity owi-aoC--- 4.00g /dev/sdf1(0) [lvol0_pmspare] cache_sanity ewi------- 12.00m /dev/sda1(0) [pool] cache_sanity Cwi---C--- 4.00g 0.00 4.39 0.00 pool_cdata(0) mq [pool_cdata] cache_sanity Cwi-ao---- 4.00g /dev/sde1(0) [pool_cmeta] cache_sanity ewi-ao---- 12.00m /dev/sde1(1024) [root@host-126 ~]# lvconvert --cachepolicy smp cache_sanity/display_cache Operation not permitted on cache LV cache_sanity/display_cache. Operations permitted on a cache LV are: --splitcache --uncache --splitmirrors (operates on mirror or raid sub LV) --type thin-pool [root@host-126 ~]# lvconvert --cachepolicy smp cache_sanity/pool Operation not permitted on cache pool LV cache_sanity/pool. Operations permitted on a cache pool LV are: --splitcache (operates on cache LV) [root@host-126 ~]# lvconvert --cachepolicy smp cache_sanity/pool_cdata Operation not permitted on striped or linear LV cache_sanity/pool_cdata. Operations permitted on a striped or linear LV are: --merge --type snapshot --type thin --type cache --type thin-pool --type cache-pool --type mirror --type raid* [root@host-126 ~]# lvconvert --cachepolicy smp cache_sanity/display_cache_corig Names including "_corig" are reserved. Please choose a different LV name. Run `lvconvert --help' for more information. |