Skip to content

Copy on write

Each copy, its own disk. You pay only for what it writes.

Copy on write

Before, every run -from copied the whole golden overlay: 76 ms per 200 MiB and ~6.7 GiB written for 32 copies.

With daemon.cow the overlay is a reflink clone: it shares the golden’s blocks until someone writes.

Terminal window
kling config set daemon.cow auto
sudo systemctl restart kling
kling info

Output (disks line)

disk clones: store (reflink inside kindling's XFS store) [daemon.cow=auto]; store /var/lib/kindling/cow (XFS): 15870 of 16384 MiB free; since start: store 32
daemon.cow What it does
auto native reflink if the root is XFS or Btrfs; otherwise its own store; otherwise a copy
reflink-store its own store even if the root can clone
off the usual full copy

The own store is an XFS (or Btrfs) file mounted over loop, fully reserved with fallocate: it cannot run out of space underneath.