<!-- retain these comments for translator revision tracking -->
<!-- $Id$ -->

   <sect3 id="partman-lvm">
   <title>Configuring the Logical Volume Manager (LVM)</title>
<para>

If you are working with computers at the level of system administrator
or <quote>advanced</quote> user, you have surely seen the situation
where some disk partition (usually the most important one) was short on
space, while some other partition was grossly underused and you had to
manage this situation by moving stuff around, symlinking, etc.

</para><para>

To avoid the described situation you can use Logical Volume Manager
(LVM). Simply said, with LVM you can combine your partitions
(<firstterm>physical volumes</firstterm> in LVM lingo) to form
a virtual disk (so called <firstterm>volume group</firstterm>), which
can then be divided into virtual partitions (<firstterm>logical
volumes</firstterm>). The point is that logical volumes (and of course
underlying volume groups) can span across several physical disks.

</para><para>

Now when you realize you need more space for your old 160GB
<filename>/home</filename> partition, you can simply add a new 300GB
disk to the computer, join it with your existing volume group and then
resize the logical volume which holds your <filename>/home</filename>
filesystem and voila &mdash; your users have some room again on their
renewed 460GB partition.  This example is of course a bit
oversimplified. If you haven't read it yet, you should consult the
<ulink url="&url-lvm-howto;">LVM HOWTO</ulink>.

</para><para>

LVM setup in &d-i; is quite simple and completely supported inside
<command>partman</command>. First, you have to mark the partition(s)
to be used as physical volumes for LVM. This is done in the
<guimenu>Partition settings</guimenu> menu where you should select
<menuchoice> <guimenu>Use as:</guimenu> <guimenuitem>physical volume
for LVM</guimenuitem> </menuchoice>.

</para><warning><para>

Be aware: the new LVM setup will destroy all data on all partitions marked with
an LVM type code. So, if you already have an LVM on some of your disks, and
want to install Debian additionally to that machine, the old (already existing)
LVM will be wiped out! The same counts for partitions, which are (for any
reason) misleadingly marked with an LVM type code, but contain something
different (like an encrypted volume). You need to remove such disks from the
system, before performing a new LVM setup!

</para></warning><para>

When you return to the main <command>partman</command> screen, you will see
a new option <guimenuitem>Configure the Logical Volume Manager</guimenuitem>.
When you select that, you will first be asked to confirm pending changes to
the partition table (if any) and after that the LVM configuration menu will
be shown. Above the menu a summary of the LVM configuration is shown. The
menu itself is context sensitive and only shows valid actions. The possible
actions are:

<itemizedlist>
  <listitem><para>
    <guimenuitem>Display configuration details</guimenuitem>:
    shows LVM device structure, names and sizes of logical volumes and more
  </para></listitem>
  <listitem><para>
    <guimenuitem>Create volume group</guimenuitem>
  </para></listitem>
  <listitem><para>
    <guimenuitem>Create logical volume</guimenuitem>
  </para></listitem>
  <listitem><para>
    <guimenuitem>Delete volume group</guimenuitem>
  </para></listitem>
  <listitem><para>
    <guimenuitem>Delete logical volume</guimenuitem>
  </para></listitem>
  <listitem><para>
    <guimenuitem>Extend volume group</guimenuitem>
  </para></listitem>
  <listitem><para>
    <guimenuitem>Reduce volume group</guimenuitem>
  </para></listitem>
  <listitem><para>
    <guimenuitem>Finish</guimenuitem>:
    return to the main <command>partman</command> screen
  </para></listitem>
</itemizedlist>

</para><para>

Use the options in that menu to first create a volume group and then create
your logical volumes inside it.

</para><para>

After you return to the main <command>partman</command> screen, any created
logical volumes will be displayed in the same way as ordinary partitions
(and you should treat them as such).

</para>
   </sect3>
