Copy-on-Write
Cheat sheet · https://pcornel.dk/topic.php?topic=3960
Answer
CoW filesystems allocate new extents for changed content rather than overwriting referenced blocks in place. This enables snapshots and checksummed tree updates but can increase fragmentation, metadata work and write amplification depending on workload.
Remember
- CoW ≠ backup.
- CoW snapshot ≠ independent copy.
- Atomic metadata update ≠ application transaction consistency.
- CoW ≠ guaranteed lower write amplification.
First checks
btrfs filesystem du <dir>— shared extentszfs list -o name,used,refer— COW snapshot spacecp --reflink=always a b— reflink copy
Verify in this order
write → new block → pointer update → old block kept if referenced
Where it usually breaks
First mismatch in media/provider → controller/pool → logical object → path/protocol → filesystem/share/object namespace → consumer workload; preserve identity/pre-state before mutation.
Filesystems → Copy-on-Write filesystem map
| Filesystem boundary | What to verify | Proof limit |
|---|---|---|
| Identity / attachment | Filesystem type, source/backing object, mount/attachment target and effective options | Presence or mount state alone does not prove consistency or lower-layer health |
| Capacity / metadata | Data space, metadata/inodes, quotas/reservations and filesystem state | Free bytes at one layer do not prove allocation can succeed end to end |
| Failure boundary | Successful CoW update proves the filesystem preserved its update semantics for that change; it does not create an independent backup or guarantee optimal performance. | Correlate filesystem evidence with the backing volume/path/backend before repair |
| Acceptance | Healthy evidence: allocation has headroom, CoW metadata is consistent, snapshot/space growth is understood and workload latency remains within expectations. | Close only after the original path/workload and read-back check succeeds |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3960