What a Snapshot Actually Is
On an overwrite filesystem, a "snapshot" or backup requires physically copying gigabytes of data to another location. It is slow, uses double the disk space, and the window during which the copy is taken means the snapshot may not be perfectly consistent.
On a CoW filesystem, a snapshot is a saved copy of the metadata pointer tree — the set of references that describe which blocks belong to which files at a given moment. Creating a snapshot does not copy any data blocks. It copies only the pointers.
This makes snapshots:
- Instantaneous: Copying a pointer tree takes milliseconds regardless of dataset size.
- Initially zero-cost: The snapshot and the live filesystem share the same data blocks. No extra disk space is used at creation time.
- Space-efficient over time: As the live filesystem changes files (CoW writes new blocks), the old blocks are retained because the snapshot still references them. The snapshot grows only by the size of the changes made after it was taken — not by the total dataset size.
Snapshot Math
- Dataset: 100 GB
- Snapshot taken: 0 additional GB used (snapshot shares all blocks with live data)
- 10 GB of files modified after snapshot: CoW writes 10 GB of new blocks; old 10 GB blocks retained for snapshot
- Total disk usage: 110 GB (90 GB shared + 10 GB new live + 10 GB old snapshot)
Snapshots are the foundation of efficient backup strategies on Btrfs/ZFS. Tools like zfs send can stream the difference between two snapshots (an incremental stream) to a remote system, enabling efficient replication without transferring unchanged data.
A common interview question: "How do ZFS or Btrfs snapshots work, and why are they space-efficient?" The answer to lead with: "A snapshot saves the metadata pointer tree, not the data. Because CoW never overwrites existing blocks, the snapshot's referenced blocks remain valid on disk. Space is only consumed as the live filesystem diverges from the snapshot state." Follow up by mentioning that this is also why deleting a snapshot can free space — it releases the old blocks the snapshot was holding.