I have an LVM virtual group with 4x disks, on this virtual group there are several logical volumes. However all the logical volumes have been placed on the first disk in the group resulting in poor performance. It it possible to rebalance the logical volumes so that they are spread roughly evenly over the 4 disks?
Asked
Active
Viewed 1,913 times
2 Answers
6
To balance the spread of LV on all disks you can execute command like this:
lvconvert --stripes 4 vg/lv01
This will stripe the LV lv01
to all 4 disks.
Also you can consider change the stripe size (depend a lot of type of data you store on this LV)
lvconvert -I 64k vg/lv01
P.S. moving around LV on different PV rarely will help.

Romeo Ninov
- 17,484
-
3Does it rebalance immediately and automatically? Or does it only apply to new data written? – Michael Hampton Sep 26 '21 at 00:23
-
1@MichaelHampton, when you execute the command it rebalance the data (it take some time) – Romeo Ninov Sep 26 '21 at 04:27
4
You can use pvmove
to move LVs from one PV to another:
pvmove -n <logical_volume> <pv_from> <pv_to>
so for example
pvmove -n lvol1 /dev/sdb1 /dev/sdc1
to move lvol1
from sdb1
to sdc1
.

Vojtech Trefny
- 18,146