LVM in Linux: logical volumes (pvcreate, vgcreate, lvcreate)
Updated November 1, 2026
LVM pools physical disks together and carves logical volumes out of the pool that are easy to resize.
Common cases
sudo pvcreate /dev/sdb /dev/sdc # mark disks as physical volumes
sudo vgcreate data /dev/sdb /dev/sdc # pool them into a group 'data'
sudo lvcreate -L 50G -n vol1 data # carve a 50 GB volume vol1
sudo lvextend -L +20G /dev/data/vol1 # grow the volume by 20 GB
lsblk # see the volumes as a tree
sudo vgs; sudo lvs # summaries of groups and volumesSample output
$ df -h /mnt/vol1 | tail -1
/dev/mapper/data-vol1 672M 24K 623M 1% /mnt/vol1
$ sudo lvextend -L +200M /dev/data/vol1
Size of logical volume data/vol1 changed from 700.00 MiB (175 extents) to 900.00 MiB (225 extents).
Logical volume data/vol1 successfully resized.
$ df -h /mnt/vol1 | tail -1
/dev/mapper/data-vol1 672M 24K 623M 1% /mnt/vol1
$ sudo resize2fs /dev/data/vol1
...
The filesystem on /dev/data/vol1 is now 230400 (4k) blocks long.
$ df -h /mnt/vol1 | tail -1
/dev/mapper/data-vol1 868M 24K 814M 1% /mnt/vol1How it works: the three LVM layers
Without LVM a partition is tied to one disk and hard to grow. LVM adds three layers: physical volumes (PV) are the disks themselves, the volume group (VG) is a shared pool of them, and logical volumes (LV) are what you format and mount. The main win is flexibility: a volume can grow while the group has free space, often on a running system. After
lvextendyou still need to grow the filesystem itself (resize2fs). On top of LVM you can also take snapshots for backups.
Common mistakes
-L 500M and -L +500M are different things: without the plus it is a new absolute size, with the plus it is an increment. On a 700M volume, lvextend -L 500M /dev/data/vol1 answers New size given (125 extents) not larger than existing size (175 extents) and does nothing. lvreduce -L 500M does act: it asks THIS MAY DESTROY YOUR DATA (filesystem etc.) and on 'y' it cuts the volume under a filesystem that nobody shrank first.
A volume group has a fixed size. lvcreate -L 900M -n vol2 data in a group with 79 extents left answers Volume group "data" has insufficient free space (79 extents): 225 required.. Later, with 29 extents left, lvextend -L +5G answers Insufficient free space: 1280 extents needed, but only 29 available. What is left in a group shows up as the VFree column of vgs. You add to it only with a new disk: pvcreate /dev/sdd, then vgextend data /dev/sdd.
A logical volume answers to two names. You type /dev/data/vol1, while df and lsblk print /dev/mapper/data-vol1: a symbolic link and its target, one device. So looking for the volume in df -h output by the name you typed finds nothing; look for the mount point or for data-vol1. Both names work in /etc/fstab. /dev/sdb does not: once a disk joins a group, you reach it only through the LVM layer.
In the book
This topic is covered in full in the chapter Advanced storage.