Interview Prep/Linux/Disk space, inodes and filesystems

`lvextend` fails with `Insufficient free space: 2560 extents needed, but only 0 available`.

BeginnerTroubleshootingDisk space, inodes and filesystems
Answer

Likely causes → The volume group has no free extents.

Diagnose →

sudo vgs
sudo pvs
lsblk

Fix → Add a disk (pvcreate, vgextend), or grow the existing PV after enlarging the disk (growpart then pvresize /dev/sda2), then retry lvextend -r.

Prevent → Leave headroom in the VG and alert on vg_free.

All Linux questions Roadmap: Linux

More on Disk space, inodes and filesystems