Building my own NAS
homelab
linux
For a long time i’ve wanted to add a NAS to my homelab setup. I found that offerings from Synology seem great, but are quite pricy for the lack of flexibility the device provides. I decided to build my own homemade NAS device with the following criteria:
- Find a cool “NAS-y” case with at least 4 hot-swappable HDD bays
- Small Form Factor (this is a NAS, I want it to fit on a shelf nicely!)
- Build it myself so I can install any Linux OS on it
- Motherboard with on-board 1Gbe ethernet, the possibility for ECC ram, and at least 4 SATA ports + M.2 (or 5 SATA ports)
- Powerful enough to host a few docker containers/other services, yet efficient enough to keep running the majority of the time
- Resuse as much hardware as I can (I have an 8th gen Intel CPU sitting around along with RAM, etc)
The goal is to have a centralized storage server running some redundant RAID configuration. This will mostly be long-term storage, but i’d like the flexibility of using it to store RSTP or
Hardware
All the hardware used can also be found on my PCPartPicker List.
What sparked this project was me finding a really awesome looking 4-Bay Mini-ITX enclosure by “Will Jaya”. This had the exact aesthetic I was looking for.
For hardware, a goal of mine was to re-use my 8th generation Intel CPU. I also had 16 GB of RAM that I salvaged from a previous build. The full rundown includes:
- Motherboard: Supermicro X11SCL-IF Mini ITX LGA1151 Motherboard
- CPU: Intel Core i5-8400 2.8 GHz 6-Core Processor
- CPU Cooler: Noctua NH-L9i chromax.black, Low-Profile CPU Cooler for Intel LGA115x
- Memory: Corsair Vengeance LPX 16 GB (2 x 8 GB) DDR4-3000 CL15 Memory
- System Drive: Samsung 970 Evo Plus 1 TB M.2-2280 NVME Solid State Drive
- Data Drives: Western Digital WD Red Plus 4 TB 3.5” 5400RPM Internal Hard Drive (4x)
- Enclosure/PSU: Will Jaya 4-Bay NAS 3.5” Mini-ITX Enclosure w/ 220W 1U Flex PSU
I also needed a 24-pin male-to-female PSU cable (which I picked up from my local Microcenter), since the placement of the motherboard’s 24-pin was just too short for the included (non-modular) PSU cables that came with the case.
The Supermicro board ended up being a great Mini-ITX choice, given the 8th-gen CPU I was trying to reuse. It has four SATA ports and space for an M.2, which is perfect for this project.
The 4 Western Digital 4TB 3.5” hard drives to fill the hard drive bays were no-brainers. In the end, I have about 12TB usable for storage - seems like plenty for now!
One final note - make sure you have a VGA cable on-hand if you want to use an external display for setup!
Software
I ended up going with TrueNAS Core (previously called “FreeNAS”), and it was dead simple to set up! I joined my four drives to a ZFS pool at RAIDZ1. For my use case, one parity drive should be fine (although I know a lot of people disagree). I created a single volume to start.
Samba share
I created a new user in the UI, and enabled sharing my volume as a samba share. Opening finder on my macbook, the device was immediately visible.
Cloud backup
I big reason I chose TrueNAS was their ability to easily replicate volumes offsite. Doing this is equally easy in the UI.
Have a comment? Let me know
This post helpful? Buy me a coffee!