Bug#587309: lvm2: pvdisplay reports wrong Physical Volume Size
Ritesh Raj Sarraf
rrs at debian.org
Sun Jun 27 10:35:06 UTC 2010
Package: lvm2
Version: 2.02.66-2
Severity: normal
This is what the pvdisplay manpage says:
-c, --colon
Generate colon separated output for easier parsing in scripts or programs. N.B. pvs (8) provides considerably more
control over the output.
The values are:
* physical volume device name
* volume group name
* physical volume size in kilobytes
And here's the output:
15:33:57 rrs at champaran:~ $ sudo pvdisplay -c
/dev/sda3:LocalDisk:242244135:-1:8:8:-1:4096:29570:293:29277:vbVe9b-nJBv-ADtN-e578-mJAF-mbhZ-48jk4E
So this would mean: ( (242244135/1024) / 1024) GiB = 231
Which is not really the case.
pvs reports it correctly:
15:40:24 rrs at champaran:~ $ sudo pvs --all --units g
PV VG Fmt Attr PSize PFree
/dev/dm-1 -- 0g 0g
/dev/dm-2 -- 0g 0g
/dev/root -- 0g 0g
/dev/sda1 -- 0g 0g
/dev/sda2 -- 0g 0g
/dev/sda3 LocalDisk lvm2 a- 115.51g 1.14g
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (101, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.34-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages lvm2 depends on:
ii dmsetup 2:1.02.48-2 The Linux Kernel Device Mapper use
ii libc6 2.11.1-3 Embedded GNU C Library: Shared lib
ii libdevmapper1.02.1 2:1.02.48-2 The Linux Kernel Device Mapper use
ii libreadline5 5.2-7 GNU readline and history libraries
ii libudev0 157-1 libudev shared library
ii lsb-base 3.2-23.1 Linux Standard Base 3.2 init scrip
lvm2 recommends no packages.
lvm2 suggests no packages.
-- no debconf information
More information about the pkg-lvm-maintainers
mailing list