Red Hat Bugzilla – Bug 880414
lvm2app reports the stripe size of volumes incorrectly
Last modified: 2013-11-21 18:18:00 EST
Description of problem:
The lvm2app library reports the stripe size of volumes
~# lvs --version
LVM version: 2.02.98(2) (2012-10-15)
Library version: 1.02.77 (2012-10-15)
Driver version: 4.23.0
For example if I create a volume with 2 stripes of 128k:
~# lvcreate -i 2 -I 128 --extents 100 vg1
Logical volume "lvol0" created
The lvs command gets it right:
~# lvs -o +stripe_size
LV VG Attr LSize Pool Data% Move Log Copy% Convert Stripe
lvol0 vg1 -wi-a---- 100.00m 128.00k
However, the number from the library is as follows:
value = lvm_lvseg_get_property(lvm_lvseg, "stripesize");
qDebug() << "Stripe size: " << value.value.integer;
Stripe size: 256
The library seems to be reporting the number of sectors since
256 * 512 = 131072 bytes which is 128k.
The error occures with any stripe size;
It appears that the chunksize property is also reported in sectors.
Sizes should be reported as uint64_t using byte units.
Fixed upstream via this patch:
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.