<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;

  <!ENTITY lvm2-download-http " ">
  <!ENTITY lvm2-download-ftp  "ftp://sources.redhat.com/pub/lvm2/LVM2.&lvm2-version;.tgz">
  <!ENTITY lvm2-md5sum        "3a1104e3d1dc4d5e92a40228161cd660">
  <!ENTITY lvm2-size          "1.5 MB">
  <!ENTITY lvm2-buildsize     "27 MB (additional 10 MB to run the test suite)">
  <!ENTITY lvm2-time          "0.4 SBU (additional 35 SBU to run the test suite)">
]>

<sect1 id="lvm2" xreflabel="LVM2-&lvm2-version;">
  <?dbhtml filename="lvm2.html"?>

  <sect1info>
    <othername>$LastChangedBy: pierre $</othername>
    <date>$Date: 2015-02-22 17:34:08 -0500 (Sun, 22 Feb 2015) $</date>
  </sect1info>

  <title>LVM2-&lvm2-version;</title>

  <indexterm zone="lvm2">
    <primary sortas="a-LVM2">LVM2</primary>
  </indexterm>

  <sect2 role="package">
    <title>Introduction to LVM2</title>

    <para>
      The <application>LVM2</application> package is a package that manages
      logical partitions. It allows spanning of file systems across multiple
      physical disks and disk partitions and provides for dynamic growing or
      shrinking of logical partitions.
    </para>

    &lfs77_checked;

    <bridgehead renderas="sect3">Package Information</bridgehead>
    <itemizedlist spacing="compact">
      <listitem>
        <para>
          Download (HTTP): <ulink url="&lvm2-download-http;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download (FTP): <ulink url="&lvm2-download-ftp;"/>
        </para>
      </listitem>
      <listitem>
        <para>
          Download MD5 sum: &lvm2-md5sum;
        </para>
      </listitem>
      <listitem>
        <para>
          Download size: &lvm2-size;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated disk space required: &lvm2-buildsize;
        </para>
      </listitem>
      <listitem>
        <para>
          Estimated build time: &lvm2-time;
        </para>
      </listitem>
    </itemizedlist>

    <bridgehead renderas="sect3">LVM2 Dependencies</bridgehead>

    <bridgehead renderas="sect4">Optional</bridgehead>
    <para role="optional">
      <xref linkend='mdadm'/> (for checks) and
      <xref linkend='xfsprogs'/> (for checks)
    </para>

    <para condition="html" role="usernotes">User Notes:
      <ulink url="&blfs-wiki;/lvm2"/>
    </para>
  </sect2>

  <sect2 role="kernel" id="lvm2-kernel">
    <title>Kernel Configuration</title>

    <para>
      Enable the following options in the kernel configuration
      and recompile the kernel:
    </para>

    <note><para>
      There are several other Device Mapper options in the kernel beyond those
      listed below.  In order to get reasonable results if running the
      regression tests, all must be enabled either internally or as a module.
    </para></note>

<screen><literal>Device Drivers ---&gt;
  [*] Multiple devices driver support (RAID and LVM) ---&gt; [CONFIG_MD]
    &lt;*/M&gt;   Device mapper support                         [CONFIG_BLK_DEV_DM]
    &lt;*/M/ &gt;   Crypt target support                        [CONFIG_DM_CRYPT]
    &lt;*/M/ &gt;   Snapshot target                             [CONFIG_DM_SNAPSHOT]
    &lt;*/M/ &gt;   Mirror target                               [CONFIG_DM_MIRROR]</literal></screen>

    <indexterm zone="lvm2 lvm2-kernel">
      <primary sortas="d-lvm2">lvm2</primary>
    </indexterm>

  </sect2>

  <sect2 role="installation">
    <title>Installation of LVM2</title>

    <para>
      Install <application>LVM2</application> by running the following
      commands:
    </para>

<screen><userinput>./configure --prefix=/usr       \
            --exec-prefix=      \
            --with-confdir=/etc \
            --enable-applib     \
            --enable-cmdlib     \
            --enable-pkgconfig  \
            --enable-udev_sync  &amp;&amp;
make</userinput></screen>

    <para>
      The check command must be run as the <systemitem
      class="username">root</systemitem> user.  Also the tests are known to
      hang if at least one partition on a hard drive is not set up as a Linux
      LVM partition (type 8e00). To test the results, issue: <command>make
      check</command> as the <systemitem class="username">root</systemitem>
      user. The test timings are very dependent on the speed of the disk(s),
      and on the number of enabled kernel options.
    </para>

    <para>
      Now, as the <systemitem class="username">root</systemitem> user:
    </para>

