Pcornel
Storage · ZFS

Snapshot

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

Back to the Topic

Answer

A ZFS snapshot is an instant, read-only copy of a dataset at one point in time. It uses almost no space at first, but grows as the live data changes because the old blocks are kept. Snapshots live in the same pool, so they are not a backup on their own.

Remember

  • Snapshot ≠ backup.
  • Snapshot creation ≠ application-consistent state unless the application/guest was coordinated appropriately.
  • Snapshot reported size ≠ total logical size of the dataset state.
  • Deleting a snapshot ≠ guaranteed immediate release equal to its reported referenced/used value because blocks may be shared with other snapshots/clones.

First checks

  • zfs list -t snapshot -o name,used,creation — snapshots
  • zfs snapshot <ds>@<name> — create
  • zfs destroy <ds>@<name> — delete

Verify in this order

dataset → snapshot (COW) → unique blocks retained

Where it usually breaks

First mismatch in member media → metadata/layout → allocation/placement → redundancy/recovery → logical object → consumer; preserve identity/pre-state before mutation.

ZFS → Snapshot ZFS map

ZFS boundaryWhat to verifyProof limit
Identity / topologyPool GUID/name, dataset/zvol, top-level vdev class, leaf-device identity and effective propertiesObject presence alone does not prove integrity, performance or recovery
Capacity / protectionPool free space, quotas/reservations, snapshot retention, redundancy and active scrub/resilver stateFree space or ONLINE state at one layer does not prove end-to-end health
Failure boundaryA snapshot proves ZFS preserved a point-in-time block-reference state in the same pool; it does not prove off-pool independence, application consistency or successful restore.Correlate ZFS evidence with both workload and lower device/path evidence
AcceptanceHealthy evidence: snapshot exists at intended point, capacity impact is controlled, dependencies are known, and recovery tests can read the expected data/state.Close only after original workload plus checksum/read-back/recovery verification succeeds

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

Confirmation

Confirm action

Continue?