Lesson 3.61: Growing a volume with LVM
Disks fill up, and on a server you want to add space without moving data or stopping the service. LVM (Logical Volume Manager) puts a layer between disks and file systems: disks become physical volumes, they are pooled into a volume group, and logical volumes are cut from the pool. Adding a disk to the pool and growing a volume and its file system takes three commands, while the file system stays mounted. In the lab /srv/data is full; you read the LVM layout, add a new 10 GB disk to the pool, grow the volume and the ext4 file system online, and keep some space free on purpose.
16 min
You will learn to
- Explain physical volumes, volume groups and logical volumes
- Read pvs, vgs and lvs
- Add a disk to a volume group
- Grow a logical volume and its file system online
- Keep free space in the pool for later
Key terms
- Physical volume (PV)
- A disk or partition prepared for LVM with pvcreate.
- Volume group (VG)
- A pool made of one or more physical volumes.
- Logical volume (LV)
- A block device cut from a volume group; it holds a file system.
- Extent
- The unit LVM allocates in, 4 MiB by default.
- Online resize
- Growing a mounted file system without unmounting it.
← Spaces in paths and file names · All lessons · Immutable and append-only files →