<screen role="root"><userinput>make install</userinput></screen>

  </sect2>

  <sect2 role="commands">
    <title>Command Explanations</title>

    <para>
      <parameter>--enable-applib</parameter>: This switch enables
      building of the shared application library.
    </para>

    <para>
      <parameter>--enable-cmdlib</parameter>: This switch enables
      building of the shared command library. It is required
      when building the event daemon.
    </para>

    <para>
      <parameter>--enable-pkgconfig</parameter>: This switch enables
      installation of <command>pkg-config</command> support files.
    </para>

    <para>
     <parameter>--enable-udev_sync</parameter>: This switch enables
      synchronisation with <application>Udev</application> processing.
    </para>

    <para>
      <option>--enable-dmeventd</option>: This switch enables
      building of the <application>Device Mapper</application>
      event daemon.
    </para>

  </sect2>

  <sect2 role="content">
    <title>Contents</title>

    <segmentedlist>
      <segtitle>Installed Programs</segtitle>
      <segtitle>Installed Libraries</segtitle>
      <segtitle>Installed Directories</segtitle>

      <seglistitem>
        <seg>
          blkdeactivate, dmeventd (optional), dmsetup, fsadm, lvm, lvmconf,
          lvmdump, vgimportclone. There are also numerous symbolic links to
          lvm that implement specific functionalities
        </seg>
        <seg>
          libdevmapper.so, liblvm2app.so and liblvm2cmd.so; optional:
          libdevmapper-event.so, libdevmapper-event-lvm2.so,
          libdevmapper-event-lvm2mirror.so, libdevmapper-event-lvm2snapshot.so,
          libdevmapper-event-lvm2raid.so, and libdevmapper-event-lvm2thin.so
        </seg>
        <seg>
          /etc/lvm and
          /lib/device-mapper (optional)
        </seg>
      </seglistitem>
    </segmentedlist>

    <variablelist>
      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
      <?dbfo list-presentation="list"?>

     <?dbhtml list-presentation="table"?>

      <varlistentry id="blkdeactivate">
        <term><command>blkdeactivate</command></term>
        <listitem>
          <para>
            utility to deactivate block device.
          </para>
          <indexterm zone="lvm2 blkdeactivate">
            <primary sortas="b-blkdeactivate">blkdeactivate</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="dmeventd">
        <term><command>dmeventd</command></term>
        <listitem>
          <para>
            (optional) is the Device Mapper event daemon.
          </para>
          <indexterm zone="lvm2 dmeventd">
            <primary sortas="b-dmeventd">dmeventd</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="dmsetup">
        <term><command>dmsetup</command></term>
        <listitem>
          <para>
            is a low level logical volume management tool.
          </para>
          <indexterm zone="lvm2 dmsetup">
            <primary sortas="b-dmsetup">dmsetup</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="fsadm">
        <term><command>fsadm</command></term>
        <listitem>
          <para>
            is an utility used to resize or check filesystem on a device.
          </para>
          <indexterm zone="lvm2 fsadm">
            <primary sortas="b-fsadm">fsadm</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="lvm">
        <term><command>lvm</command></term>
        <listitem>
          <para>
            provides the command-line tools for <application>LVM2</application>.
            Commands are implemented via sympolic links to this program to
            manage physical devices (pv*), volume groups (vg*) and logical
            volumes (lv*).
          </para>
          <indexterm zone="lvm2 lvm">
            <primary sortas="b-lvm">lvm</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="lvmconf">
        <term><command>lvmconf</command></term>
        <listitem>
          <para>
            is a script that modifies the locking configuration in
            the <application>LVM2</application> configuration file.
          </para>
          <indexterm zone="lvm2 lvmconf">
            <primary sortas="b-lvmconf">lvmconf</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="lvmdump">
        <term><command>lvmdump</command></term>
        <listitem>
          <para>
            is a tool used to dump various information concerning
            <application>LVM2</application>.
          </para>
          <indexterm zone="lvm2 lvmdump">
            <primary sortas="b-lvmdump">lvmdump</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="vgimportclone">
        <term><command>vgimportclone</command></term>
        <listitem>
          <para>
            is used to import a duplicated VG (e.g. hardware snapshot).
          </para>
          <indexterm zone="lvm2 vgimportclone">
            <primary sortas="b-vgimportclone">vgimportclone</primary>
          </indexterm>
        </listitem>
      </varlistentry>

      <varlistentry id="libdevmapper">
        <term><filename class='libraryfile'>libdevmapper.so</filename></term>
        <listitem>
          <para>
            contains the <application>Device Mapper</application> API
            functions.
          </para>
          <indexterm zone="lvm2 libdevmapper">
            <primary sortas="c-libdevmapper">libdevmapper.so</primary>
          </indexterm>
        </listitem>
      </varlistentry>

    </variablelist>

  </sect2>

</sect1>
