RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1255171 - cache_policy no longer displays anything in lvs
Summary: cache_policy no longer displays anything in lvs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.2
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: Zdenek Kabelac
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-19 20:29 UTC by Corey Marthaler
Modified: 2023-03-08 07:27 UTC (History)
6 users (show)

Fixed In Version: lvm2-2.02.129-2.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 12:47:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2147 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2015-11-19 11:11:07 UTC

Description Corey Marthaler 2015-08-19 20:29:38 UTC
Description of problem:
lvm2-2.02.127-1.el7    BUILT: Mon Aug 10 03:22:35 CDT 2015
lvm2-libs-2.02.127-1.el7    BUILT: Mon Aug 10 03:22:35 CDT 2015

[root@host-115 ~]#  lvs -a -o +devices,cache_policy
  LV                    VG            Attr       LSize   Pool   Origin                Data%  Meta%  Move Log Cpy%Sync Convert Devices                Cache Policy
  display_cache         cache_sanity  Cwi-a-C---   4.00g [pool] [display_cache_corig] 0.00   8.66            100.00           display_cache_corig(0) mq          
  [display_cache_corig] cache_sanity  owi-aoC---   4.00g                                                                      /dev/sdd1(0)                       
  [lvol0_pmspare]       cache_sanity  ewi-------  12.00m                                                                      /dev/sdc1(0)                       
  [pool]                cache_sanity  Cwi---C---   4.00g                              0.00   8.66            100.00           pool_cdata(0)                      
  [pool_cdata]          cache_sanity  Cwi-ao----   4.00g                                                                      /dev/sdb1(0)                       
  [pool_cmeta]          cache_sanity  ewi-ao----  12.00m                                                                      /dev/sdb1(1024)                    
[root@host-115 ~]# lvchange --yes --cachepolicy smq cache_sanity/display_cache
  Logical volume "display_cache" changed.
[root@host-115 ~]#  lvs -a -o +devices,cache_policy
  LV                    Attr       LSize   Pool   Origin                Data% Meta%  Cpy%Sync Devices                Cache Policy
  display_cache         Cwi-a-C---   4.00g [pool] [display_cache_corig] 0.00  12.92  100.00   display_cache_corig(0) smq         
  [display_cache_corig] owi-aoC---   4.00g                                                    /dev/sdd1(0)                       
  [lvol0_pmspare]       ewi-------  12.00m                                                    /dev/sdc1(0)                       
  [pool]                Cwi---C---   4.00g                              0.00  12.92  100.00   pool_cdata(0)                      
  [pool_cdata]          Cwi-ao----   4.00g                                                    /dev/sdb1(0)                       
  [pool_cmeta]          ewi-ao----  12.00m                                                    /dev/sdb1(1024)                    

[root@host-115 ~]#  lvs --noheadings -o lv_name --select 'cache_policy=smq'
  display_cache

[root@host-115 ~]#  dmsetup status cache_sanity-display_cache
0 8388608 cache 8 397/3072 64 0/131072 0 128 0 0 0 0 0 1 writeback 2 migration_threshold 2048 smq 0 rw - 





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

[root@host-109 ~]#  lvs -a -o +devices,cache_policy
  LV                    Attr       LSize   Pool   Origin                Data% Meta%  Cpy%Sync Devices                Cache Policy
  display_cache         Cwi-a-C---   4.00g [pool] [display_cache_corig] 0.00  4.39   100.00   display_cache_corig(0)             
  [display_cache_corig] owi-aoC---   4.00g                                                    /dev/sdc1(0)                       
  [lvol0_pmspare]       ewi-------  12.00m                                                    /dev/sdc1(1024)                    
  [pool]                Cwi---C---   4.00g                              0.00  4.39   100.00   pool_cdata(0)                      
  [pool_cdata]          Cwi-ao----   4.00g                                                    /dev/sde1(0)                       
  [pool_cmeta]          ewi-ao----  12.00m                                                    /dev/sde1(1024)                    
[root@host-109 ~]# lvchange --yes --cachepolicy smq cache_sanity/display_cache
  Logical volume "display_cache" changed.
