lvm2defrag/doc
Aymeric / APLU d8bb17091b Add Git repository URL 2019-08-10 23:36:53 +03:00
..
README.html Add Git repository URL 2019-08-10 23:36:53 +03:00
algorithm.txt Release version 0.9.0 2008-09-24 10:45:04 +03:00
data-example.txt Release version 0.9.0 2008-09-24 10:45:04 +03:00
docmaker.php Add Git repository URL 2019-08-10 23:36:53 +03:00
document.php Add Git repository URL 2019-08-10 23:36:53 +03:00
dump-example.txt Release version 0.9.0 2008-09-24 10:45:04 +03:00
rearrange-example.txt Release version 0.9.0 2008-09-24 10:45:04 +03:00

README.html

<html><head><meta http-equiv="Content-type" content="text/html; charset=iso-8859-1">
 <title>LVM2 defragmenter</title>
 <style type="text/css"><!--
TABLE.toc {border:0px}
A:link,A:visited{text-decoration:none;color:#2A3B83}
A:hover{text-decoration:underline;color:#002040}
A:active{text-decoration:underline;color:#004060;background:#CCD8FF}
TD.toc   {font-size:80%; font-family:Tahoma; text-align:left}
H1       {font-size:250%; font-weight:bold} .level1 {text-align:center}
H2       {font-size:200%; font-weight:bold} .level2 {margin-left:1%}
H3       {font-size:160%; font-weight:bold} .level3 {margin-left:2%}
H4       {font-size:145%; font-weight:bold} .level4 {margin-left:3%}
H5       {font-size:130%; font-weight:bold} .level5 {margin-left:4%}
H6       {font-size:110%; font-weight:bold} .level5 {margin-left:5%}
BODY{background:white;color:black}
CODE{font-family:lucida console,courier new,courier;color:#105000}
PRE.smallerpre{font-family:lucida console,courier new,courier;font-size:80%;color:#500010;margin-left:30px}
SMALL    {font-size:70%}
.nonmail { visibility:hidden;position:absolute; top:0px;left:0px }
.ismail  { font-weight:normal }
--></style></head>
 <body>
  <h1>LVM2 defragmenter</h1>
  <h2 class=level2> 0. Contents </h2>
  
  This is the documentation of lvm2defrag-0.9.4.
<div class=toc><table cellspacing=0 cellpadding=0 class=toc><tr><td width="50%" valign=middle align=left nowrap class=toc>&nbsp;&nbsp;&nbsp;1. <a href="#h0">Purpose</a><br>&nbsp;&nbsp;&nbsp;2. <a href="#h1">Copying</a><br>&nbsp;&nbsp;&nbsp;3. <a href="#h2">Requirements</a><br></td>
<td width="50%" valign=middle align=left nowrap class=toc>&nbsp;&nbsp;&nbsp;4. <a href="#h3">Howto</a><br>&nbsp;&nbsp;&nbsp;5. <a href="#h4">Limitations</a><br>&nbsp;&nbsp;&nbsp;6. <a href="#download">Downloading</a><br></td>
</tr></table></div><H2 id="h0" class="level2"><a name="h0"></a>1. Purpose</H2><div class="level2" id="divh0">

LVM2 Defrag defragments or rearranges a LVM2 volume group using <tt>pvmove</tt>.

</div><H2 id="h1" class="level2"><a name="h1"></a>2. Copying</H2><div class="level2" id="divh1">

lvm2defrag has been written by
<a href="https://iki.fi/bisqwit/">Joel Yliluoma</a>
and other contributors,<br>
and is distributed under the terms of the
<a href="https://www.gnu.org/licenses/gpl-3.0.html">General Public License</a>
version 3 (GPL3).

</div><H2 id="h2" class="level2"><a name="h2"></a>3. Requirements</H2><div class="level2" id="divh2">

This software is currently written in PHP. The PHP
commandline program is required to execute.

</div><H2 id="h3" class="level2"><a name="h3"></a>4. Howto</H2><div class="level2" id="divh3">

Here's how.

<h4>Step 1. Dump existing layout</h4>

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

<h4>Step 2. Plan your desired layout</h4>

<pre>$ cp dump.txt rearrange.txt
$ editor rearrange.txt</pre>

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.

<h4>Step 3. Create the sequence of commands to move data around</h4>

<pre>$ php -q rearrange.php > commands.sh</pre>

Now verify the produced file, <tt>commands.sh</tt>, and
edit if you like to. If there are error messages in the file,
you may need to resolve them.

<h4>Step 4. Execute the commands</h4>

<pre># chmod +x commands.sh
./commands.sh</pre>

And wait.
 <p>
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).

</div><H2 id="h4" class="level2"><a name="h4"></a>5. Limitations</H2><div class="level2" id="divh4">

<ul>
 <li>This software is provided as-is, from an expert
  to experts. Do not use it if you think you cannot
  understand the instructions above.</li>
 <li>This software does not abide by many usability
  principles. Apologies. Such work however may be
  contributed by sending a patch to the author. :)</li>
 <li>This software cannot probably handle
  crypted volumes (no experience)
  or anything other beyond the basic
  capabilities of LVM2. Apologies.</li>
</ul>

</div><H2 id="download" class="level2"><a name="download"></a>6. Downloading</H2><div class="level2" id="divdownload">
   The official home page of lvm2defrag
   is at <a href="https://iki.fi/bisqwit/source/lvm2defrag.html">https://iki.fi/bisqwit/source/lvm2defrag.html</a>.<br>
   Check there for new versions.
<p>Additionally, the most recent source code (bleeding edge) for lvm2defrag can also be downloaded by cloning the Git repository by:<ul style="margin-left:3em;margin-top:0px"><li><code> git clone <a href="https://github.com/bisqwit/lvm2defrag.git">https://github.com/bisqwit/lvm2defrag.git</a></code></li><li><code> git checkout origin/release -b release</code></li><li><code> git checkout origin/master  -b master</code></li></ul></p></div> <p align=right><small>Generated from
       <tt>progdesc.php</tt> (last updated: Sat, 10 Aug 2019 23:36:26 +0300)<br>
  with <tt>docmaker.php</tt> (last updated: Sat, 10 Aug 2019 23:36:32 +0300)<br>
  at Sat, 10 Aug 2019 23:36:36 +0300</small>
 </p>
</body>
</html>