Hide Forgot
Description of problem: [root@host-118 ~]# lvcreate -L 4G -n cacheA cache_sanity /dev/sda1 Logical volume "cacheA" created. [root@host-118 ~]# lvcreate -L 4G -n poolA cache_sanity /dev/sdf1 Logical volume "poolA" created. [root@host-118 ~]# lvcreate -L 12M -n pool_metaA cache_sanity /dev/sdf1 Logical volume "pool_metaA" created. [root@host-118 ~]# lvconvert --yes --type cache-pool --cachepolicy mq --cachemode writethrough -c 32 --poolmetadata cache_sanity/pool_metaA cache_sanity/poolA WARNING: Converting logical volume cache_sanity/poolA and cache_sanity/pool_metaA to pool's data and metadata volumes. THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.) Converted cache_sanity/poolA to cache pool. [root@host-118 ~]# lvconvert --yes --type cache --cachepool cache_sanity/poolA cache_sanity/cacheA Logical volume cache_sanity/cacheA is now cached. [root@host-118 ~]# lvcreate -L 4G -n cacheB cache_sanity /dev/sda1 Logical volume "cacheB" created. [root@host-118 ~]# lvcreate -L 2G -n poolB cache_sanity /dev/sde1 Logical volume "poolB" created. [root@host-118 ~]# lvcreate -L 8M -n pool_metaB cache_sanity /dev/sde1 Logical volume "pool_metaB" created. [root@host-118 ~]# lvconvert --yes --type cache-pool --cachepolicy cleaner --cachemode writeback --poolmetadata cache_sanity/pool_metaB cache_sanity/poolB WARNING: Converting logical volume cache_sanity/poolB and cache_sanity/pool_metaB to pool's data and metadata volumes. THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.) Converted cache_sanity/poolB to cache pool. [root@host-118 ~]# lvconvert --yes --type cache --cachepool cache_sanity/poolB cache_sanity/cacheB Logical volume cache_sanity/cacheB is now cached. [root@host-118 ~]# lvs -a -o +devices LV VG Attr LSize Pool Data% Meta% Cpy%Sync Devices cacheA cache_sanity Cwi-a-C--- 4.00g [poolA]0.00 8.66 100.00 cacheA_corig(0) [cacheA_corig] cache_sanity owi-aoC--- 4.00g /dev/sda1(0) cacheB cache_sanity Cwi-a-C--- 4.00g [poolB]0.00 3.47 100.00 cacheB_corig(0) [cacheB_corig] cache_sanity owi-aoC--- 4.00g /dev/sda1(1027) [lvol0_pmspare] cache_sanity ewi------- 12.00m /dev/sda1(1024) [poolA] cache_sanity Cwi---C--- 4.00g 0.00 8.66 100.00 poolA_cdata(0) [poolA_cdata] cache_sanity Cwi-ao---- 4.00g /dev/sdf1(0) [poolA_cmeta] cache_sanity ewi-ao---- 12.00m /dev/sdf1(1024) [poolB] cache_sanity Cwi---C--- 2.00g 0.00 3.47 100.00 poolB_cdata(0) [poolB_cdata] cache_sanity Cwi-ao---- 2.00g /dev/sde1(0) [poolB_cmeta] cache_sanity ewi-ao---- 8.00m /dev/sde1(512) [root@host-118 ~]# lvs -o name,cache_policy,kernel_cache_settings LV Cache Policy KCache Settings cacheA mq migration_threshold=2048,random_threshold=4,sequential_threshold=512,discard_promote_adjustment=1,read_promote_adjustment=4,write_promote_adjustment=8 cacheB cleaner migration_threshold=2048 [root@host-118 ~]# lvs -o name,cache_policy,cache_settings LV Cache Policy Cache Settings cacheA mq cacheB cleaner [root@host-118 ~]# lvchange --cachesettings discard_promote_adjustment=0 cache_sanity/cacheA cache_sanity/cacheB Logical volume "cacheA" changed. device-mapper: reload ioctl on (253:6) failed: Invalid argument Failed to lock logical volume cache_sanity/cacheB. [root@host-118 ~]# lvchange --cachesettings sequential_threshold=1024 cache_sanity/cacheA Logical volume "cacheA" changed. [root@host-118 ~]# lvchange --cachesettings sequential_threshold=1024 cache_sanity/cacheB device-mapper: reload ioctl on (253:6) failed: Invalid argument Failed to lock logical volume cache_sanity/cacheB. Version-Release number of selected component (if applicable): 2.6.32-616.el6.x86_64 lvm2-2.02.143-1.el6 BUILT: Wed Feb 24 07:59:50 CST 2016 lvm2-libs-2.02.143-1.el6 BUILT: Wed Feb 24 07:59:50 CST 2016 lvm2-cluster-2.02.143-1.el6 BUILT: Wed Feb 24 07:59:50 CST 2016 udev-147-2.71.el6 BUILT: Wed Feb 10 07:07:17 CST 2016 device-mapper-1.02.117-1.el6 BUILT: Wed Feb 24 07:59:50 CST 2016 device-mapper-libs-1.02.117-1.el6 BUILT: Wed Feb 24 07:59:50 CST 2016 device-mapper-event-1.02.117-1.el6 BUILT: Wed Feb 24 07:59:50 CST 2016 device-mapper-event-libs-1.02.117-1.el6 BUILT: Wed Feb 24 07:59:50 CST 2016 device-mapper-persistent-data-0.6.2-0.1.rc5.el6 BUILT: Wed Feb 24 07:07:09 CST 2016 cmirror-2.02.143-1.el6 BUILT: Wed Feb 24 07:59:50 CST 2016
Hmm --cachesettings takes arbitrary list of parameters. There is no validation from lvm2 side - the reason behind is we support 'non-upstream' cache policies so we cannot know what params such modules would have take. On the other hand we my possibly introduce some more checks for existing already upstreamed policies. So not yet sure what we will do with this BZ.
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available. The official life cycle policy can be reviewed here: http://redhat.com/rhel/lifecycle This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL: https://access.redhat.com/