I’ve been putting it off for a long while but my recent PC upgrade finally pushed me over the edge so yes, I finally have a dedicated NAS in my network.

 

rai·son d’ê·tre

Why would someone need a NAS?  Why not just store your data on internal drives?  Why have another computer just to store data?  These are the usual questions one would rationalize before deciding on getting a NAS.

But first if you’re wondering what a NAS is, it’s Network Attached Storage.

A Network-Attached-Storage is basically that, a storage medium that’s available to anyone in your local network.  Why would anyone do this?  The easiest use case to think of is if you have a file in one computer that would also be needed in another computer ie passing a file that you worked on from your laptop to your desktop if you need something beefier to process it.

I know, I know.  It’s easy to just attach an external drive from one PC to another PC and move it there. 

But what if other people need access to files on that particular drive?  Do you have them wait around until no one else is using the external drive?   For me, I need access to my files usually at the same time as other computers in my home network does – say for Plex Streaming while I’m editing something.

If your use case is you need more than one person to be able to access your files at a time, then it’s time to attach the storage to your network.

Why not store things within the computer you are using?

Simply because I cant.  I did a hardware upgrade recently and ended up removing the drives that couldn’t fit in my new case, the o11 mini Air.  It can physically store up to 4 3.5 drives but I only managed to fit 3 :'( and I have 6 hard drives to contain my current data. 

The second reason is that since I daily drive both a Mac and PC, it just wasn’t a good idea to move things around in my 8TB external drive just to edit files.

say hi to my gaming pc in the O11 Mini Air

Why not share a folder from your computer?

Yes that would work up until you need to turn off the computer.

Why not attach it to your router?

Fun fact.  Most current routers have a USB port for this specific purpose.  You can attach an external drive, a printer, etc. 

The downside?  Depending on your router model, you might need to install a app on each machine to enable access.  If you purchased a higher end router, you might have networking and DLNA support built in but options to control it are mostly limited.  

This however, is an option that will be enough for most people primarily because the router is always on.

OK, you we go with a dedicated NAS computer

Have I convinced you about my use case yet?  Perfect.  Now we just need to decide what kind of NAS we need.

DIY vs Pre built

Buying a prebuilt from Synology, Qnap, Asustor, etc is a quick way to get things up and running.   Since I was planning this for quite a long time now, I have narrowed down my expected use case:

  • storage for media files
  • Plex
  • running some VMS to interact with the data
  • accessing my data from the internet when needed

this is both doable on a prebuilt solution and a DIY one so I ended up listing the pros and cons for both: 

 

Prebuilt NAS

Pros: 

  • Much like buying a pre-built PC, it’s plug and play.  Probably the only waiting time you need is installing updates
  • It has most of everything you need out of the box (but that depends on how much you spend)
  • Software is solid support (most of the time) so backing up your files automatically to your NAS via Time Machine or Shadowcopy (or whatever Linux calls it) is easy to set up.
  • Low power, these things sip power even at full load
  • Small easy to tuck away beside your router/network stack

Cons:

  • Price – they’re really, really expensive
  • Slow hardware – to get to the more decent ones, you have to pay a lot of money to get more bays to expand, more PCIE ports, etc
  • DIY repair is out of the question, most of the time, if something dies and you’re out of warranty, you’re SOL and need to buy a new hardware (since sending it for after warranty repair is expensive)
  • limited flexibility.  Loius Rossman has just uploaded a video to confirm this, but basically outside of the use case it’s sold for, you can really do anything outside of it.

DIY with blood and sweat:

PROS

  • Cheap, you can reuse hand me down computers or buy 2nd hand 
  • Expandable and flexible – since you basically have a PC, as long as there’s ports for it, you can install expansion cards on it.  Need more sata ports?  Buy a PCIE/PCI card
  • Software is mostly free* (there’s also unraid, a paid solution)
  • They’re mostly powerful enough to run VMS and any other task you need to offload from your main computer.
  • Easy repairs – if something dies, swap it out with a 2nd hand part.

CONS:

  • Power Hungry – especially if you got bitten by the hype and bought an old, decommission xeon that’s on something like 22nm node.  These things run 125W at full load and idle at around 40W so you pay for that in electricity.  If you pick smartly, you can go with a consumer chip that has a low power draw but end up paying for it a bit more up front.  
  • Options for software.   LOTS OF Options.  Now, this might be a PRO to some but since there’s no single authority for NAS software, you need to do research yourself.  Do you go with TrueNAS Core or TrueNAS Scale?  Do you go with Unraid and BTRFS?  Do you go with Promox and TrueNAS?  DO you go with Unraid and ZFS with TrueNAS in a VM?  I spent so many nights and cups of coffee before finally deciding.
  • Not compact – yes its a PC case, what did you expect?
  • No warranty especially if you bought 2nd hand parts.

So how did your DIY NAS build go?

