How to Build a Minimal ZFS NAS Without Synology, QNAP, TrueNAS
66 points
1 hour ago
| 10 comments
| neil.computer
| HN
bradley13
1 minute ago
[-]
Just yesterday I was brainstorming with ChatGPT about this. I have an ancient QNAP plus a slightly less ancient NUC running PiHole, Wireguard and other services. Both need replaced, so why not combine them?

I don't know much about ZFS, but it sounds like I need to learn. Docker may have conquered the world, but I plan to stay with LXD for services.

The one thing I take issue with: an appliance like this runs 24/7. It should be low power and fanless. A processor like the N100 seems like the obvious choice.

reply
Confiks
41 minutes ago
[-]
Not a great time price-wise to be building a NAS, but I have been doing so for the last two weeks. Inside a Jonsbo N6 case, which is pretty nice with an 8x SATA backplane and drive bays (unlike the earlier Jonsbo variants).

I ended up on shucking 4x the 14 TB WD Elements Desktop. They contain helium drives, the WD140EDGZ in my case, and are about 25% cheaper than 4x the 12 TB WD Red Plus drives (which are air-filled). The shucking was easier than I expected too, and the performance seems very comparable. The warranty is a definite downside (European, so no Magnuson-Moss), but I think I can even get them back in their enclosure should they fail during the 2-year warranty period.

I've put some second hand 256 GB M.2 SSDs in there as boot drives. It was a bit of a struggle to get it to work in a way that failure of one of the drives doesn't hold up booting, combined with LUKS, TPM keys and ZFS on root. Learned a lot about systemd-boot which I have never used before, but feels a lot saner to me than grub ever was. So now I have a large script which debootstraps a Debian based NAS into being.

I noticed that there are a lot of ZFS myths and cargo culting. For example TFA mentions ECC RAM, which in some circles is a must-have because ZFS would wreck your pool during a scrub otherwise, which is a myth. It's also very expensive, especially this year. You also don't need much RAM for ZFS, L2ARC doesn't use much RAM at all, to name a few others.

Still doubting about setting `dnodesize=auto` (which is the default), because there are some horror stories about that [1]. And it seems impossible to find a cloud storage provider with reasonable prices that supports `zfs send`. Rsync.net upped their minimum order to 10 TiB recently, which is far too much for my use case.

[1] https://github.com/openzfs/zfs/issues/11353

[2] https://www.rsync.net/products/zfsintro.html

reply
watermelon0
13 minutes ago
[-]
I've been thinking about building my own NAS as well. Mind sharing how much did you pay for those hard drives, and what motherboard did you choose?
reply
Confiks
2 minutes ago
[-]
It was €329 per hard drive, and I chose the ASRock B650M-HDV/M.2 mATX motherboard combined with a Ryzen 5 8500G. Stock CPU cooler, replaced the Jonsbo case fans with Arctic P12 Pro PST LN. I only slightly regret the PSU (MSI MAG A650GL), which could be quieter. Not that it's very noisy, but I should've chosen one that just shuts the fan down at low power usage.
reply
beagle3
56 minutes ago
[-]
I still pay for snooty, and the reason for that is that when a disk goes bad (not if; when) I pop its tray out, replace the disk, pop the tray with the disk back in, click a couple of widgets, and that’s it. I know it will be rebuilt properly.

(And I know I have to do that, because when the disk fails it beeps and lights a led near the bad disk)

It’s easy to build a NAS such as the one described in this article, but in the long run, data loss is significantly more likely.

Also, any guide like this that doesn’t guide you through “disk 3 failed, this is how you safely replace it” is imho incomplete, even if it doesn’t go through telling you how you know a disk has failed.

reply
msh
51 minutes ago
[-]
Is snooty a autocorrect for Synology or some other product?
reply
denkmoon
27 minutes ago
[-]
That is kind of exactly how zfs works though. The guide isn't complete, sure, but "rebuilding" the array is just replace the disk and run a single zfs command.
reply
splitbrain
43 minutes ago
[-]
I came to the same conclusion when I built my NAS. Just Nix for the system, zfs for raid and docker compose for any service I might want to run. https://www.splitbrain.org/blog/2025-08/03-diy_nas_on_nixos
reply
colordrops
23 minutes ago
[-]
Same, using NixOS as a NAS, though it kept growing and now I'm trying to share it with other people. I use BTRFS on MDADM though. It's ended up being an all-in-one home server and router now because I was tired of the noisy power hungry rack I had in my closet.

https://HomeFree.host

reply
AceJohnny2
26 minutes ago
[-]
Tangential, but about this:

