fix: create the storage pool deliberately — btrfs, because cloning is the whole point #51

Merged
dan-claude-bot merged 1 commit from fix/storage-btrfs into main 2026-07-14 13:24:32 +00:00
dan-claude-bot commented 2026-07-14 13:14:28 +00:00 (Migrated from github.com)

Closes #29.

incus admin init --minimal picks dir — no copy-on-write, so claudebox snapshot and new --from each pay a full copy of the provisioned root: several GB and minutes apiece (measured live on the drill host; a drill run pays it three times). Against "log in once, snapshot, clone forever", that price is the product tax the issue named.

What this does

setup-host.sh bootstraps with an explicit preseed instead of --minimal. The preseed is exactly what --minimal createsdefault pool, incusbr0, default profile with root + eth0 — with one difference: the pool driver is chosen deliberately.

  • btrfs (loop-device backed, no partitioning), installing btrfs-progs if absent — clones and snapshots become CoW: near-instant, sharing blocks, diverging on write. N clones of one snapshot ≈ 1 copy + deltas instead of N full copies.
  • dir remains the fallback, with a warning that says what it costs — a host that cannot do btrfs still works, just slowly and knowingly.

Per the issue's decision points: btrfs over zfs/lvm-thin (no kernel module or DKMS risk on Debian/Ubuntu — it's in-tree; loop file needs no spare partition), and the default profile/network are preserved because the drill's probe containers (cbprobe, payroll) launch against them.

What to know before merging

  1. Existing hosts are untouched. The block is guarded by incus storage show default — on the drill host (pool already dir) nothing changes. Getting btrfs there means migrating the pool (or a teardown that includes it), which is deliberately out of scope here.
  2. Which means this path needs a fresh-host validation — the honest test is a run 14 on a host with no pool (or after deleting the pool), where the drill will exercise the btrfs bootstrap end-to-end and time the clone steps. The drill needs no changes: its probes assert behavior, not backend.
  3. Incus sizes the loop file itself (its standard default, resizable later with incus storage set default size=<X>); boxes' 60GiB roots are sparse on it exactly as they were on dir.

🤖 Generated with Claude Code

Closes #29. `incus admin init --minimal` picks `dir` — no copy-on-write, so `claudebox snapshot` and `new --from` each pay a **full copy of the provisioned root**: several GB and minutes apiece (measured live on the drill host; a drill run pays it three times). Against "log in once, snapshot, clone forever", that price is the product tax the issue named. ## What this does `setup-host.sh` bootstraps with an explicit preseed instead of `--minimal`. The preseed is **exactly what `--minimal` creates** — `default` pool, `incusbr0`, default profile with root + eth0 — with one difference: the pool driver is chosen deliberately. - **btrfs** (loop-device backed, no partitioning), installing `btrfs-progs` if absent — clones and snapshots become CoW: near-instant, sharing blocks, diverging on write. N clones of one snapshot ≈ 1 copy + deltas instead of N full copies. - **dir remains the fallback**, with a warning that says what it costs — a host that cannot do btrfs still works, just slowly and knowingly. Per the issue's decision points: btrfs over zfs/lvm-thin (no kernel module or DKMS risk on Debian/Ubuntu — it's in-tree; loop file needs no spare partition), and the default profile/network are preserved because the drill's probe containers (`cbprobe`, `payroll`) launch against them. ## What to know before merging 1. **Existing hosts are untouched.** The block is guarded by `incus storage show default` — on the drill host (pool already `dir`) nothing changes. Getting btrfs there means migrating the pool (or a teardown that includes it), which is deliberately out of scope here. 2. **Which means this path needs a fresh-host validation** — the honest test is a run 14 on a host with no pool (or after deleting the pool), where the drill will exercise the btrfs bootstrap end-to-end and time the clone steps. The drill needs no changes: its probes assert behavior, not backend. 3. Incus sizes the loop file itself (its standard default, resizable later with `incus storage set default size=<X>`); boxes' 60GiB roots are sparse on it exactly as they were on dir. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: heavy-duty/box#51
No description provided.