Bug 127858

Summary: lvdisplay shows wrong LV Size when invoked with --colon option.
Product: Red Hat Enterprise Linux 3 Reporter: James Puellmann <jp1046>
Component: lvmAssignee: Milan Broz <mbroz>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: pvrabec
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-24 12:27:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description James Puellmann 2004-07-14 19:37:54 UTC
Description of problem:

Using lvm-1.0.3-15.
lvdisplay command shows correct LV size when invoked with no options.
However, it will always report the LV size to be double the *actual*
LV size when invoked with the "-c" or "--colon" option.

Version-Release number of selected component (if applicable):
Using lvm-1.0.3-15.

How reproducible:
always

Steps to Reproduce:
1. "lvdisplay -c /path/to/logical/volume"
2. Compare with output from "lvdisplay /path/to/logical/volume"
3. Also check against output of "df /path/to/logical/volume"
  
Actual results:

[root@host root]# lvdisplay --colon  /dev/vg01/g01v1
/dev/vg01/g01v1:vg01:3:1:0:1:4096000:500:500:0:1024:58:0


Expected results:

[root@host root]# lvdisplay --colon  /dev/vg01/g01v1
/dev/vg01/g01v1:vg01:3:1:0:1:2048000:500:500:0:1024:58:0

Additional info:

Comment 1 István Tóth 2005-06-28 18:24:04 UTC
The exact same problem happens on FC4, with the included lvm2 tools.

The man page of lvdisplay even says that the size should be displayed in kilobytes.



Comment 2 Milan Broz 2006-03-24 12:24:18 UTC
With --colon option lvdisplay shows size always in sectors (512 bytes units).

For reporting information about logical volumes in LVM2 use lvs.
For example "lvs --units s" shows size in sectors, "lvs --units m" in megabytes.