Skip to content

Role Storage

Osotechie edited this page Jun 22, 2026 · 2 revisions

Role: Storage

Configures the disk mounts and MergerFS storage pool that underpin all NAS storage.

What It Does

  1. Installs fuse, mergerfs, and mtools
  2. Mounts individual data disks (by label) to their mount points
  3. Creates a MergerFS pool that combines the data disks into a single unified path

Disk Layout

Label Mount Point Purpose
ARRAY-DISK1 /mnt/disk1 Data disk 1
ARRAY-DISK2 /mnt/disk2 Data disk 2
ARRAY-DISK3 /mnt/disk3 Data disk 3
ARRAY-DISK4 /mnt/disk4 Data disk 4
ARRAY-PARITY1 /mnt/parity1 Parity disk (for snapRAID or similar)

MergerFS Pool

The data disks are combined into a single pool at /mnt/storage using MergerFS:

flowchart LR
    D1["/mnt/disk1"] --> Pool["/mnt/storage (MergerFS pool)"]
    D2["/mnt/disk2"] --> Pool
    D3["/mnt/disk3"] --> Pool
    D4["/mnt/disk4"] --> Pool
Loading

Policy: category.create=mfs (most free space) — new files are written to whichever disk has the most free space. This balances usage across disks naturally over time.

💡 The parity disk is mounted but not included in the MergerFS pool. It's used by the SnapRAID container to provide file-level RAID protection across the data disks. SnapRAID calculates parity data that allows recovery of any single disk failure without the overhead of traditional RAID.

Configuration

The disk definitions live in group_vars:

storage_disks:
  - { label: "ARRAY-DISK1", mount: "/mnt/disk1" }
  - { label: "ARRAY-DISK2", mount: "/mnt/disk2" }
  # ...

storage_mergerfs:
  mount: /mnt/storage
  policy: "category.create=mfs"

Adding a New Disk

See Day 2 Operations — Adding a Disk.

🔗 MergerFS documentation | MergerFS policies explained | SnapRAID documentation

Clone this wiki locally