Bug 171893 - lvdisplay -v fails to display summary of extents
lvdisplay -v fails to display summary of extents
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2 (Show other bugs)
4.0
i386 Linux
low Severity low
: ---
: ---
Assigned To: Zdenek Kabelac
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-27 11:42 EDT by Narasimha Krishnakumar
Modified: 2010-04-27 10:01 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-04-27 10:01:41 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 Narasimha Krishnakumar 2005-10-27 11:42:50 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YComp 5.0.2.4)

Description of problem:
The manpage of lvdisplay statest that the lvdisplay -v is supposed to display the extent information of the logical and physical extents. The command fails to do so.

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

How reproducible:
Always

Steps to Reproduce:
1.lvdisplay -v /dev/vgname/lvname
2.
3.
  

Actual Results:  Obtained just the basic logical volume information.

Expected Results:  Should get a detailed verbose output depicting the logical and physical extents.

Additional info:
Comment 1 Narasimha Krishnakumar 2005-12-01 17:07:55 EST
Hi,

I wanted an update on the status of this issue as it is holding up our 
development effort. A response on this issue would be highly appreciated.

Thanks,
Narasimha.
Comment 2 Corey Marthaler 2005-12-01 17:31:02 EST
As a work around I you can grab the PE size from the cmd 'vgdisplay' and then
map that back to the number of Logical Extents you have in your LV.

From an VG/LV that I have:

root@morph-01 bin]# vgdisplay
  --- Volume group ---
  VG Name               snapper
  System ID
  Format                lvm2
  Metadata Areas        4
  Metadata Sequence No  339
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                4
  Open LV               1
  Max PV                0
  Cur PV                4
  Act PV                4
  VG Size               915.70 GB
  PE Size               4.00 MB
  Total PE              234419
  Alloc PE / Size       2599 / 10.15 GB
  Free  PE / Size       231820 / 905.55 GB
  VG UUID               lIS0yW-oLmU-JRH6-rokN-QBv6-WCn5-PLdUnG


root@morph-01 bin]# lvdisplay -v /dev/snapper/origin
    Using logical volume(s) on command line
  --- Logical volume ---
  LV Name                /dev/snapper/origin
  VG Name                snapper
  LV UUID                OD1Jgj-lfN0-HhGb-dUMH-gd61-34iI-UEDrgj
  LV Write Access        read/write
  LV snapshot status     source of
                         /dev/snapper/snap1 [active]
                         /dev/snapper/snap2 [active]
                         /dev/snapper/snap3 [INACTIVE]
  LV Status              available
  # open                 1
  LV Size                10.00 GB
  Current LE             2560
  Segments               1
  Allocation             inherit
  Read ahead sectors     0
  Block device           253:2

So the LV has 2560 4 MB extents.
I apologize if that's not the info that you're looking for.
Comment 3 Corey Marthaler 2005-12-01 17:35:00 EST
The "NEEDINFO" state implys that DEV is waiting on QA for more info before
fixing a bug. Changing the state to "ASSIGNED" so that this issue still shows up
in DEVs queue.
Comment 4 Alasdair Kergon 2005-12-01 17:40:23 EST
Meant to be RHEL 4 I presume?

Are these any help? 
  lvdisplay -m
  lvs --segments -o+devices


That example needs removing from the man page as it's incorrect.
Comment 5 Narasimha Krishnakumar 2005-12-02 14:31:23 EST
The lvdisplay -v command is supposed to be compatible with the output produced 
on LVM1 version of the logical volume manager. The output does not seem to be 
supported now. The old output used to give a list of LE's and that is what i am 
looking for. lvdisplay and lvdisplay -v seem to be the same on LVM2.
Comment 6 Alasdair Kergon 2005-12-02 14:38:10 EST
This is one area where the output with -v is not the same.

'lvs' is the preferred tool for obtaining information about logical volumes as
it is much more flexible and designed to be easy for scripts to process.

If there's some specific information that is hard to obtain or missing from
'lvs' then we can look into enhancing it to make it easier.
Comment 7 Narasimha Krishnakumar 2005-12-02 14:43:55 EST
The lvdisplay command is unique and cannot be replaced with the lvs command in 
terms of equivalency. We would need support for lvdisplay -v as the manpage 
documents that it is supposed to produce a list of LE's.
Comment 9 Alasdair Kergon 2010-04-27 10:01:41 EDT
4.5 years later it's clear that there's insufficient demand to make changes to the lvdisplay output.  The information is available from lvs and pvs e.g. pvs --segments -o+lv_name,seg_start_pe,segtype.

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