Discussion summary

The discussion centers on building a ZFS NAS without commercial solutions, with opinions on the best OS for ZFS being divided. Some users prefer FreeBSD for stability, while others note Linux support is improving.

What the discussion says

  • FreeBSD is recommended for ZFS stability.
  • Linux support for ZFS is improving, especially with LTS kernels.
  • TrueNAS is shifting from BSD to Debian.
  • User experience varies with FreeBSD and Linux.
  • Concerns about data reliability with custom setups.
Running ZFS on anything but Solaris/Illumos/FreeBSD is asinine.
naturalmovement
I run ZFS on Linux and FreeBSD, and FreeBSD is less of a faff.
badgersnake

Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • 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?

  • The RAID5 write hole is not present in RAIDZ1 I believe.
  • > 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.

    by bpye
  • It's complicated, but https://jro.io/capacity/ actually walks you though how it works, towards the middle of the page.

    ``` Unlike traditional RAID5 and RAID6 implementations, ZFS supports partial-stripe writes. This has a number of important advantages but also presents some implications for space calculation that we'll need to consider. Supporting partial stripe writes means that in our 7wZ2 vdev example, we can support a write of 12 total sectors even though 12 is not an even multiple of our stripe width (7). 12 is evenly divisible by +1 (3 in this case), so we don't even need any padding. We would have a single full stripe of 7 sectors (2 parity sectors plus 5 data sectors) followed by a partial stripe with 2 parity sectors and 3 data sectors. This will be important because even though we can support partial stripe writes, every stripe (including those partial stripes) need a full set of p parity sectors. ```

  • Where can I have a discussion with other developers about storage?

    Is here okay?

    I want to have physical storage over here, and logical storage over there, and I want to control the mapping from one to the other. I want to talk about encryption, replication, latency. Make "time machine" available on this logical storage. And then I buy some new physical storage, and it joins the story. This physical storage is over at my friend's house for backup. This physical storage is slow and archival. This is a device for writing archival media, and there's a brand new media in it, go ahead and write to it. Show me the health report on all of the physical media, and show me what you've done to protect the logical storage. Graph my usage and make suggestions about when to add more physical storage.

    Buying physical storage with power and wifi, and configuring it with a QR code that's on an e-ink display - seems like it should be the most obvious thing in the world, that we should all be really used to doing by now.

    What am I missing?

  • bcachefs is slowly working up to what you're describing - describing what you want and letting the filesystem sort it out. We're basically there for local storage, and other people have been building some nice reporting on top.

    Next year (post Rust, because networking code is so much nicer in Rust) will be send/recv, and I think we should be able to make some nice improvements over the state of the art there.

  • I'd love reading some blogs about what's the best usage for actually minimal computers, any suggestions?

    It always gets me how the world of self-hosting is usually introduced from claiming that you can start giving a second life to a Raspberry Pi or a forgotten laptop, and suddenly the next blog you read calls "minimal" a beast machine meant for racks and semi- or professional environments.

    Bought a ThinkCentre M910q with an internal SSD and 16 GB of RAM for €200 a couple years ago... Right now I got it chugging along with TrueNAS + 2 USB disks in ZFS Mirror (sitting in a closed cupboard so no chance of cable disconnections).

    For me, "minimal home server" means a small computer that fits on a cabinet on the living room, is practically silent, and has a very small power consumption profile (less than a decent Hetzner otherwise the cost wouldn't be worth it). I have a mini-PC in mind, but people think of Dell PowerEdges. Even if given for free, I would never install at my home a PowerEdge for a home server.

    I guess it must be the difference between living on a flat vs a 2 story house :-)

  • > ThinkCentre M910q

    I love these machines. I have 3 of them and an M720Q. Needs changed so only one of each is actually in use, but they are so low profile and quiet that I'm considering deploying the other two at home just in case I ever get the urge to play with K8s or something. The only thing I'm missing is a splitter so I can use one plug socket instead of three - not sure if something like that exists.

    One nice little fact about the M910Q is that they are rated to maximum 32GB but I have two of them with 2x32GB no problem. Recent RAM prices and forever regret is the only reason the third one doesn't have the same. The M720Q only takes 32GB though.

    You can also run 2 SATA off of the M2, and someone created a 3D printable enclosure for them: https://makerworld.com/en/models/1280680-thinknas-2x-hdd-enc...

  • I run conceptually the same thing, but on FreeBSD instead of Debian. Different set of trade offs; not per se better or worse, just different, and in the end works just as well.
    by kjs3
  • I used this blog post as one learning resource while building my own NAS a while back: https://xyny.art/blog/2026-building-nas/

    Building a NAS from scratch is really fun! A small hinderance, but definitely part of the fun as well, is the lack of a "complete resource" on the topic covering how to do every single thing you need to do. Part of the point of my blog post is actually to bring to the internet yet another opinionated NAS setup "guide" (eventhough I would hesitate to call it a guide, but if I ever had to do the same thing again I would definitely read my own post first).

  • 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
  • > and I can even run shell commands on phone without ssh.

    How do you do the authentication to cockpit, basic HTTP auth in front or something? I've always ended up making my phone SSH-capable rather than dropping down to anything else but public/private keys for authentication to my servers, guess I have a bit of conspiracism when it comes to that.

  • I'm sure people have reasons for taking these things as far as they do with ZFS, and everything else that goes into what is commonly considered a "NAS." But I've found great convenience in a tight NFSv3 config running from a single high capacity HDD with ext4 on a Linux machine (primary system that's always on anyway while I'm around/awake) making things available to my other devices for the electricity and overhead cost of one machine instead of multiple.

    I try to keep my network configuration restrictive by default, so I'm not too concerned about possible security arguments running it from my main machine. I've probably committed some great sin here, but is plain NFSv3 and secondarily Samba (for compatibility) really not enough?

    by ocd
  • Once you add multiple machines reading and writing simultaneously, you'll hit a limit. But that's fine, build what you need now, no need to over-optimize.
  • It's more the single drive storage layout that is an issue in your case. No resilience to a single disk failing and you are risking all your data if your hardware starts silently corrupting data. This is assuming all your backups are done using the data on the single hard drive.

    If you want to keep your setup simple I would consider the following:

    - Keep a list of file hashes and check your files against this list periodically.

    - Use some type of backup program that supports snapshots. Restic is a good choice.

    - Get a hard drive the same size as the one you have and use SnapRAID to manage file integrity or set up a two disk mirror using btrfs.

  • First: Do you have backups of your single high-capacity HDD? That's my biggest worry. What's your plan for when that HDD fails one day, as it will?

    The main reasons people go for ZFS and a "NAS" is checksums and data integrity protection, as well as maybe not wanting to keep their primary machine awake all the time (I personally don't).

    Then there are useful features like snapshots, which means I don't have to worry as much about accidentally deleting, or over-writing a file and losing data.

    I don't see anything wrong with using a main machine that's up 7x24 as a NAS, don't buy things for the sake of something, but I'm worried about your reliability and bitrot protection. (Yes, it happens, I've seen it first-hand thanks to ZFS).

  • 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.

  • ZFS makes this completely trivial except for the "beeps and lights a led" part
  • ZFS handles drive failures more robustly than anything else. There's a reason synology uses mdadm under BTRFS instead of the built-in BTRFS RAID features, and mdadm operates at the device level. That means that to replace a drive, mdadm has to rebuild the entire drive while zfs will only rebuild what's actually in use.

    > 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.

    `zpool replace my_pool disk3 newdisk`

  • 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.
  • Is snooty a autocorrect for Synology or some other product?
    by msh
  • 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
  • This is what I'm hoping to do. I haven't done much research yet, so I look forward to reading about your learnings. (Also to the person who responded to you with their experience and link.)

    Thanks for saving me probably some hours...

    EDIT: I'm also coming from an old Synology NAS from the ~2015 era.

  • I'm also using NixOS for my NAS, you should look into quadlets (docker containers managed by systemd) to manage containers with nix.
  • 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

  • I think it's appropriate to link to my blog post about building such a NAS but with very different technologies: dm-integrity, mdadm and XFS. The reason being that as a C/C++ dev following OpenZFS development closely, I found the focus on ginormous features over general stability and the constant problems due to the SPL/separate page cache too worrying.

    Sure, I traded the convenience of kitchen sink (or Swiss army knife for the more charitable souls) ZFS for some initial pain, but I'm very happy with my choice today.

    https://world-playground-deceit.net/blog/2025/06/nas-setup-l...

  • Some other things I find useful on NASes:

    Install avahi-daemon. Samba will automatically register with it to advertise SMB/CIFS to macOS and Linux clients over DNS-SD.

    Install wsdd2 so that your server will be auto-discovered by Explorer on Windows 10+ clients with SMB 1.0 disabled, too.

    Your Linux hostname is probably lower-case, but by default, Samba publishes a capitalized rendering of the hostname to NetBIOS and Avahi. If this bothers you, set “host-name=something” in the [server] section of /etc/avahi/avahi-daemon.conf, and set “mdns name = mdns” in the [global] section of /etc/samba/smb.conf.

    If you have macOS clients, you should enable vfs_fruit in your Samba configuration: https://www.samba.org/samba/docs/current/man-html/vfs_fruit..... There are some compatibility reasons to do this, but mostly it means you can set the “fruit:model” so that your server has a fun icon in the Finder sidebar.

    To avoid the creation .DS_Store files, you can disallow them: https://ryanoberto.github.io/blog/2015/04/01/disabling-the-c.... I think you can also set “fruit:resource = xattr” to store Finder preferences in xattrs, but I haven't tried it.

    Although macOS deprecated AFP in favour of SMB years ago (and are slated to remove AFP client support altogether in the upcoming macOS 27), SMB client support in macOS is still pretty miserable. The upcoming macOS 27 is set to drop AFP support, but until then I will continue to run Netatalk side-by-side with Samba. Netatalk also registers itself with Avahi, and macOS will (tellingly) use AFP preferentially to SMB, so clients will talk to the right daemon automatically.

  • For Samba, add a separate entry for the user home directory because the homes directory default triggers some sort of OCD.
  • 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

  • Have you looked at https://zfs.rent/ for cloud storage? You have to provide your own drive, but the monthly cost is relatively low.
    by jsr0