Updated on 2023-06-21 GMT+08:00

Overview

LVM is short for Logical Volume Manager, which is a mechanism used for managing disk partitions in Linux.

By adding a logical layer between EVS disks and file systems, LVM abstracts EVS disk partitions into logical volumes that can then be flexibly partitioned as needed for upper layer file systems. Figure 1 shows the LVM architecture.
Figure 1 LVM architecture

The process of managing EVS disks using LVM is as follows:

  1. Create physical volumes using EVS disks.
  2. Create a volume group for the physical volumes.
  3. Create logical volumes in the volume group.
  4. Create file systems on logical volumes.

With LVM, a file system can be created on top of multiple EVS disks and can be easily resized as needed. This way, the file system size is no longer limited by the underlying disk capacity.

For example, you can expand the size of an ext4 file system in either of the following ways:

  • Extend the logical volume directly if the unallocated space in the volume group is sufficient.
  • Extend the volume group and then logical volumes if the unallocated space in a volume group is insufficient.