Pcornel
Linux · LVM

Logical Volume (LV)

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

Back to the Topic

Answer

A logical volume (LV) is a block device carved from a VG (/dev/<vg>/<lv>), holding a filesystem or swap. LVs can be resized, moved between PVs and snapshotted.

Remember

Create with lvcreate -n <name> -L <size> <vg> (or -l 100%FREE), then make a filesystem. Use the /dev/mapper or /dev/<vg>/<lv> path, or UUID, in fstab.

First checks

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

Verify in this order

VG free space → lvcreate → device-mapper device → filesystem → mount

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=2762

Confirmation

Confirm action

Continue?