liblvm2app stripe_size reported wrong
Using Debian liblvm2app2.2:amd64 version 2.02.95-4 the size of stripes on
segments is reported incorrectly from the library function. The number of bytes is divided by 512, which I assume is sectors.
Thank you.
Quoted 3 lines · ben
Using Debian liblvm2app2.2:amd64 version 2.02.95-4 the size of stripes on
segments is reported incorrectly from the library function. The number of bytes is divided by 512, which I assume is sectors.
Please be specific.
Which function?
What value does it give you?
What should it give you?
What does the output of 'lvs' show?
Alasdair
Quoted 11 lines · Alasdair G Kergon
Quoted 3 lines · ben
Using Debian liblvm2app2.2:amd64 version 2.02.95-4 the size of stripes
on segments is reported incorrectly from the library function. The number of bytes is divided by 512, which I assume is sectors.Please be specific.
Which function?
What value does it give you?
What should it give you?
What does the output of 'lvs' show?
Quoted 6 lines
Alasdair
--
lvm-devel mailing list
lvm-devel at redhat.com
https://www.redhat.com/mailman/listinfo/lvm-devel
I am using:
value = lvm_lvseg_get_property(lvm_lvseg, "stripesize");
if (value.is_valid)
segment->stripe_size = value.value.integer; /* now value.value.integer == 128 */
lvs -o+stripesize
LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert Stripe
lvol0 vg1 -wi-a--- 1.00g 64.00k
Thank you.
Quoted 8 lines · ben
I am using:
value = lvm_lvseg_get_property(lvm_lvseg, "stripesize"); if (value.is_valid) segment->stripe_size = value.value.integer;/* now value.value.integer == 128 */
lvs -o+stripesize
LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert Stripe
lvol0 vg1 -wi-a--- 1.00g 64.00k
Well this field is stored in sectors internally, so it's probably just returning that value directly.
Whether it should be converting or not, I don't know.
This doesn't seem to be documented and so we'll need to look at how other fields are handled to see if there's a consistent 'rule' here or not.
Alasdair
Quoted 8 lines · Alasdair G Kergon
Well this field is stored in sectors internally, so it's probably just returning that value directly.
Whether it should be converting or not, I don't know.
This doesn't seem to be documented and so we'll need to look at how other fields are handled to see if there's a consistent 'rule' here or not.Alasdair
Sector size is changing to a mix of 512 and 4k which will add to the confusion if it reports sectors.
Alasdair G Kergon
Reviewed-by Petr RockaiQuoted 2 lines · ben
Sector size is changing to a mix of 512 and 4k which will add to the confusion if it reports sectors.
Like in the kernel, we have a convention that sectors are always treated as 512 bytes.
commit 0bc382eae4cf77bdec9e5a2fdb11c72db64438bb
Author: Petr Rockai <[email protected]> Date: Thu Nov 25 14:39:02 2010 +0000
All 'size' values of lvm2app properties should be in bytes. Fix 'seg_size' to return bytes.
But if the assertion that all size values should be in bytes is true, why did that patch only change one field and not these others?
Alasdair