Lvm – Growing a LVM volume with striping

amazon-ebslvmraidstorage

I'm considering using LVM striping over several EBS volumes. So let's imagine the following case:
Volume group DATA is created with 3 physical disks sdf1, sdg1 and sdh1. I create a logical volume "store" inside DATA and enable striping on this, with 3 stripes and a stripesize at 128KB so I split my blocks across the 3 physical volumes.

Now, I want to add a 4th physical volume to grow the size of the volume group and logical volume. I add my physical volume to DATA, increase the size of "store" and change the number of stripe from 3 to 4.

What happens to my "store" volume ? Do the previously existing blocks get re-organized ? Otherwise, if my 3 previous physical volumes were full, only the 4th one will be used to store the new blocks, and there would be no striping.

Best Answer

Do the previously existing blocks get re-organized?

Nope.

What you would get is a LV that is a concatenation of two stripe sets, one 3 disks and one 4 disks.

However, if you going to extend and LV with stripes then the maximum size of the extension is N * the number of free extents on the PV with the fewest free extents where N is the number of stripes.

In your case the three current disks are full. Thus you cannot use striping at all.