"
LVM2 Defrag defragments or rearranges a LVM2 volume group using pvmove.
", '1. Copying' => "
lvm2defrag has been written by
Joel Yliluoma
and other contributors,
and is distributed under the terms of the
General Public License
version 3 (GPL3).
", '1. Requirements' => "
This software is currently written in PHP. The PHP
commandline program is required to execute.
", '1. Howto' => "
Here's how.
# vgcfgbackup # cp /etc/lvm/backup/YOURVOLUMEGROUPNAME data.txt \$ php -q dump.php > dump.txt
\$ cp dump.txt rearrange.txt \$ editor rearrange.txtIn this file, you will move around the partitions between disks into the order you wish they to be in. Be careful to maintain the right amount of disk space on each partition (the sum of numbers must match what they were before). If you fail to maintain those numbers, the next command will warn you, so it is not fatal.
\$ php -q rearrange.php > commands.shNow verify the produced file, commands.sh, and edit if you like to. If there are error messages in the file, you may need to resolve them.
# chmod +x commands.sh ./commands.shAnd wait.
Note that the operation may be interrupted (and resumed) at any time. The LVM2 volume group will never be left in a broken state (this is guaranteed by how pvmove works). ", '1. Limitations' => "