[root@host-109 ~]#  lvs -a -o +devices,cache_policy
  LV                    Attr       LSize   Pool   Origin                Data% Meta%  Cpy%Sync Devices                Cache Policy
  display_cache         Cwi-a-C---   4.00g [pool] [display_cache_corig] 0.00  6.58   100.00   display_cache_corig(0)             
  [display_cache_corig] owi-aoC---   4.00g                                                    /dev/sdc1(0)                       
  [lvol0_pmspare]       ewi-------  12.00m                                                    /dev/sdc1(1024)                    
  [pool]                Cwi---C---   4.00g                              0.00  6.58   100.00   pool_cdata(0)                      
  [pool_cdata]          Cwi-ao----   4.00g                                                    /dev/sde1(0)                       
  [pool_cmeta]          ewi-ao----  12.00m                                                    /dev/sde1(1024)                    

[root@host-109 ~]# lvs --noheadings -o lv_name --select 'cache_policy=smq'
  display_cache

[root@host-109 ~]# dmsetup status cache_sanity-display_cache
0 8388608 cache 8 202/3072 128 0/65536 0 122 0 0 0 0 0 1 writethrough 2 migration_threshold 2048 smq 0 rw - 



Version-Release number of selected component (if applicable):
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

Comment 1 Corey Marthaler 2015-08-19 20:37:46 UTC
Little easier to see the problem here and fwiw 'cache_policy' and 'cachepolicy' provide the same result in each example.

lvm2-2.02.127-1.el7.x86_64

[root@host-115 ~]#  lvs -o devices,cachepolicy
  Devices                Cache Policy
  display_cache_corig(0) smq         



lvm2-2.02.128-1.el7.x86_64

[root@host-109 ~]#  lvs -o devices,cachepolicy
  Devices                Cache Policy
  display_cache_corig(0)

Comment 2 Corey Marthaler 2015-08-19 21:25:01 UTC
This is most likely fallout from bug 1255184.

Comment 3 Zdenek Kabelac 2015-08-20 09:20:06 UTC
The only major bug  ATM is that lvchange let you change the cache policy.

This operation is not yet working properly.


For now to get 'smq' cached LV - you need to directly create it with such policy.
Change from  mq->smq  or  smq->mq  is not possible without clearing cache first
and reinitializing metadata.

