Snapshots, rollback, and final evidence
Plan snapshot work around capacity risk and restore path.
lvs -a -o +devices
30 min read, 40 min lab
operator
Snapshots are not backups. They depend on available space and can fail or become useless when full. A useful snapshot plan names origin, snapshot, expected change window, capacity monitoring, and restore sequence.
Before a risky package upgrade, you need a snapshot plan and a rollback packet.
Worked command
$ lvs -a -o +devices$ lvcreate -s -n var-pre-upgrade -L 5G /dev/vg0/var$ lvs -a$ lvconvert --merge /dev/vg0/var-pre-upgrade
Do not create snapshots without monitoring free space and documenting restore steps.
Treat snapshots as one control in a rollback plan, not the whole backup strategy.
Before a risky upgrade you take an LVM snapshot. Why can a full snapshot make rollback impossible?
Show the answer
Correct: A. A snapshot needs free space for changed blocks; once exhausted it is invalidated and cannot merge back
A snapshot stores only changed blocks in allocated space; if writes exhaust that space it is dropped and lvconvert --merge has nothing valid to restore from. The idea that a snapshot is a complete backup is the trap, snapshots are one rollback control, not the backup.
Practice checklist
- Use sample output or a disposable LVM lab.
- Identify origin and snapshot names.
- Write the restore sequence before any simulated action.
Deliverable evidence
- Snapshot plan with origin, size, monitoring, and rollback path.
shows: How a mount point sits on a filesystem, on an LV stacked through VG and PV onto a block device, plus where growth and snapshots act.
does not prove: It is a schematic of the relationships, not evidence of your host's actual layout — only lsblk, findmnt, blkid, and lvs output prove that.
Commit these to memory, then drill them until recall is automatic.
cue Command to merge a snapshot back into its origin to roll back
show recall target
lvconvert --merge /dev/vg0/<snapshot>