Great article but I needed a home lab in addition to NAS and at the time, FreeNAS / TrueNAS wasn’t all that great (much better now). If all you need is NAS storage and Time Capsule support, you should consider a TrueNAS solution as it is superior to the other small NAS solutions on the market. It can even run some things in a FreeBSD Jail container such as a Plex Media Server, UniFi Controller, HomeBridge, etc.
Here’s my DIY solution (technically overkill for most people):
Couple of Mini-ITX cases with 8-bay hot swappable drives on a backplane with two power inputs and two SAS connectors to hook up all 8 SATA drives to an LSI 8-way RAID card configured in JBOD mode. Using a Supermicro M11SDV-8C±LN4F which includes the AMD EPYC 3251 SoC, 8 Cores 16 Threads @ 55W. Includes heatsink with cooling fan. Can handle up to 512GB ECC RAM. 4 Gigabit Ethernet Ports plus one IPMI management port. Two USB 3.0 ports and 6 USB 2.0 ports and additional 4 SATA3 ports on the board.
Running Ubuntu Server 20.04.3 LTS, LXD 4.22 (Linux Containers), and ZFS file system across 8 HDD’s with a couple SSD’s for read/write caching and booting. LXD containers share the host system kernel so they run at near bare metal speed and can access the disks at full speed. LXD can run virtual machines for other operating systems but they run slower than native LXD containers due to the overhead of hardware virtualization.
I have many containers but one to emulate a Time Capsule. The container is minuscule because that’s all it really needs. It needs to boot a very minimal Linux server instance and it needs to load SAMBA and avahi-daemon and that’s it. 1 CPU core is allocated, 256MB’s of RAM (never needs to swap) and 3GB of storage is allocated to the container. Then I mounted a ZFS dataset into the container and the dataset is allocated a 4TB quota. This is where the Time Machine backups actually go. I run a job to periodically check ZFS for errors and report if there is a problem. I use smartmontools to monitor and alert me if an HDD is going bad. I use the OPENOID tool (bunch of fancy Perl scripts) to snapshot the ZFS dataset and rotate the snapshots as well as replicating to a second and third NAS server, one in my home and one in the corner of a data center offsite. I backup critical data files to Cloud services such as iCloud / OneDrive.
Been running for years without issues, need to replace the drives as they start going bad after about 5+ years. Probably build out a whole new rig when more than a few drives start failing. It runs rather quiet, consumes little in the way of electricity and is ridiculously reliable. ZFS is absolutely rock solid and extremely reliable.
Hot Tips: Make sure you use HDD’s that are designed for RAID and make sure those drives are not SMR drives. ZFS requires all the drives to be the same capacity. Avoid buying drives in batches where the serial numbers are sequential. If there is ever a factory defect you could end up with several failing drives. Watch out for WD Red Drives smaller than 8TB’s as they likely are SMR drives which can fail spectacularly in ZFS. If you use SSD’s you are going to need Enterprise class SSD’s or they are going to wear out rapidly in a RAID configuration. Enterprise class SSD’s have a lot more over-provisioning meaning they have a lot of extra flash sectors which are swapped out by the drives firmware as the sectors reach their maximum number of writes. If you are going to use SSD’s you should definitely setup 10GbE Ethernet or you won’t realize the full speed benefits over 1GbE networks. Still using HDD’s with SSD caching because SSD’s are still very expensive.