What Is Logical Volume Management (LVM) in Linux?

Logical Volume Management (LVM) is a storage management framework for Linux that provides a flexible abstraction layer between physical storage hardware and the operating system's filesystems. Unlike traditional partition-based storage, LVM allows system administrators to aggregate multiple physical drives into unified storage pools, allocate dynamic partitions that can span across disks, resize storage volumes on the fly without downtime, and create point-in-time snapshots for backups. This article explains the fundamental architecture of LVM, details its core components, outlines its primary operational advantages, and demonstrates the basic workflow for managing storage using LVM.

The Architecture of LVM

Traditional disk management ties filesystems directly to fixed partition tables (such as MBR or GPT) on a single physical drive. LVM eliminates these physical constraints by organizing storage into three hierarchical layers:

  1. Physical Volumes (PV): These are the raw block devices—such as an entire hard drive, an SSD, or a standard disk partition (e.g., /dev/sdb or /dev/nvme0n1p1). Initializing a disk as a PV marks it for use within the LVM subsystem by adding an LVM header.
  2. Volume Groups (VG): A Volume Group acts as a single, unified pool of storage created by combining one or more Physical Volumes. Inside the VG, disk space is divided into fixed-size chunks known as Physical Extents (PEs), typically 4MB by default. The total capacity of a VG is the sum of the capacities of its member PVs.
  3. Logical Volumes (LV): Logical Volumes are the functional equivalent of traditional disk partitions, carved out of the Volume Group. An LV consists of an allocation of Physical Extents from the VG. Filesystems (such as ext4 or XFS) are formatted directly onto Logical Volumes, which are then mounted into the Linux directory tree.

Key Advantages of LVM

Basic LVM Command Workflow

Managing storage through LVM follows a sequential path through its three architectural layers:

1. Initializing Physical Volumes

To prepare raw disks or partitions for LVM:

pvcreate /dev/sdb /dev/sdc

To verify the initialized devices:

pvs
# or for detailed output:
pvdisplay

2. Creating a Volume Group

To combine the Physical Volumes into a unified pool named vg_data:

vgcreate vg_data /dev/sdb /dev/sdc

To check the status and available space of the pool:

vgs
# or for detailed output:
vgdisplay

3. Creating and Formatting a Logical Volume

To carve out a 50 GB Logical Volume named lv_storage from the vg_data group:

lvcreate -L 50G -n lv_storage vg_data

The volume is then accessible as a block device at /dev/vg_data/lv_storage or /dev/mapper/vg_data-lv_storage. It can be formatted and mounted like any standard partition:

mkfs.ext4 /dev/vg_data/lv_storage
mount /dev/vg_data/lv_storage /mnt/data

4. Extending a Logical Volume

If the filesystem requires more space, the volume and its filesystem can be extended on the fly:

# Extend the LV by 20GB and resize the underlying filesystem in a single command
lvextend -L +20G -r /dev/vg_data/lv_storage

LVM simplifies enterprise and modern Linux storage by decoupling filesystems from rigid hardware geometry, making storage allocation adaptable to changing capacity requirements.