Use it when configuring, checking or troubleshooting Copy-on-Write in Filesystems.
Copy-on-Write
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.
1. Copy-on-write writes new blocks instead of overwriting.
2. Enables snapshots and consistency.
3. Fragmentation for random-write workloads (VMs, DBs).
4. Space accounting is shared.
5. Disable COW per file on Btrfs for VMs (chattr +C).
write → new block → pointer update → old block kept if referenced
Context & applicabilityCommon mistakes · platform/version boundaries
Successful CoW update shows the filesystem preserved its update semantics for that change; it does not create an independent backup or guarantee optimal performance.
Suspicious evidence: severe fragmentation, snapshot-driven space growth, high write amplification, ENOSPC despite apparent free space or CoW is disabled without workload-specific justification.
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
logical overwrite → allocate new block/extent → write data/metadata → verify/update references → old block becomes reclaimable
Healthy evidence: allocation has headroom, CoW metadata is consistent, snapshot/space growth is understood and workload latency remains within expectations.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- CoW ≠ backup.
- CoW snapshot ≠ independent copy.
- Atomic metadata update ≠ application transaction consistency.
- CoW ≠ guaranteed lower write amplification.
btrfs filesystem du <dir>— shared extentszfs list -o name,used,refer— COW snapshot spacecp --reflink=always a b— reflink copy
ReferenceImportant terms & boundaries2 sections · depth on demand
Namespace and consistency
Successful CoW update shows the filesystem preserved its update semantics for that change; it does not create an independent backup or guarantee optimal performance.
In depth
Copy-on-write filesystems (ZFS, Btrfs, ReFS with block cloning, WAFL) never overwrite live blocks: changes go to new locations, then metadata pointers are updated atomically up to the root. The old tree stays valid until the new one is committed.
Consequences: snapshots and clones are almost free, crash consistency needs no journal replay, and checksums can cover everything. Costs: fragmentation for files with random overwrites (databases, VM images), and the need for free space — CoW filesystems slow down sharply when nearly full. For databases on Btrfs, chattr +C on an empty directory disables CoW for new files there.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Filesystems → Copy-on-Write. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.kernel.org/filesystems/index.html · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Filesystems → Copy-on-Write filesystem map
Fast namespace, metadata, capacity, attachment and verification boundaries for Filesystems → Copy-on-Write.
| 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 |