Pcornel
Storage · Snapshots

Copy-on-Write Snapshot

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

Back to the Topic

Answer

On the first post-snapshot write to an existing location, the original contents are copied into snapshot-preserved space before the new data replaces the active block. Reads choose the active or preserved copy according to snapshot mapping.

Remember

  • Copy-on-write ≠ redirect-on-write.
  • First-write overhead can be higher than later overwrites.
  • Snapshot reserve exhaustion can invalidate protection.
  • CoW snapshot ≠ independent backup.

First checks

  • lvs -o lv_name,origin,data_percent — classic LVM COW fill
  • vssadmin list shadowstorage — VSS diff area
  • zfs list -t snapshot — ZFS (COW filesystem)

Commands

lvs -o lv_name,data_percent

Verify in this order

write → copy old block to snapshot area → overwrite

Where it usually breaks

First mismatch in source consistency → capture/journal → transport → repository/replica → catalog/checkpoint → restore/failover read-back; preserve identity/pre-state before mutation.

Snapshots → Copy-on-Write Snapshot proof map

Storage boundaryWhat to verifyProof limit
Identity / stateCorrect object, source/target or snapshot point and same-window timestampsInventory alone does not prove data correctness
Dependency pathSnapshot mapping/chain, active write target, capacity and backing storageA healthy adjacent component is not end-to-end proof
Failure boundaryA valid CoW mapping proves the original version was preserved for that overwritten region; it does not prove every block, application transaction or backend device is healthy.Correlate evidence for the same operation and time window
AcceptanceHealthy evidence for Copy-on-Write Snapshot: the expected point-in-time mapping and dependency chain are intact, required backing data is readable, and the intended snapshot lifecycle action completes with correct current-data read-back.Close only after original read-back/recovery test and protection-state verification

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

Confirmation

Confirm action

Continue?