4 Working With Logical Volume Manager

Logical Volume Manager (LVM) enables you to manage multiple physical volumes and configure mirroring and striping of logical volumes. Through its use of the device mapper (DM) to create an abstraction layer, LVM provides you the capability to configure physical and logical volumes. With LVM, you obtain data redundancy and increased I/O performance.

In LVM, you first create volume groups from physical volumes. Physical volumes are storage devices such as disk array LUNs, software, or hardware RAID devices, hard drives, and disk partitions. Within these volume groups, you configure logical volumes. Logical volumes become the foundation for configuring software RAID, encryption, and other storage features.

Create file systems on logical volumes and mount the logical volume devices in the same way as you would a physical device. If a file system on a logical volume becomes full, you can increase the volume's capacity by using free space in the volume group. You can grow a file system if the file system supports that capability. You can add physical storage devices to a volume group to further increase its capacity.

LVM is non disruptive and transparent to users. Thus, management tasks such as increasing logical volume sizes, changing their layouts dynamically, or reconfiguring physical volumes don't require any system down time.

Before setting up logical volumes on the system, complete the following requirements:

  • Backup the data on the devices assigned for the physical volume.

  • Unmount those devices because you can't create a logical volume on a mounted device.

Configuring logical volumes with LVM involves the following tasks which you perform sequentially.

  1. Creating physical volumes from selected storage devices.

  2. Creating a volume group from physical volumes.

  3. Configuring logical volumes over the volume group.

  4. As needed, creating snapshots of logical volumes.