LVM2-2.02.130

Introduction to LVM2

The LVM2 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.

This package is known to build and work properly using an LFS-7.8 platform.

Package Information

LVM2 Dependencies

Optional

mdadm-3.3.4 (for checks) and xfsprogs-4.2.0 (for checks)

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/lvm2

Kernel Configuration

Enable the following options in the kernel configuration and recompile the kernel:

[Note]

Note

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.

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

Installation of LVM2

Install LVM2 by running the following commands:

./configure --prefix=/usr       \
            --exec-prefix=      \
            --with-confdir=/etc \
            --enable-applib     \
            --enable-cmdlib     \
            --enable-pkgconfig  \
            --enable-udev_sync  &&
make

To test the results, issue: make -k check as the root user. At least one partition on a hard drive must be set up as a Linux LVM partition (type 8e00). The test timings are very dependent on the speed of the disk(s), and on the number of enabled kernel options. A small number of tests may fail.

Now, as the root user:

make install

Command Explanations

--enable-applib: This switch enables building of the shared application library.

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

--enable-pkgconfig: This switch enables installation of pkg-config support files.

--enable-udev_sync: This switch enables synchronisation with Udev processing.

--enable-dmeventd: This switch enables building of the Device Mapper event daemon.

Contents

Installed Programs: blkdeactivate, dmeventd (optional), dmsetup, fsadm, lvm, lvmconf, lvmdump, and vgimportclone. There are also numerous symbolic links to lvm that implement specific functionalities
Installed Libraries: 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
Installed Directories: /etc/lvm and /lib/device-mapper (optional)

Short Descriptions

blkdeactivate

utility to deactivate block device.

dmeventd

(optional) is the Device Mapper event daemon.

dmsetup

is a low level logical volume management tool.

fsadm

is a utility used to resize or check filesystem on a device.

lvm

provides the command-line tools for LVM2. Commands are implemented via sympolic links to this program to manage physical devices (pv*), volume groups (vg*) and logical volumes (lv*).

lvmconf

is a script that modifies the locking configuration in the LVM2 configuration file.

lvmdump

is a tool used to dump various information concerning LVM2.

vgimportclone

is used to import a duplicated VG (e.g. hardware snapshot).

libdevmapper.so

contains the Device Mapper API functions.

Last updated on 2015-09-20 15:38:20 -0700