Bug 712718 - "pvs -o pv_all" does not report all physical volume columns
Summary: "pvs -o pv_all" does not report all physical volume columns
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: lvm2
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: LVM and device-mapper development team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-12 17:21 UTC by Steve Tyler
Modified: 2012-04-11 12:35 UTC (History)
12 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-04-11 12:35:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Steve Tyler 2011-06-12 17:21:25 UTC
Description of problem:
"pvs -o pv_all" reports some physical volume columns, while "pvs -o all" reports all of them.

The "pvs" man page says:
"Use -o pv_all to select all physical volume columns ..."
"... otherwise any "pv_" prefixes are optional."

Version-Release number of selected component (if applicable):
lvm2-2.02.84-1.fc15.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. # pvs -o pv_all
2. # pvs -o all
 
Actual results:
# pvs -o pv_all
  1st PE  PSize  PFree Used   Attr PE   Alloc PV Tags #PMda #PMdaUse
    1.00m 24.00g    0  24.00g a-   6143  6143             1        1

Expected results:
# pvs -o all
  Fmt  PV UUID                                DevSize PV         PMdaFree  PMdaSize  1st PE  PSize  PFree Used   Attr PE   Alloc PV Tags #PMda #PMdaUse
  lvm2 YaIeIp-1A4F-R121-P8UL-ef6U-0kIi-cl8SfV  24.00g /dev/sda2    508.00k  1020.00k   1.00m 24.00g    0  24.00g a-   6143  6143             1        1

Additional info:
"Use -o help to view the full list of columns available."
# pvs -o help

Comment 1 Alasdair Kergon 2011-06-12 17:38:03 UTC
The missing fields are categorised as "label" fields not "pv" fields.  It would make sense to show both, but only if it's easy to do - we'll have to check the code and see.

Comment 2 Alasdair Kergon 2011-06-12 18:29:58 UTC
...looks like there was already an incomplete attempt to fix this:)

Comment 3 Steve Tyler 2011-06-12 19:04:23 UTC
"pv_all" is listed under both:

# pvs -o help
...
  Physical Volume Label Fields
  ----------------------------
    pv_all               - All fields in this section.
...
  Physical Volume Fields
  ----------------------
    pv_all               - All fields in this section.
...

Changing "pv_all" to "pvlabel_all" in the former would be more consistent with the other "_all"s.

Comment 4 Alasdair Kergon 2011-06-12 19:15:52 UTC
It's a matter of backward compatibility I think - the distinction between label fields and pv fields came in after pv_all was supported.

It looks easy to fix.

Comment 5 Alasdair Kergon 2011-06-12 19:50:55 UTC
Patch applied upstream.

Comment 6 Steve Tyler 2011-06-12 20:21:46 UTC
(In reply to comment #5)
> Patch applied upstream.

Thanks!

Comment 7 Peter Rajnoha 2012-04-11 12:35:57 UTC
The change appears in lvm2 v2.02.86, libdevmapper v1.02.65 and higher (Fedora 16+).


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