> I am creating a RAIDZ1 (RAID 5) zpool. That means 1 drive redundancy in-case of failure

A friend once told me that RAID5 has a high latency cost, because every Write requires a Read to update the stripes across all drives, and while this made sense when drives were expensive, nowadays you might as well do a RAID10 instead, and trade space for latency.

Is this still true with ZFS RAIDZ1?

reply
bpye
1 minute ago
[-]
> and while this made sense when drives were expensive

I don't have the answer to the latency question, but HDDs have shot up in $/TB over the last couple years too. They are once again kind of expensive.

reply
rexysmexy
23 minutes ago
[-]
To this day I still use a ZFS array for my critical backup storage. I've migrated over to using snap raid + mergerfs for my larger Linux iso storage array. Simple enough and I can pull a drive on it's own without any other stuff.
reply
Khaine
1 hour ago
[-]
Can anyone recommend a good server for a homelab to use for a storage purpose like this?
reply
simondotau
11 minutes ago
[-]
Not strictly a recommendation, but Terramaster is a good brand to look at if you want Synology-shaped hardware which can run TrueNAS or Proxmox or any flavour of Linux you want.

Along with various other devices (including a large Synology which I wouldn’t buy today), I run Proxmox on a small two bay+two nvme Terramaster. I have a bare bones Ubuntu LXC running Samba configured for Apple Time Machine, an VM running Scrypyed, and PBS for Proxmox backups. Nothing on it is critical so I don’t bother with any storage redundancy.

reply
burner420042
30 minutes ago
[-]
I'm sure there's better options now but the HP ProLiant MicroServers (used).

They support ECC ram, 4 caddies, one extra PCIe slot, and to my knowledge you're not cpu limited for a zfs file server usecase.

Keep in mind though, all you need is linux* support, iDRAC, ECC if you're a snob, and drive bays ... and that's basically any free server.

In my extremely opinionated opinion I would only get used enterprise server gear, because a zfs file server will just work unless hardware fails. And a UPS.

*ZFS will be a more natural choice on FreeBSD. It's better documented, and will meet Linux 1:1 in hardware compatibility for this.

reply
bombcar
44 minutes ago
[-]
It's a horrible idea likely, but I have an ancient old Dell PowerEdge R510. Probably sucks way too much energy, but it does what it does and the price of SSDs have skyrocketed so I'm not touching it.
reply
aligutierrez
35 minutes ago
[-]
this is really cool. I've been dealing with an aging Synology nas and this is something I can pick up, evaluate performance and how safe it is to serve as home for my data.
reply
tamimio
36 minutes ago
[-]
Yeah no. When it comes to backups and data storage, I would rather use a proven reliable system that’s been used and tested by millions of other users, keep these hacky stuff for your hyperland set up.
reply
bakugo
1 minute ago
[-]
> I would rather use a proven reliable system that’s been used and tested by millions of other users

You're describing ZFS.

reply
bombcar
28 minutes ago
[-]
I've lost more data to "proven reliable systems" than to my homegrown hacked-up stuff (which may be because I trust the latter much less).
reply
naturalmovement
34 minutes ago
[-]
Stopped reading at "Debian".

Running ZFS on anything but Solaris/Illumos/FreeBSD is asinine.

ZFS is a permanent second-class citizen on Linux (due to usual open-source politics). This will never resolve.

I don't want to trust my data to some half-assed out-of-tree solution that may or may not break in a week.

FreeBSD ZFS support has matured and is outstanding. Quality-wise it has reached parity with Illumos.

If you can afford Solaris then you're probably not building your own NAS from parts of lesser computers.

reply
ggm
24 minutes ago
[-]
Run ZFS backed filestore on FreeBSD, have migrated it to/from Debian. At work and home, not petabyte scale but certainly multi hundred terrabyte. Over 15 years, on over 50 hosts/NAS/SAN instances, different hardware.

Run ZFS on Raspberry Pi, on home builds, on Intel, on AMD, on other ARM chipsets.

I think you're over-stating things. Debian is fine for this. I do think FreeBSD is a better platform for myself.

The code bases adhere (modulo ZFS version numbers) to a spec and you can safely migrate the pools between OS. I've done it multiple times both directions.

You can not do this with BTRFS and other Linux things, I consider this feature of (Open)ZFS a killer-context for me: It's OS portable. I wish Mac OSX hadn't walked out of the room when Oracle went legal.

reply
nixgeek
11 minutes ago
[-]
And yet TrueNAS is moving away from BSD towards … Debian!
reply