LVM physical volume priority
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.:
- add
pv0
- create
lv0
- add
pv1
- create
lv1
So, now if lv0
spans whole pv0
, lv1
will span pv1
(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.