Skip to content

feat(volumes): btrfs storage pools #339

Open

Description

@PiquelChips

Problem

Docker local volumes have no snapshots, no quotas and no cheap copies. Consistent backups of a busy database need downtime (stop) or application tooling (dump); one volume can fill the disk; and a copy of a volume costs a full copy.

Proposed solution

Storage pools, declared in config.toml because they are facts about the host (#334):

[[storage.pools]]
name = "data"
kind = "btrfs"
path = "/srv/piqueld"

local, today's Docker volumes, stays the default and needs no declaration. A btrfs pool creates one subvolume per volume and bind-mounts it through a local volume. It needs only a btrfs filesystem at path, such as a second disk or an attached block volume, not a btrfs host.

ZFS later, as a second kind behind the same interface, for hosts that already run it. Its refquota and zfs send matter more once nodes replicate volumes (#325), but its clones depend on their origin snapshot and it is an out-of-tree module.

The NixOS module gains the pool declarations.


Written with Claude Opus 5.5 in Claude Code (via T3 Code).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions