Pcornel
Linux · LVM

Extend Logical Volume

Cheat sheet · https://pcornel.dk/topic.php?topic=2763

Back to the Topic

Answer

Extending a logical volume adds space from the VG to the LV and then grows the filesystem on it.

Remember

Use lvextend -r to grow the filesystem in the same step. Both ext4 and XFS grow online. Make sure the VG has free space (or add a PV first).

First checks

  • pvs — physical volumes
  • vgs — volume groups and free space
  • lvs -a -o +devices — logical volumes and their devices
  • lsblk — stack view

Commands

vgs
lvs -o+pool_lv
df -h

Verify in this order

VG free extents → lvextend → LV larger → filesystem grown (-r) → space visible in df

Where it usually breaks

First mismatch in hardware/block device → kernel driver/mapper/RAID/LVM → filesystem → mount namespace/options → path permissions/MAC → consumer I/O; preserve identity/native diagnostic/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2763

Confirmation

Confirm action

Continue?