Operations 11 min read

Master Dynamic Disk Management with Linux LVM: A Complete Guide

This article explains the limitations of traditional disk partitioning, introduces Linux's Logical Volume Manager (LVM), details its core concepts and workflow, and shows step‑by‑step how to create, extend, and use logical volumes for flexible storage management.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Master Dynamic Disk Management with Linux LVM: A Complete Guide

1. Traditional Disk Management In Linux, disks are usually managed with MBR partitions that are formatted and mounted, similar to Windows. When a partition runs out of space, extending it is difficult and may require third‑party tools that risk data loss. Adding a new disk creates a separate filesystem, which is acceptable for personal PCs but problematic for production servers that require 24/7 availability.

Copying data to a new partition often requires unmounting the old one, which is infeasible for critical services, and the process can be time‑consuming for large datasets. These constraints highlight the need for dynamic disk management, which LVM provides.

2. LVM Disk Management LVM (Logical Volume Manager) abstracts physical disks into logical volumes, allowing dynamic resizing without data loss. It works across Linux and other Unix‑like systems, and similar concepts exist for Windows.

The core idea is to encapsulate physical disks (PV) into a volume group (VG) and then allocate logical volumes (LV) from that pool. Applications see LVs as regular block devices, unaware of the underlying physical changes.

3. LVM Principles Four basic concepts are essential:

PE (Physical Extent)

PV (Physical Volume)

VG (Volume Group)

LV (Logical Volume)

Using LVM, you create a PV by formatting a disk, which is divided into PE units (default 4 MiB). Multiple PVs are combined into a VG, forming a pool of PE. From this pool you create LVs, each sized as an integer multiple of PE.

Format disks as PVs – each disk is split into PE units.

Create a VG – combine one or more PVs into a volume group, which holds all PE.

Create LVs from the VG – allocate the desired number of PE to each LV; size must be a multiple of PE.

Format and mount the LV – treat the LV like a regular partition (e.g., mkfs, mount).

After creation, LVs appear under /dev (e.g., /dev/vgname/lvname). Adding a new physical disk simply involves formatting it as a PV, adding it to the existing VG, and then extending the LV by allocating additional PE, all without unmounting services.

Summary of LVM workflow

Physical disks → PVs (split into PE).

PV(s) → VG (PE pool).

VG → LV (size = integer multiple of PE, may span multiple PVs).

LV → format → mount.

LV can be expanded or reduced by adjusting the number of PE, preserving existing data.

To expand an LV, add a new disk (e.g., sdc), format it as a PV, add it to the VG, and then increase the LV’s PE count, provided the VG has sufficient free space.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxLVMdisk-managementLogical Volume
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.