Red Hat Bugzilla – Bug 171893
lvdisplay -v fails to display summary of extents
Last modified: 2010-04-27 10:01:41 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YComp 220.127.116.11)
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):
Steps to Reproduce:
1.lvdisplay -v /dev/vgname/lvname
Actual Results: Obtained just the basic logical volume information.
Expected Results: Should get a detailed verbose output depicting the logical and physical extents.
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.
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
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
LV Status available
# open 1
LV Size 10.00 GB
Current LE 2560
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.
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.
Meant to be RHEL 4 I presume?
Are these any help?
lvs --segments -o+devices
That example needs removing from the man page as it's incorrect.
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.
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.
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.
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.