Bug 1344120
| Summary: | LVM cache: 'lvconvert --cachepolicy' fails to change cache policy (or even give an error) | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Jonathan Earl Brassow <jbrassow> |
| Component: | lvm2 | Assignee: | David Teigland <teigland> |
| lvm2 sub component: | Cache Logical Volumes | QA Contact: | cluster-qe <cluster-qe> |
| Status: | CLOSED CURRENTRELEASE | Docs Contact: | |
| Severity: | unspecified | ||
| Priority: | unspecified | CC: | agk, cmarthal, heinzm, jbrassow, msnitzer, prajnoha, zkabelac |
| Version: | 7.3 | ||
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-07-31 16:04:49 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: | 1469559 | ||
|
Description
Jonathan Earl Brassow
2016-06-08 19:49:34 UTC
This is related to bugs 1269679 and 1284999. Why would you want to use 'lvconvert' when you want to 'change' settings ? Supported command line here would be 'lvchange --cachepolicy' We also do not validate 'policy name' - user is free to use whatever he could have localy - so ATM we fail on 'device-mapper: reload ioctl on (253:1) failed: Invalid argument' We could however at least check 'modprobe dm_cache_puke' - but I'm unsure if there are some strict naming rules with cache policy. 'lvconvert' accepts --cachepolicy argument when you are converting some LV to be a cache-pool or cached volume. Saying this - 'lvconvert' could be made smarter and probably deduce the 'change' operation and reroute to lvchange routine - we already made some hack in 'lvcreate' for this since the cache API might confuse users with operation types. (In reply to Zdenek Kabelac from comment #2) > Why would you want to use 'lvconvert' when you want to 'change' settings ? Your NEEDINFO must be to answer this question... It's not what I "want", it is what I expected - perhaps in error. I'll let you decide whether it is better to 1) mention to users that it is the wrong command, 2) improve documentation, or 3) make lvconvert call lvchange. My thought was that since it changed on-disk LVM metadata that it would be 'lvconvert'. I think that assumption may be in error. Changing cache policy would normally fit within the definition of 'lvchange' not 'lvconvert' as you're not converting the layout of the LV. While we could detect this in lvconvert and translate it into the correct lvchange equivalent, let's finish cleaning up all the existing lvconvert functionality before adding even more! lvchange works, and using lvconvert now reports and error. # lvconvert --cachepolicy mq bb/lv1 Command does not accept option: --cachepolicy mq. # lvs -o+cachepolicy bb/lv1 LV VG Attr LSize Pool Origin Data% Meta% Cpy%Sync CachePolicy lv1 bb Cwi-a-C--- 1.00g [cache1] [lv1_corig] 0.01 2.83 0.00 mq # lvchange --cachepolicy smq bb/lv1 Logical volume bb/lv1 changed. # lvs -o+cachepolicy bb/lv1 LV VG Attr LSize Pool Origin Data% Meta% Cpy%Sync CachePolicy lv1 bb Cwi-a-C--- 1.00g [cache1] [lv1_corig] 0.01 2.83 0.00 smq |