logoalt Hacker News

How to Build a Minimal ZFS NAS Without Synology, QNAP, TrueNAS (2024)

122 pointsby 4diiitoday at 3:59 AM67 commentsview on HN

Comments

Confikstoday at 4:44 AM

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 a third 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

show 6 replies
kartoshechkatoday at 6:17 AM

I found cockpit to be incredibly useful for managing NAS and VPS. Even though any configuration is not an issue with LLMs, having a dashboard with toggles, formatted logs and such is helpful, and I can even run shell commands on phone without ssh. In the NAS case, you can easily see the results of backup/maintenance cronjobs, manage samba (which is a huge pain in the ass to get to work properly on iPhone), and monitor disk usage

splitbraintoday at 4:42 AM

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

show 1 reply
bradley13today at 5:24 AM

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.

show 1 reply
beagle3today at 4:29 AM

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.

show 3 replies
Havoctoday at 6:39 AM

Also you can use zfs on a proxmox host and use that both for NAS duty and for the VMs.

For some reason people insist on doing truenas on top of proxmox and then introducing a networking layer between everything they do. Noooo…

jmusalltoday at 6:08 AM

This post mentions https://github.com/wyager/zfs-backup for (offsite) backups. Why would they recommend this over something more established like https://github.com/jimsalterjrs/sanoid? Has anybody tried it?

show 1 reply
INTPenistoday at 6:10 AM

One alternative for those who don't want any of the major NAS vendors, just use RHEL10. It's free up to 16 licenses, it's ultra stable, cockpit is a very mature gui for a lot of maintenance tasks.

It's a set and forget OS that will run for years without requiring your attention. But these days it has decent container support for hosting services on.

show 2 replies
RossBencinatoday at 5:54 AM

I've been thinking about setting up something like this for a while. I have a Broadwell dual socket Xeon workstation that I'm going to upgrade to Proxmox. Would it be reasonable to run something like this as an LXC or VM or would you put it in the base kernel?

AceJohnny2today at 4:59 AM

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?

show 3 replies
rexysmexytoday at 5:02 AM

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.

Khainetoday at 4:23 AM

Can anyone recommend a good server for a homelab to use for a storage purpose like this?

show 3 replies
crowd51today at 6:07 AM

Very cool

aligutierreztoday at 4:50 AM

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.

tamimiotoday at 4:49 AM

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.

show 2 replies
naturalmovementtoday at 4:51 AM

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.

show 5 replies