Bug 712718 - "pvs -o pv_all" does not report all physical volume columns
"pvs -o pv_all" does not report all physical volume columns
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: lvm2 (Show other bugs)
15
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: LVM and device-mapper development team
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-12 13:21 EDT by Steve Tyler
Modified: 2012-04-11 08:35 EDT (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-04-11 08:35:57 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Steve Tyler 2011-06-12 13:21:25 EDT
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 13:38:03 EDT
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 14:29:58 EDT
...looks like there was already an incomplete attempt to fix this:)
Comment 3 Steve Tyler 2011-06-12 15:04:23 EDT
"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 15:15:52 EDT
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 15:50:55 EDT
Patch applied upstream.
Comment 6 Steve Tyler 2011-06-12 16:21:46 EDT
(In reply to comment #5)
> Patch applied upstream.

Thanks!
Comment 7 Peter Rajnoha 2012-04-11 08:35:57 EDT
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.