Hide Forgot
Description of problem: If you try to extend a striped LV using a -l100% argument and a stripe argument whith different size than original LV (smaller), LV will get extended on disks which were maybe not expected. How reproducible: Create LV and then increase its size by stripe number that is lower: vgcreate vg /dev/sd{a..c}1 lvcreate -i 3 -L1G -n stripe vg lvextend -i 1 -l100%FREE vg/stripe Extension will take other PV's as well, making more than one stripe. The %FREE calculation is taken into account before considering number of stripes, and the stripes are then doubled to accomodate the stripe size request: Before extension: [root@virt-011 ~]# pvs PV VG Fmt Attr PSize PFree /dev/sda1 vg lvm2 a-- 9.99g 9.66g /dev/sdb1 vg lvm2 a-- 9.99g 9.66g /dev/sdc1 vg lvm2 a-- 9.99g 9.66g After extension: [root@virt-011 ~]# lvextend -i 1 -l100%FREE vg/stripe Extending logical volume stripe to 28.97 GiB Logical volume stripe successfully resized [root@virt-011 ~]# pvs PV VG Fmt Attr PSize PFree /dev/sda1 vg lvm2 a-- 9.99g 0 /dev/sdb1 vg lvm2 a-- 9.99g 0 /dev/sdc1 vg lvm2 a-- 9.99g 1.01g Should a lvextend with smaller number of stripes take the rest of PVs (creating more stripe 'copies' spread out accross PVs in LV)?
OK - this seems to work correctly for me. Try -l+100%FREE Without the + it takes the amount of free space then uses that as the absolute size the final volume should be - so you are left with 1G (the original size) unused. More examples in the man pages perhaps!