Under normal circumstance cache policy should by only shown with cached device
(and I'll likely add some for cache pool)

Comment 4 Corey Marthaler 2015-08-20 17:10:02 UTC
After following your instructions in comment #3 by not using 'lvchange', the same problem persists even with a properly cached device (pool + origin).




# lvm2-2.02.128-1.el7.x86_64

[root@host-109 ~]# lvs -a -o +devices
  LV            Attr       LSize Pool Origin Data%  Meta%  Cpy%Sync Devices       
  display_cache -wi-a----- 4.00g                                    /dev/sda1(0)  

[root@host-109 ~]# lvcreate --yes --cachepolicy smq -L 4G -n pool cache_sanity --type cache-pool --cachemode writethrough  -c 64 /dev/sdc1
  Logical volume "pool" created.

# Nothing displayed
[root@host-109 ~]# lvs -a -o +devices,cache_policy,cache_mode
  LV              Attr       LSize Pool Origin Data%  Meta%  Cpy%Sync Devices        Cache Policy Cachemode   
  display_cache   -wi-a----- 4.00g                                    /dev/sda1(0)                            
  [lvol0_pmspare] ewi------- 8.00m                                    /dev/sdc1(0)                            
  pool            Cwi---C--- 4.00g                                    pool_cdata(0)               writethrough
  [pool_cdata]    Cwi------- 4.00g                                    /dev/sdc1(4)                            
  [pool_cmeta]    ewi------- 8.00m                                    /dev/sdc1(2)                            

[root@host-109 ~]#  lvconvert --yes --type cache --cachepool cache_sanity/pool cache_sanity/display_cache
  Logical volume cache_sanity/display_cache is now cached.

# Still nothing displayed
[root@host-109 ~]# lvs -a -o +devices,cache_policy,cache_mode
  LV                    Attr       LSize Pool   Origin                Data%  Meta%  Cpy%Sync Devices                Cache Policy Cachemode   
  display_cache         Cwi-a-C--- 4.00g [pool] [display_cache_corig] 0.00   6.59   100.00   display_cache_corig(0)              writethrough
  [display_cache_corig] owi-aoC--- 4.00g                                                     /dev/sda1(0)                                    
  [lvol0_pmspare]       ewi------- 8.00m                                                     /dev/sdc1(0)                                    
  [pool]                Cwi---C--- 4.00g                              0.00   6.59   100.00   pool_cdata(0)                       writethrough
  [pool_cdata]          Cwi-ao---- 4.00g                                                     /dev/sdc1(4)                                    
  [pool_cmeta]          ewi-ao---- 8.00m                                                     /dev/sdc1(2)                                    

[root@host-109 ~]# dmsetup status
cache_sanity-display_cache: 0 8388608 cache 8 135/2048 128 0/65536 0 61 0 0 0 0 0 1 writethrough 2 migration_threshold 2048 smq 0 rw - 
cache_sanity-display_cache_corig: 0 8388608 linear 
cache_sanity-pool_cdata: 0 8388608 linear 
cache_sanity-pool_cmeta: 0 16384 linear 






# lvm2-2.02.127-1.el7

# same operations as above before this convert...

[root@host-115 ~]# lvconvert --yes --type cache --cachepool cache_sanity/pool cache_sanity/display_cache
  Logical volume cache_sanity/display_cache is now cached.

# here the proper policy is displayed.
[root@host-115 ~]# lvs -a -o +devices,cache_policy,cache_mode
  LV                    Attr       LSize Pool   Origin                Data%  Meta%  Cpy%Sync Devices                Cache Policy Cachemode   
  display_cache         Cwi-a-C--- 4.00g [pool] [display_cache_corig] 0.00   6.59   100.00   display_cache_corig(0) smq          writethrough
  [display_cache_corig] owi-aoC--- 4.00g                                                     /dev/sde1(0)                                    
  [lvol0_pmspare]       ewi------- 8.00m                                                     /dev/sdc1(0)                                    
  [pool]                Cwi---C--- 4.00g                              0.00   6.59   100.00   pool_cdata(0)                       writethrough
  [pool_cdata]          Cwi-ao---- 4.00g                                                     /dev/sdc1(4)                                    
  [pool_cmeta]          ewi-ao---- 8.00m                                                     /dev/sdc1(2)                                    

[root@host-115 ~]# dmsetup status
cache_sanity-display_cache: 0 8388608 cache 8 135/2048 128 0/65536 0 61 0 0 0 0 0 1 writethrough 2 migration_threshold 2048 smq 0 rw - 
cache_sanity-display_cache_corig: 0 8388608 linear 
cache_sanity-pool_cdata: 0 8388608 linear 
cache_sanity-pool_cmeta: 0 16384 linear

Comment 7 Zdenek Kabelac 2015-08-26 11:48:01 UTC
Reporting is handled now by:

https://www.redhat.com/archives/lvm-devel/2015-August/msg00184.html

lvchange is not yet fixed - thus keeping bug still open.

Comment 8 Jonathan Earl Brassow 2015-09-02 15:38:31 UTC
display seems fixed:

[root@bp-01 ~]# lvcreate -n cachepool -L 5G --type cache vg/lv
  Logical volume vg/lv is now cached.
[root@bp-01 ~]# lvs -o name,cache_policy vg
  LV   Cache Policy
  lv   mq

Comment 10 Corey Marthaler 2015-09-08 14:46:53 UTC
Marking verified in the latest rpms.

3.10.0-313.el7.x86_64
lvm2-2.02.129-2.el7    BUILT: Wed Sep  2 02:51:56 CDT 2015
lvm2-libs-2.02.129-2.el7    BUILT: Wed Sep  2 02:51:56 CDT 2015
lvm2-cluster-2.02.129-2.el7    BUILT: Wed Sep  2 02:51:56 CDT 2015
device-mapper-1.02.106-2.el7    BUILT: Wed Sep  2 02:51:56 CDT 2015
device-mapper-libs-1.02.106-2.el7    BUILT: Wed Sep  2 02:51:56 CDT 2015
device-mapper-event-1.02.106-2.el7    BUILT: Wed Sep  2 02:51:56 CDT 2015
device-mapper-event-libs-1.02.106-2.el7    BUILT: Wed Sep  2 02:51:56 CDT 2015
device-mapper-persistent-data-0.5.5-1.el7    BUILT: Thu Aug 13 09:58:10 CDT 2015
cmirror-2.02.129-2.el7    BUILT: Wed Sep  2 02:51:56 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.129-2.el7    BUILT: Wed Sep  2 02:51:56 CDT 2015



[root@host-109 ~]# lvs -a -o +devices,cachemode,cache_policy
  LV                    Attr       LSize   Pool   Origin                Data%  Meta%  Cpy%Sync Devices                                      Cachemode Cache Policy
  display_cache         Cwi-a-C---   4.01g [pool] [display_cache_corig] 0.00   12.99  0.00     display_cache_corig(0)                       writeback smq
  [display_cache_corig] owi-aoC---   4.01g                                                     /dev/sdc1(0),/dev/sdd1(0),/dev/sdc2(0)
  [lvol0_pmspare]       ewi-------  12.00m                                                     /dev/sdb2(343)
  [pool]                Cwi---C---   4.01g                              0.00   12.99  0.00     pool_cdata(0)                                writeback smq
  [pool_cdata]          Cwi-ao----   4.01g                                                     /dev/sdb2(0),/dev/sdb1(0),/dev/sdf2(0)
  [pool_cmeta]          ewi-ao----  12.00m                                                     /dev/sdb2(342),/dev/sdb1(342),/dev/sdf2(342)

[root@host-109 ~]# lvs --noheadings -o lv_name --select 'cachemode=writeback && cachepolicy=smq' 
  display_cache

[root@host-109 ~]# lvs -a -o +devices,cachemode,cachepolicy
  LV                    Attr       LSize   Pool   Origin                Data%  Meta%  Cpy%Sync Devices                                      Cachemode Cache Policy
  display_cache         Cwi-a-C---   4.01g [pool] [display_cache_corig] 0.00   12.99  0.00     display_cache_corig(0)                       writeback smq
  [display_cache_corig] owi-aoC---   4.01g                                                     /dev/sdc1(0),/dev/sdd1(0),/dev/sdc2(0)
  [lvol0_pmspare]       ewi-------  12.00m                                                     /dev/sdb2(343)
  [pool]                Cwi---C---   4.01g                              0.00   12.99  0.00     pool_cdata(0)                                writeback smq
  [pool_cdata]          Cwi-ao----   4.01g                                                     /dev/sdb2(0),/dev/sdb1(0),/dev/sdf2(0)
  [pool_cmeta]          ewi-ao----  12.00m                                                     /dev/sdb2(342),/dev/sdb1(342),/dev/sdf2(342)

[root@host-109 ~]# lvchange --cachepolicy cleaner cache_sanity/display_cache
  Logical volume "display_cache" changed.

[root@host-109 ~]# lvs -a -o +devices,cachemode,cachepolicy
  LV                    Attr       LSize   Pool   Origin                Data%  Meta%  Cpy%Sync Devices                                      Cachemode Cache Policy
  display_cache         Cwi-a-C---   4.01g [pool] [display_cache_corig] 0.00   12.99  0.00     display_cache_corig(0)                       writeback cleaner
  [display_cache_corig] owi-aoC---   4.01g                                                     /dev/sdc1(0),/dev/sdd1(0),/dev/sdc2(0)
  [lvol0_pmspare]       ewi-------  12.00m                                                     /dev/sdb2(343)
  [pool]                Cwi---C---   4.01g                              0.00   12.99  0.00     pool_cdata(0)                                writeback cleaner
  [pool_cdata]          Cwi-ao----   4.01g                                                     /dev/sdb2(0),/dev/sdb1(0),/dev/sdf2(0)
  [pool_cmeta]          ewi-ao----  12.00m                                                     /dev/sdb2(342),/dev/sdb1(342),/dev/sdf2(342)

Comment 11 errata-xmlrpc 2015-11-19 12:47:24 UTC
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


Note You need to log in before you can comment on or make changes to this bug.