Suppose a service changes just 20 bytes in a large database file. A traditional file system may overwrite the existing block and update the related metadata.
A copy-on-write file system takes a different approach:
The old block is not modified while it remains part of the current persistent state.
In a copy-on-write, or CoW, file system, an update creates a new version of changed blocks and publishes that version through new references instead of overwriting the old reachable version in place.
This principle can provide crash-consistent tree updates, efficient snapshots, and block sharing. It also introduces extra allocation work, reference tracking, fragmentation, and write amplification.
This chapter follows copy-on-write updates through rooted metadata trees and commit publication, then examines recovery, snapshots, reflinks, shared-block ownership, checksums, reclamation, fragmentation, and write amplification.