Linux LVM can combine several physical volumes in one group and when spread space of this group among logical volumes.
If some slow devices will be added to group it may slow down all logical volumes. Is there a way to add device but allow system to use it only in starvation case?
Best Answer
This depends on what type of striping you want to use. You can control how logical volumes will span physical volumes by an order of LV creation and PV addition. E.g.:
pv0
lv0
pv1
lv1
So, now if
lv0
spans wholepv0
,lv1
will spanpv1
(in case of linear striping). Filesystem will use blocks first at the beginning of device, so in linear case, if FS spans multiple PV, last PV will only be used if filesystem is full enough.If you need non-linear striping across fast devices, you may create VG only with these devices. Then create raid LV in it. Then use this LV as PV. I.e. create second level VG from LV. And then add slow device to this second level VG on linear basis.