MirrorNest
← All guides

SnapRAID + MergerFS for a home NAS

A popular alternative to traditional RAID for home media servers: MergerFS pools multiple independent drives into one folder tree, while SnapRAID adds parity protection you can add drives to (or recover from) one at a time.

Target: Ubuntu / Debian Linuxstorage-poolingparity-protectionNASOfficial homepage ↗Official docs ↗
This guide is synthesized from SnapRAID + MergerFS for a home NAS's own official documentation, linked above — always cross-check exact package/version names there before running these commands on a production server, since distro and project versions move over time.
  1. 1Install both tools

    sudo apt update
    sudo apt install -y snapraid mergerfs
  2. 2Pool your drives with MergerFS

    Mount several independently-formatted drives as one combined folder -- files are distributed across the underlying drives, but appear in a single unified directory tree.

    sudo mkdir -p /mnt/disk1 /mnt/disk2 /mnt/parity /mnt/storage
    sudo mergerfs /mnt/disk1:/mnt/disk2 /mnt/storage -o defaults,allow_other,use_ino,category.create=mfs
  3. 3Configure SnapRAID parity protection

    Edit /etc/snapraid.conf to list each data drive and a separate parity drive (which must be at least as large as your biggest data drive), then run an initial sync.

    sudo snapraid sync

    Unlike RAID, SnapRAID parity is NOT real-time -- it only protects data as of your last `snapraid sync` run, so schedule that as a regular cron job, and know that anything changed since the last sync isn't protected yet.

  4. 4Recover from a failed drive

    If one data drive fails, SnapRAID can rebuild its exact contents onto a replacement drive using the parity data and the other drives -- your other drives are completely unaffected and don't need to be touched.