Introduction to Logical Volumes in Linux
Introduction to Logical Volumes in linux
Suyash Singh
Posted by Suyash Singh
on October 21, 2022

Logical volume is the most important technology I know about in linux. Back in college, I spent countless hours moving data around different physical drives when my HDD stopped working properly. The lessons I learnt from the misery of safely moving massive data around different drives made me understand the utility of logical volumes.

Crudely speaking, logical volumes is linux’s way of abstracting physical devices from the actual partitions the various components of our OS might use — between the actual storage devices and the virtual partitions/logical volumes sits the volume group which abstracts away the actual physical devices. Under the hood, LVM is built on top of kernel’s device mapper functionality.

Technically speaking, Logical Volume Manager (LVM) is a device mapper framework that provides logical volume management for the Linux kernel. New physical volume devices can join in or leave the volume groups without affecting the functioning state of the mounted logical volume partitions.

Essential terminology needed to get familiar with LVMs

  • Physical Volumes (PV): Actual physical storage devices — SATA disks, SSDs etc.
  • Volume Groups (VG): Storage containers abstracting the PVs
  • Logical Volumes (LV): Virtual partitions created on top of VGs
  • Physical extent (PE): Smallest unit of storage that can be extracted and allocated from PV to LV

Potential Applications

The applications are endless. A few of them would be:

  • Managing space in QEMU KVM virtual machine images
  • Managing LUKS encrypted devices
  • Managing any linux oriented partitions

Further reading