LVM physical volume priority

Posted on

LVM physical volume priority – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, lvm, , , .

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?

Solution :

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.:

  1. add pv0
  2. create lv0
  3. add pv1
  4. 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.

Leave a Reply

Your email address will not be published.