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 1143753 - LVM cache: 'lvs' is unable to print the cachemode
Summary: LVM cache: 'lvs' is unable to print the cachemode
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: David Teigland
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks: 1119326
TreeView+ depends on / blocked
 
Reported: 2014-09-17 22:18 UTC by Jonathan Earl Brassow
Modified: 2021-09-03 12:36 UTC (History)
7 users (show)

Fixed In Version: lvm2-2.02.112-1.el7
Doc Type: Bug Fix
Doc Text:
No Documentation Needed
Clone Of:
Environment:
Last Closed: 2015-03-05 13:09:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
broken patch (6.62 KB, patch)
2014-09-17 22:19 UTC, Jonathan Earl Brassow
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0513 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2015-03-05 16:14:41 UTC

Description Jonathan Earl Brassow 2014-09-17 22:18:38 UTC
It is possible to set a cachepool to use "writeback" or "writethrough" cache mode, but it is not possible to get that information from 'lvs' (e.g. 'lvs -o cachemode').

Comment 1 Jonathan Earl Brassow 2014-09-17 22:19:54 UTC
Created attachment 938655 [details]
broken patch

here is an untested and partially written patch for this issue.  If it is helpful to you, great.

Comment 4 David Teigland 2014-10-02 16:56:47 UTC
    cache: include cache mode in vg metadata and display
    
    The cache mode of a new cache pool is always explicitly
    included in the vg metadata.  If a cache mode is not
    specified on the command line, the cache mode is taken
    from lvm.conf allocation/cache_pool_cachemode, which
    defaults to "writethrough".
    
    The cache mode can be displayed with lvs -o+cachemode.

Comment 6 Corey Marthaler 2015-01-22 22:00:16 UTC
Fixed verified in the latest rpms.

3.10.0-223.el7.x86_64
lvm2-2.02.115-2.el7    BUILT: Thu Jan 22 06:09:14 CST 2015
lvm2-libs-2.02.115-2.el7    BUILT: Thu Jan 22 06:09:14 CST 2015
lvm2-cluster-2.02.115-2.el7    BUILT: Thu Jan 22 06:09:14 CST 2015
device-mapper-1.02.93-2.el7    BUILT: Thu Jan 22 06:09:14 CST 2015
device-mapper-libs-1.02.93-2.el7    BUILT: Thu Jan 22 06:09:14 CST 2015
device-mapper-event-1.02.93-2.el7    BUILT: Thu Jan 22 06:09:14 CST 2015
device-mapper-event-libs-1.02.93-2.el7    BUILT: Thu Jan 22 06:09:14 CST 2015
device-mapper-persistent-data-0.4.1-2.el7    BUILT: Wed Nov 12 12:39:46 CST 2014
cmirror-2.02.115-2.el7    BUILT: Thu Jan 22 06:09:14 CST 2015



# WRITETHROUGH
lvcreate -L 4G -n corigin cache_sanity /dev/sde1
lvcreate -L 2G -n display_cache cache_sanity /dev/sdd1
lvcreate -L 12M -n display_cache_meta cache_sanity /dev/sdd1
lvconvert --yes --type cache-pool --cachemode writethrough -c 64 --poolmetadata cache_sanity/display_cache_meta cache_sanity/display_cache
lvconvert --yes --type cache --cachepool cache_sanity/display_cache cache_sanity/corigin
[root@host-114 ~]# lvs -a -o +devices,cachemode
 LV                    Attr       LSize   Pool            Origin          Data% Meta% Cpy%Sync Devices                Cachemode
 corigin               Cwi-a-C---   4.00g [display_cache] [corigin_corig] 0.02  2.31  0.00     corigin_corig(0)       writethrough
 [corigin_corig]       owi-aoC---   4.00g                                                      /dev/sde1(0)
 [display_cache]       Cwi---C---   2.00g                                 0.02  2.31  0.00     display_cache_cdata(0) writethrough
 [display_cache_cdata] Cwi-ao----   2.00g                                                      /dev/sdd1(0)
 [display_cache_cmeta] ewi-ao----  12.00m                                                      /dev/sdd1(512)
 [lvol0_pmspare]       ewi-------  12.00m                                                      /dev/sdb1(0)



# WRITEBACK
lvcreate -L 4G -n corigin cache_sanity /dev/sdb1
lvcreate -L 2G -n display_cache cache_sanity /dev/sdc1
lvcreate -L 12M -n display_cache_meta cache_sanity /dev/sdc1
lvconvert --yes --type cache-pool --cachemode writeback -c 32 --poolmetadata cache_sanity/display_cache_meta cache_sanity/display_cache
lvconvert --yes --type cache --cachepool cache_sanity/display_cache cache_sanity/corigin
[root@host-114 ~]# lvs -a -o +devices,cachemode
 LV                    Attr       LSize   Pool            Origin          Data% Meta% Cpy%Sync Devices                Cachemode
 corigin               Cwi-a-C---   4.00g [display_cache] [corigin_corig] 0.01  4.39  0.00     corigin_corig(0)       writeback
 [corigin_corig]       owi-aoC---   4.00g                                                      /dev/sdb1(0)
 [display_cache]       Cwi---C---   2.00g                                 0.01  4.39  0.00     display_cache_cdata(0) writeback
 [display_cache_cdata] Cwi-ao----   2.00g                                                      /dev/sdc1(0)
 [display_cache_cmeta] ewi-ao----  12.00m                                                      /dev/sdc1(512)
 [lvol0_pmspare]       ewi-------  12.00m                                                      /dev/sdb1(1024)

Comment 8 errata-xmlrpc 2015-03-05 13:09:30 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-0513.html


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