Copy-on-Write Snapshot
Cheat sheet · https://pcornel.dk/topic.php?topic=4220
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 fillvssadmin list shadowstorage— VSS diff areazfs 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 boundary | What to verify | Proof limit |
|---|---|---|
| Identity / state | Correct object, source/target or snapshot point and same-window timestamps | Inventory alone does not prove data correctness |
| Dependency path | Snapshot mapping/chain, active write target, capacity and backing storage | A healthy adjacent component is not end-to-end proof |
| Failure boundary | A 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 |
| Acceptance | Healthy 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