Bug 1297029

Summary: lvs doesn't display cache_policy unless VG or LV is specified
Product: [Fedora] Fedora Reporter: Mike Snitzer <msnitzer>
Component: lvm2Assignee: Peter Rajnoha <prajnoha>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: agk, bmarzins, bmr, dwysocha, heinzm, jonathan, lvm-team, msnitzer, prajnoha, prockai, zkabelac
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lvm2-2.02.140-3.fc24 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-18 10:51:24 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:
Attachments:
Description Flags
tarball with 4 variants of lvs -vvvv output none

Description Mike Snitzer 2016-01-08 19:19:46 UTC
Description of problem:

# lvs -a -o name,cache_policy
  LV                 Cache Policy
  root
  swap
  data
  metadata
  [data]
  [data_cdata]
  [data_cmeta]
  [lvol0_pmspare]
  striped_lv
  [striped_lv_corig]

# lvs -a -o name,cache_policy thin
  LV                 Cache Policy
  [data]             smq
  [data_cdata]
  [data_cmeta]
  [lvol0_pmspare]
  striped_lv         smq
  [striped_lv_corig]

# lvs -a -o name,cache_policy thin/striped_lv
  LV         Cache Policy
  striped_lv smq

Version-Release number of selected component (if applicable):

Tested with nightly lvm2-2.02.133-0.841.el7.x86_64 but it should match upstream lvm2 pretty closely.

How reproducible:
Always

Steps to Reproduce:
see above, I'll attach -vvvv output, etc in followup comments

Comment 1 Mike Snitzer 2016-01-08 19:22:05 UTC
Additional context for all VGs and LVs in use on my testbed:

# lvs -a -o+cache_policy
  LV                 VG                   Attr       LSize   Pool   Origin             Data%  Meta%  Move Log Cpy%Sync Convert Cache Policy
  root               rhel_rhel-storage-02 -wi-ao---- 350.00g
  swap               rhel_rhel-storage-02 -wi-ao----   4.00g
  data               spindle              -wi-a-----  10.00g
  metadata           spindle              -wi-a-----   4.00g
  [data]             thin                 Cwi---C---  16.00g                           0.00   0.06            100.00
  [data_cdata]       thin                 Cwi-ao----  16.00g
  [data_cmeta]       thin                 ewi-ao----   4.00g
  [lvol0_pmspare]    thin                 ewi-------   4.00g
  striped_lv         thin                 Cwi-a-C--- 100.01g [data] [striped_lv_corig] 0.00   0.06            100.00
  [striped_lv_corig] thin                 owi-aoC--- 100.01g

Comment 2 Mike Snitzer 2016-01-08 19:30:55 UTC
using --unbuffered works:

# lvs --unbuffered -o name,cache_policy
  LV         Cache Policy
  striped_lv smq
  root
  swap
  metadata
  data

Comment 3 Mike Snitzer 2016-01-08 19:35:37 UTC
Created attachment 1112966 [details]
tarball with 4 variants of lvs -vvvv output

# tar -cvzf bz1297029_lvs_vvvv_output.tar.gz bz1297029
bz1297029/
bz1297029/lvs_unbuffered_vvvv_with_lv.log
bz1297029/lvs_unbuffered_vvvv_without_lv.log
bz1297029/lvs_vvvv_with_lv.log
bz1297029/lvs_vvvv_without_lv.log