Bug 1295584 - Hidden devices are not marked consistently in LVM2 reporting fields
Summary: Hidden devices are not marked consistently in LVM2 reporting fields
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: lvm2
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Rajnoha
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-04 23:21 UTC by Tony Asleson
Modified: 2016-08-01 09:17 UTC (History)
11 users (show)

Fixed In Version: lvm2-2.02.150-2.fc24.x86_64
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-01 09:17:59 UTC
Type: Bug


Attachments (Terms of Use)

Description Tony Asleson 2016-01-04 23:21:10 UTC
Description of problem:

When utilizing the lv_parent column, we get results which are inconsistent with regards to the data_lv and metadata_lv columns as the parent is missing the hidden indicators when applicable. 

# lvs -a -oname,vg_name,lv_parent,data_lv,metadata__lv
  LV                     VG   Parent      Data          Meta         
  lvol0                  test                                        
  [lvol1_pmspare]        test                                        
  r5_lv                  test             [r5_lv_tdata] [r5_lv_tmeta]
  [r5_lv_tdata]          test r5_lv                                  
  [r5_lv_tdata_rimage_0] test r5_lv_tdata                            
  [r5_lv_tdata_rimage_1] test r5_lv_tdata                            
  [r5_lv_tdata_rimage_2] test r5_lv_tdata                            
  [r5_lv_tdata_rimage_3] test r5_lv_tdata                            
  [r5_lv_tdata_rmeta_0]  test r5_lv_tdata                            
  [r5_lv_tdata_rmeta_1]  test r5_lv_tdata                            
  [r5_lv_tdata_rmeta_2]  test r5_lv_tdata                            
  [r5_lv_tdata_rmeta_3]  test r5_lv_tdata                            
  [r5_lv_tmeta]          test r5_lv                                  
  [r5_lv_tmeta_rimage_0] test r5_lv_tmeta                            
  [r5_lv_tmeta_rimage_1] test r5_lv_tmeta                            
  [r5_lv_tmeta_rimage_2] test r5_lv_tmeta                            
  [r5_lv_tmeta_rimage_3] test r5_lv_tmeta                            
  [r5_lv_tmeta_rmeta_0]  test r5_lv_tmeta                            
  [r5_lv_tmeta_rmeta_1]  test r5_lv_tmeta                            
  [r5_lv_tmeta_rmeta_2]  test r5_lv_tmeta                            
  [r5_lv_tmeta_rmeta_3]  test r5_lv_tmeta  

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

How reproducible:
Every time

Steps to Reproduce:
In this specific case use lvconvert utilizing an existing RAID5 LVs for metadata and data.

Actual results:
See above

Expected results:

One would expect that the lv_parent column names would be surrounded with '[..]' when applicable, eg. '[r5_lv_tmeta]'.

Additional info:

Comment 1 Peter Rajnoha 2016-01-11 14:41:46 UTC
Fixed with:

https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=d6cf83968cb0d397faec30ce54839a679e89dd14

(All fields displaying LV names should use _lvname_disp within their report function - I'll check once again other fields too, but it seems all the others correctly use _lvname_disp already.)

Comment 2 Peter Rajnoha 2016-01-14 10:13:33 UTC
There are more patches in lvm2 v2.02.140 which mark hidden devices consistently on reports by reusing common function to display names (_lvname_disp) as much as possible, including these fields:

  convert_lv, origin, mirror_log, data_lv, metadata_lv, pool_lv, devices, metadata_devices, seg_pe_ranges, seg_metadata_le_ranges.

There's also a new lvm.conf setting to control marking hidden devices with brackets (default is enabled):

  report/mark_hidden_devices = 1

Comment 3 Peter Rajnoha 2016-01-19 13:56:08 UTC
I've made an exception (in lvm2 v2.02.141) for these fields and I'm keeping them as they were before these changes, so reverting the changes for these fields:

  devices
  metadata_devices
  seg_pe_ranges

The devices and seg_pe_ranges are out and released for a very long time and we would be breaking compatibility. The metadata_devices is relatively new field, so compatibility doesn't matter much here, but let's make it consistent with the "devices" field.

I'd recommend people using associated seg_le_ranges (this is a new one introduced in lvm2 v 2.02.141 to replace seg_pe_ranges) and seg_metadata_le_ranges which display devices and extent ranges in common and standard format:

For devices which are not hidden:
   device_name:extent_start-extent_end

For hidden devices:
   [device_name]:extent_start-extent_end

Comment 4 Mike McCune 2016-03-28 23:21:47 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions


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