Quite well actually.  My previous setup was a raspberry pi with an 8TB drive attached to it.  

Raspberry pi 4 with a WD External drive
Another raspberry pi 4 with an SSD as it’s bootdrive

For most people, this setup will work.

It serves my Plex library and any other 24/7 tasks that I need to complete downloading. The real downside is that it’s bottlenecked by performance and there’s no redundancy. If someone is playing a movie thru plex, the transfer speed tanks. If the 8TB drive dies, I’m SOL.

So time for the proper NAS to get built yeah?

I got lucky because I migrated to AMD early in 2019 and got a spare, relatively not so old Skylake CPU and an NZXT cooler (not needed but it looks sick tbh).

My build is as follows:

  • Intel i7-6700k (spare part)
  • Gigabyte Z270M (bought this to replace my old Z170 Pro gaming board so I can get NVME support on the M.2 slot)
  • 2x8GB 3200hz GSkill DDR4 dimms (spare part)
  • Kraken X62 (spare part)
  • Corsair CV450 PSU (new)
  • Define R5 (spare part)
  • 4x6TB WD Red Drives from Amazon
  • 250GB BX500 Crucial SSD (spart part)
  • Intel Dual Lan NIC (to replace the meager 1GB NIC)

From the parts list, I only paid for the new PSU, the NIC and motherboard to build the computer AND the drives for the actual storage.  Not bad in terms of pricing yeah?

As for the OS, it was a choice between TrueNAS, Unraid, and Proxmox.

I ended up going with TrueNAS (and TrueNAS Scale because of docker support) because of this vid from Level1 tech:

Basically the Pro for unraid is that you can add drives as you need to expand.  The downside?  Performance.  It uses BTRFS by default which uses single drives at a time when reading.  Yes you can install ZFS on Unraid but since it’s via a 3rd party plugin, it’s not as supported as doing it natively on TrueNas. 

The Pro for Proxmox is that’s it’s built well as a HyperVisor but like unraid, all NAS functionalities are secondary – I wanted a NAS primarily, with support for running apps in docker and/or VMS so I went the TrueNAS route.

In the case of choosing between TrueNAS core vs TrueNAS Scale, I ended up with TrueNAS Scale.  Even tho it’s still in BETA, it’s stable enough for my use case and the biggest plus for me is it’s linux based instead of FreeBSD and has native support for running docker images via Kubernetes. 

When stable, I expect the same amount of support for hardware passthrough via Unraid.  

And of course the biggest draw of going with TrueNAS is that it’s free as beer. 

Wrapping up

Is it perfect?  No.  At least, not yet.  My list of complaints so far is as follows:

  • No docker-compose support.  I like Kubernetes but a docker-compose is probably the simplest multi app setup tool I’ve encountered.  I think Kubernetes is a bit overkill primarily since it’s just controlling a single computer’s resources.
  • The drive used for the boot disk isn’t usable by the pool so if like me you mistakenly used a big SSD, you can’t use the remaining space to run your kubernetes volumes off of the free space.  There’s a way to do it but I need to wipe the drive first and reinstall, and I’m not finding enough motivation to do that at the moment.
  • ZFS expansion is still up in the air.  If I get lucky, it might hit production in 2022 – just in time to expand my drives a bit more with another 6TB drive.  If not, I since I’m using ZFS, I need to add another 4 drives to match the current vdev or replace each drive with a higher capacity one.  My wallet hurst just thinking about it.
  • Not as low power as I want.  My previous NAS was 5W for the Pi and 12W for the external, this averages 20-30W on file server duties and can reach 91W when full load ( tho it’s not often).  I might replace the cpu with an i5 6600T, no hyper threading but it just tops out at 35w.
  • Still need to buy an NVME ssd for L2 ARC to improve write performance.  Tho I am not sure if it’s better to just bump my RAM to 32GB since ZFS writes to RAM before striping to drives.
  • Still need to buy x2 SFP PciE cards to get 10GBE networking running (and an SFP router if I need it on all machines).

The flipside?  My NAS can now:

  • Serve enough bandwidth for the clients that use Plex at home (the TV and the 3 computers that use it).
  • Hold my raw photo and video files
  • Hold installers for all IT tasks that I need.
  • run Jellyfin in place of Plex (planning to switch over once I see things are smooth) tho I might keep plex in the background, for Plex Pass if I want to access my library outside the home).
  • run majority of the apps I previously had running on my raspberry pi server (jackett, sonarr, radarr, rtorrent) tho the pi is still up running my pi hole + home assistant setup.
  • Sync to a B2 instance of Backblaze (this is a step up in cost to what I’m paying for backup but hey, it fulfills the 321 rule of storage).

Despite my complaints on the missing functionality and lock in, I’m still happy with my build. 

It’s FAST enough for my current usage, which is PLEX and offload my RAWS then edit on my main machine or mini (still need to manually sync the catalog but that will be resolved once I move to 10GBE).