[linux-lvm] specifying contiguous yields odd results

ben benscott at nwlink.com
Tue Apr 23 04:09:59 UTC 2013


I have discovered something strange when extending a striped logical volume. 

For example, start with a volume that has three physical volumes and three 
stripes then run lvextend on it. If the policy is set to 'contiguous' then all 
the physical volumes of the last segment must be on the command line. What is 
odd is that the striping can be set to a lower number so not all those 
physical volumes are really used. 


~#lvs  --segments -o +devices
  LV    VG   Attr      #Str Type    SSize Devices
  lvol0 vg8  -wi-a----    3 striped 2.00g /dev/sdc(0),/dev/sdd(0),/dev/sde(0)

~# lvextend -i 2 --alloc contiguous -l +2049 vg8/lvol0 /dev/sdc /dev/sdd
  Using stripesize of last segment 64.00 KiB
  Rounding size (6147 extents) up to stripe boundary size for segment (6148 
extents)
  Extending logical volume lvol0 to 3.00 GiB
  Insufficient suitable contiguous allocatable extents for logical volume lvol0: 
2050 more required

~# lvextend -i 2 --alloc contiguous -l +2049 vg8/lvol0 /dev/sdc /dev/sdd 
/dev/sde
  Using stripesize of last segment 64.00 KiB
  Rounding size (6147 extents) up to stripe boundary size for segment (6148 
extents)
  Extending logical volume lvol0 to 3.00 GiB
  Logical volume lvol0 successfully resized

~# lvs  --segments -o +devices
  LV    VG   Attr      #Str Type    SSize Devices
  lvol0 vg8  -wi-a----    3 striped 2.00g /dev/sdc(0),/dev/sdd(0),/dev/sde(0)
  lvol0 vg8  -wi-a----    2 striped 1.00g /dev/sdc(1366),/dev/sdd(1366)

Is it intended that with contiguous allocation the striping should match or 
not? Thank you.




More information about the linux-lvm mailing list