Bug 1152795
| Summary: | LVM cache: Add cache statistics to 'lvs' | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Jonathan Earl Brassow <jbrassow> |
| Component: | lvm2 | Assignee: | Peter Rajnoha <prajnoha> |
| lvm2 sub component: | Cache Logical Volumes | QA Contact: | Cluster QE <mspqa-list> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | low | ||
| Priority: | high | CC: | agk, cmarthal, heinzm, jbrassow, msnitzer, prajnoha, zkabelac |
| Version: | 7.1 | Keywords: | FutureFeature, Triaged |
| Target Milestone: | rc | ||
| Target Release: | 7.1 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | lvm2-2.02.112-1.el7 | Doc Type: | Enhancement |
| Doc Text: |
There are new reporting fields to display cache statistics:
cache_total_blocks, cache_used_blocks, cache_dirty_blocks, cache_read_hits, cache_read_misses, cache_write_hits, cache_write_misses.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-03-05 13:09:48 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: | 1119326 | ||
|
Description
Jonathan Earl Brassow
2014-10-15 01:09:08 UTC
lv_cache_block_info should give you access to a number of these. Patchset it on dev-prajnoha-lv-segment-status-reporting devel branch now: https://git.fedorahosted.org/cgit/lvm2.git/log/?h=dev-prajnoha-lv-segment-status-reporting I'll test it a bit now. For now, I've added only reporting fields for the cache: Logical Volume Device Segment Status Fields ------------------------------------------- seg_all - All fields in this section. cache_total_blocks - Total cache blocks. cache_used_blocks - Used cache blocks. cache_dirty_blocks - Dirty cache blocks. cache_read_hits - Cache read hits. cache_read_misses - Cache read misses. cache_write_hits - Cache write hits. cache_write_misses - Cache write misses. But the code can be reused for current status on any other segtype as well later on... (In reply to Peter Rajnoha from comment #2) > Patchset it on dev-prajnoha-lv-segment-status-reporting devel branch now: > > https://git.fedorahosted.org/cgit/lvm2.git/log/?h=dev-prajnoha-lv-segment- > status-reporting > The original patchset was modified a bit so it's possbile to report one-segment LVs as usual LVs, not switching the overall reporting type to 'segment reporting' (which would exhibit more lines if some other LVs consist of several segments). Cache LVs are also such LVs - they consist only of one segment for which we need to report the status as it was for the LV itself. So there are two types now - LVSSTATUS for reporting segment status for exactly one segment that is chosen from the LV and SEGSSTATUS which is the same, but per-each-segment status reporting (if the LV consists of more than one segment - this is not yet used though but it's prepared for any future use). The new patchset is here - committed upstream: https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=d7e5f038887be820874522674a51071705439c8e https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=7f90ad84c1f9bbc51a833b7ebb6459842405de52 https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=a2c1024f6ac7e22ac5c010a267d0c1df331ee416 https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=2dde6c6531f9a06896ae61f0878745542b4001b6 Marking verified (SanityOnly). All these fields are present in the latest rpms. 3.10.0-200.el7.bz1159001v2.x86_64 lvm2-2.02.112-1.el7 BUILT: Tue Nov 11 09:39:35 CST 2014 lvm2-libs-2.02.112-1.el7 BUILT: Tue Nov 11 09:39:35 CST 2014 lvm2-cluster-2.02.112-1.el7 BUILT: Tue Nov 11 09:39:35 CST 2014 device-mapper-1.02.91-1.el7 BUILT: Tue Nov 11 09:39:35 CST 2014 device-mapper-libs-1.02.91-1.el7 BUILT: Tue Nov 11 09:39:35 CST 2014 device-mapper-event-1.02.91-1.el7 BUILT: Tue Nov 11 09:39:35 CST 2014 device-mapper-event-libs-1.02.91-1.el7 BUILT: Tue Nov 11 09:39:35 CST 2014 device-mapper-persistent-data-0.3.2-1.el7 BUILT: Thu Apr 3 09:58:51 CDT 2014 cmirror-2.02.112-1.el7 BUILT: Tue Nov 11 09:39:35 CST 2014 [root@host-118 ~]# lvs -a -o +devices,cache_total_blocks,cache_used_blocks,cache_dirty_blocks,cache_read_hits,cache_read_misses,cache_write_hits,cache_write_misses,segtype LV Attr LSize Pool Origin Data% Meta% Cpy%Sync Devices CacheTotalBlocks CacheUsedBlocks CacheDirtyBlocks CacheReadHits CacheReadMisses CacheWriteHits CacheWriteMisses Type [lvol0_pmspare] ewi------- 8.00m /dev/sda2(0) linear rename_orig_A Cwi-aoC--- 4.00g [rename_pool_A] [rename_orig_A_corig] 0.02 6.59 0.00 rename_orig_A_corig(0) 65536 11 0 399 71 42 3143 cache [rename_orig_A_corig] rwi-aoC--- 4.00g 100.00 rename_orig_A_corig_rimage_0(0),rename_orig_A_corig_rimage_1(0) raid1 [rename_orig_A_corig_rimage_0] iwi-aor--- 4.00g /dev/sdc1(1) linear [rename_orig_A_corig_rimage_1] iwi-aor--- 4.00g /dev/sda1(1) linear [rename_orig_A_corig_rmeta_0] ewi-aor--- 4.00m /dev/sdc1(0) linear [rename_orig_A_corig_rmeta_1] ewi-aor--- 4.00m /dev/sda1(0) linear [rename_pool_A] Cwi---C--- 4.00g 0.02 6.59 0.00 rename_pool_A_cdata(0) cache-pool [rename_pool_A_cdata] Cwi-aor--- 4.00g 100.00 rename_pool_A_cdata_rimage_0(0),rename_pool_A_cdata_rimage_1(0) raid1 [rename_pool_A_cdata_rimage_0] iwi-aor--- 4.00g /dev/sdd2(1) linear [rename_pool_A_cdata_rimage_1] iwi-aor--- 4.00g /dev/sdd1(1) linear [rename_pool_A_cdata_rmeta_0] ewi-aor--- 4.00m /dev/sdd2(0) linear [rename_pool_A_cdata_rmeta_1] ewi-aor--- 4.00m /dev/sdd1(0) linear [rename_pool_A_cmeta] ewi-aor--- 8.00m 100.00 rename_pool_A_cmeta_rimage_0(0),rename_pool_A_cmeta_rimage_1(0) raid1 [rename_pool_A_cmeta_rimage_0] iwi-aor--- 8.00m /dev/sdd2(1026) linear [rename_pool_A_cmeta_rimage_1] iwi-aor--- 8.00m /dev/sdd1(1026) linear [rename_pool_A_cmeta_rmeta_0] ewi-aor--- 4.00m /dev/sdd2(1025) linear [rename_pool_A_cmeta_rmeta_1] ewi-aor--- 4.00m /dev/sdd1(1025) linear If this Feature should be included in the 7.1 Release Notes, could you please change the Doc Type from Enhancement to "Release Note"? Note that the Release Notes are intended to list the most prominent and customer-relevant new features rather than every single enhancement. Cheers, Jirka 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 |