HeadlinesBriefing favicon HeadlinesBriefing.com

Build Minimal ZFS NAS on Debian Without TrueNAS

Hacker News •
×

A developer documents building a RAIDZ1 NAS using Debian 12 Bookworm and OpenZFS 2.1.1 on four Samsung 990 PRO 4TB NVMe drives, bypassing TrueNAS entirely. The hardware runs a Xeon CPU with 16 GB ECC RDIMM — cheap server gear that outperforms consumer appliances. The author argues TrueNAS adds unnecessary complexity for basic file sharing; a raw ZFS + Samba stack delivers the same redundancy with full transparency.

The article's core insight: ZFS stores all pool configuration on the disks themselves. If the host OS fails, move the drives to any machine with ZFS tools, run `zfs import`, and the RAIDZ1 pool reappears instantly. No metadata backup, no appliance dependency. This portability is rarely emphasized but fundamentally changes disaster recovery.

Setup uses `lsblk` to identify drives, `/etc/zfs/vdev_id.conf` to alias persistent `/dev/disk/by-id` paths, then `zpool create -o ashift=12 s16z1 raidz1 nvme0 nvme1 nvme2 nvme3`. The ashift=12 flag aligns 4 KB sectors on the 990 PROs, avoiding the 512-byte emulation penalty. Compression defaults to `lz4`; datasets `docs` and `backups` split workloads for granular snapshots and replication.

Samba exports each dataset independently — `docs` for general SMB, `backups` tuned for Time Machine via `fruit` and `catia` VFS modules. No GUI, no web UI, no update cycle. The result is a NAS you fully understand, debuggable with standard Linux tools, and portable across any ZFS-capable host.