Interview Prep/Linux/Storage & Memory

What are LVM snapshots and their limitations?

AdvancedConceptStorage & Memory
Answer

A classic LVM snapshot is a copy-on-write LV: when blocks in the origin change, the old blocks are copied into the snapshot's space first.

sudo lvcreate -s -n lvapp_snap -L 20G /dev/vgdata/lvapp

Limitations: every write to the origin costs an extra copy (performance hit), and if the snapshot's space fills up it becomes invalid. Thin-provisioned LVs give cheaper snapshots. A snapshot is not a backup: it lives on the same disks. For XFS, mount the snapshot with -o nouuid.

All Linux questions Roadmap: Linux

More on Storage & Memory