LVM (Logical Volume Manager) is a device-mapper framework in the Linux kernel that decouples physical storage devices from the block devices presented to the OS, creating a flexible abstraction layer of Physical Volumes, Volume Groups, and Logical Volumes. It solves the classic problem of static partitioning by enabling online resize, multi-disk pooling, snapshots, thin provisioning, and RAID β all without rebooting or unmounting most filesystems. The critical mental model is the three-layer stack: raw disks become Physical Volumes (PVs), PVs are pooled into Volume Groups (VGs), and VGs are sliced into Logical Volumes (LVs) that act like ordinary block devices but with runtime flexibility unavailable to fixed partitions.
What This Cheat Sheet Covers
This topic spans 19 focused tables and 121 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Core Concepts and Architecture
LVM's power comes entirely from its three-layer abstraction. Understanding PV, VG, LV, and the extent model β before touching any command β is the prerequisite that prevents the most common mistakes.
| Concept | Example | Description |
|---|---|---|
/dev/sdb, /dev/sdb1, /dev/md0 | β’ A block device (disk, partition, RAID array, or loop device) initialized with an LVM header β’ the raw material for all LVM operations | |
vgcreate myvg /dev/sdb /dev/sdc | A pool of one or more PVs that forms a single unified storage namespace from which LVs are carved. | |
/dev/myvg/data or /dev/mapper/myvg-data | β’ A virtual block device carved from a VG β’ used like a normal partition (formatted, mounted, encrypted). Accessible at both path forms | |
Default 4 MiB; set with vgcreate -s 8M | β’ The smallest allocatable unit within a PV β’ all extents in a VG share the same size β’ LVs are built from contiguous or scattered PE allocations |