# btrfs in Arcline OS Arcline OS is **btrfs-native**: the root filesystem layout is created at install time and snapshots are first-class, not bolted on. ## Subvolume layout | Subvolume | Mount point | Purpose | |--------------|---------------|------------------------------------------------| | `@` | `/` | system root — rolled back on failed upgrade | | `@home` | `/home` | user data — not rolled back by default | | `@log` | `/var/log` | logs survive rollbacks | | `@snapshots` | `/.snapshots` | read-only snapshots live here | The layout is created by `btrfs/init.sh ` (this is what the installer runs). `/etc/fstab` templates live in each edition manifest and reference these subvolumes with `subvol=` mount options. ## Tooling - `btrfs/init.sh ` — create the subvolume layout on a target device. - `btrfs/snapshot.sh` — snapshot / list / prune. Installed in images as `/usr/local/sbin/arcline-snapshot` and triggered automatically by the `arcline-snapshot.timer` systemd unit (see `overlays/base/usr/lib/systemd/system/`). - `btrfs/rollback.sh` — promote a snapshot back to `@`. Installed as `/usr/local/sbin/arcline-rollback`. ## How a rollback works Rollbacks are done from a rescue/live environment (never against the mounted `@`). The tool moves the current `@` aside to `@.rollback-` and promotes the chosen snapshot to `@`. Because btrfs renames are atomic, a crash mid-way leaves a recoverable system on disk. ## Compression All subvolumes mount with `compress=zstd:3` (see the edition `fstab` templates). Transparent compression is on by default.