
Installation
4.2. Logical Volume Manager (LVM)
Logical Volume Manger, or LVM, allows administrators to create logical volumes out of one or multiple
physical hard disks. LVM volumes can be created on both software RAID partitions and standard partitions
residing on a single disk. Volumes can also be extended, giving greater flexibility to systems as requirements
change.
4.2.1. Overview
A side effect of LVM's power and flexibility is a greater degree of complication. Before diving into the LVM
installation process, it is best to get familiar with some terms.
• Physical Volume (PV): physical hard disk, disk partition or software RAID partition formatted as LVM PV.
• Volume Group (VG): is made from one or more physical volumes. A VG can can be extended by adding
more PVs. A VG is like a virtual disk drive, from which one or more logical volumes are carved.
• Logical Volume (LV): is similar to a partition in a non-LVM system. A LV is formatted with the desired file
system (EXT3, XFS, JFS, etc), it is then available for mounting and data storage.
4.2.2. Installation
As an example this section covers installing Ubuntu Server Edition with /srv mounted on a LVM volume.
During the initial install only one Physical Volume (PV) will be part of the Volume Group (VG). Another PV
will be added after install to demonstrate how a VG can be extended.
There are several installation options for LVM, "Guided - use the entire disk and setup LVM" which will also
allow you to assign a portion of the available space to LVM, "Guided - use entire and setup encrypted LVM",
or Manually setup the partitions and configure LVM. At this time the only way to configure a system with
both LVM and standard partitions, during installation, is to use the Manual approach.
1. Follow the installation steps until you get to the Partition disks step, then:
2. At the "Partition Disks screen choose "Manual".
3. Select the hard disk and on the next screen choose "yes" to "Create a new empty partition table on this
device".
4. Next, create standard /boot, swap, and / partitions with whichever filesystem you prefer.
5. For the LVM /srv, create a new Logical partition. Then change "Use as" to "physical volume for LVM"
then "Done setting up the partition".
6. Now select "Configure the Logical Volume Manager" at the top, and choose "Yes" to write the changes
to disk.
7. For the "LVM configuration action" on the next screen, choose "Create volume group". Enter a name
for the VG such as vg01, or something more descriptive. After entering a name, select the partition
configured for LVM, and choose "Continue".
8. Back at the "LVM configuration action" screen, select "Create logical volume". Select the newly created
volume group, and enter a name for the new LV, for example srv since that is the intended mount point.
14