Linux for Developers Course
Linux for Developers
/
Advanced

Logical Volume Manager (LVM)

Definition

A storage virtualization system that provides a higher-level view of disk storage. It allows administrators to resize, span, and manage disk partitions dynamically without taking the system offline.

Explain Like I'm New

Liquid hard drives. Instead of a hard drive being a rigid physical box, LVM pools multiple hard drives together into a massive 'water tank' of storage, and you can dynamically scoop out 'volumes' of any size.

Real World Example

A database server's `/data` partition fills up. Without LVM, you have to buy a new server, copy data, and endure 5 hours of downtime. With LVM, you plug a new hard drive in, add it to the LVM pool, and type `lvextend`. The partition instantly grows by 1TB with zero downtime.

Common Use Cases

  • •Enterprise storage management
  • •Zero-downtime volume resizing
  • •Creating snapshot backups

Interview Questions

basic

  • Is LVM a file system (like ext4 or NTFS)?

intermediate

  • What are the three core layers of LVM architecture?

Flash Cards

Question

Is it a filesystem?

Click to reveal answer
Answer

No. It is a block storage manager. You still have to format an LVM volume with a file system like ext4 before you can put files on it.

Question

Three layers?

Click to reveal answer
Answer

1) Physical Volumes (the actual hard drives). 2) Volume Groups (the massive pool combining the drives). 3) Logical Volumes (the virtual partitions sliced out of the pool for the OS to use).