bug in lvs reporting -- version 2.02.07 Debian
I have found a couple of times in testing that lvs will sometimes report the same logical volume 2 or more times when output options are used. It seems to happen with volumes that are a large percentage of the total group size. Below I give an example. Notice how "lvs" with no options works fine but with options doesn't.
~/benscott/myprog# vgs
VG #PV #LV #SN Attr VSize VFree
test2 4 6 0 wz--n- 14.29G 328.00M vg1 2 1 0 wz--n- 147.18G 1.18G
~/benscott/myprog# lvs
LV VG Attr LSize Origin Snap% Move Log Copy%
bigtest1 test2 -wi-a- 900.00M
bigtest2 test2 -wi-a- 100.00M
bigtest3 test2 -wi-a- 1000.00M
bigtest4 test2 -wi-a- 1.27G
bigtest5 test2 -wi-a- 1000.00M
bigtest6 test2 -wi-a- 9.77G
lv1 vg1 -wi-ao 146.00G
~/benscott/myprog# lvs -o +stripes,stripesize
LV VG Attr LSize Origin Snap% Move Log Copy% #Str Stripe
bigtest1 test2 -wi-a- 900.00M 1 0 bigtest2 test2 -wi-a- 100.00M 1 0 bigtest3 test2 -wi-a- 1000.00M 1 0 bigtest4 test2 -wi-a- 1.27G 1 0 bigtest5 test2 -wi-a- 1000.00M 1 0 bigtest6 test2 -wi-a- 9.77G 1 0 bigtest6 test2 -wi-a- 9.77G 1 0 bigtest6 test2 -wi-a- 9.77G 1 0 bigtest6 test2 -wi-a- 9.77G 1 0 lv1 vg1 -wi-ao 146.00G 2 32.00K
# lvs --version LVM version: 2.02.07 (2006-07-17) Library version: 1.02.12 (2006-10-13) Driver version: 4.7.0
These are the physical volumes involved:
/dev/hdh1 test2 lvm2 a- 952.00M 328.00M /dev/hdh2 test2 lvm2 a- 1.39G 0 /dev/hdh5 test2 lvm2 a- 7.18G 0 /dev/hdh6 test2 lvm2 a- 4.79G 0
Hi,
Quoted 5 lines · ben scott
I have found a couple of times in testing that lvs will sometimes report the same logical volume 2 or more times when output options are used. It seems to happen with volumes that are a large percentage of the total group size. Below I give an example. Notice how "lvs" with no options works fine but with options doesn't.
lvs reports per-lv by default.
However, depending on the specified fields, it reports per-segments as if '--segments' are given, for the fields are per-segment info.
# lvs LV VG Attr LSize Origin Snap% Move Log Copy% lvol4 mvg -wi-a- 21.88G
# lvs --segments LV VG Attr #Str Type SSize lvol4 mvg -wi-a- 1 linear 7.45G lvol4 mvg -wi-a- 1 linear 7.44G lvol4 mvg -wi-a- 1 linear 6.99G
In this case, mvg/lvol4 consists of 3 segments.
# dmsetup table mvg-lvol4 0 15613952 linear 8:33 8576 15613952 15605760 linear 8:35 16768 31219712 14655488 linear 8:34 164224
With combination of LVM2 2.02.20 or newer and device-mapper 1.02.16 or newer, you can see which field belongs to which category by 'lvs -o help'.
Thanks,
Signature · 1 line
Jun'ichi Nomura, NEC Corporation of America
Quoted 9 lines · Jun'ichi Nomura
Hi,
Quoted 5 lines · ben scott
I have found a couple of times in testing that lvs will sometimes report the same logical volume 2 or more times when output options are used. It seems to happen with volumes that are a large percentage of the total group size. Below I give an example. Notice how "lvs" with no options works fine but with options doesn't.
Quoted 3 lines
With combination of LVM2 2.02.20 or newer and device-mapper 1.02.16 or newer, you can see which field belongs to which category by 'lvs -o help'.
Thank you, I was unaware of that feature.