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

Step 1. Dump existing layout

# vgcfgbackup
# cp /etc/lvm/backup/YOURVOLUMEGROUPNAME data.txt
\$ php -q dump.php > dump.txt

Step 2. Plan your desired layout

\$ cp dump.txt rearrange.txt
\$ editor rearrange.txt
In 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.

Step 3. Create the sequence of commands to move data around

\$ php -q rearrange.php > commands.sh
Now 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.

Step 4. Execute the commands

# chmod +x commands.sh
./commands.sh
And 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' => "

"); include '/WWW/progdesc.php';