Building a NAS in 2015
I decided to build a Network Attached Storage (NAS) in November 2015 as I needed to sort out my giant mess of external hard drives that held my backups, files, and media. I decided to build my own over buying a prebuilt solution from someone like Synology, as I love building PCs and I wanted the ability to easily upgrade and customize down the line. I decided to go with a mini-itx form factor as I live in a small apartment and I wanted to keep the space usage to a minimum. I decided to go with an LGA 1150 chipset, as it’s a couple generations behind now, which means the parts are cheaper, but the performance is still plenty. When embarking on a project like this, there are some tradeoffs to consider. Speed, Reliability, Total Storage, Processing power, and of course Cost are all big factors in this equation.
My shopping list:
- 6x WD 3tb reds: $660 (amazon)
- Corsair 430w PSU: $54 (amazon)
- Fractal Node 304(case): $83 (amazon)
- Mobo (ASRock E3C226D2I): $200 (amazon)
- 2x 8 GB ECC Ram (Kingston KVR16E11/8): $120 (amazon)
- Intel Core i3 4170: $118 (amazon)
- UPS w/ PFC: $115 (amazon)
Why I chose this hardware:
Hard Drives: Western Digital RED 3TB
This is, in many ways, the heart of the NAS. Western Digital’s RED series drive is specifically built for usage in NAS’s. Some features of this drive that make it ideal for NAS applications are:
- Time Limited Error Recovery, or TLER (wikipedia): When a Hard Drive encounters an error, it was will try to repair the error. This normally is a good thing, but it cause wreak havoc on a RAID, because if the repair takes too long, the RAID controller thinks the drive is dead and removes it from the array (not good!). The WD RED drives have a 7 second TLER, which means it will “timeout” on trying to repair any errors it encounters, and then move on, as to not get kicked out of the RAID.
- Vibration Protection: The WD RED has a better built platter and motor, which reduces noise and vibration (important if you’ve got six disks running in close proximity to each other)
- Improved reliability over desktop drives: I won’t go into too much technical detail here, but the RED drives are rated for double the loading/unloading cycles of a desktop drive, and 1 million hour MTFB (Mean time before failure, wiki)
- Longer delay before parking head: A desktop drive will usually park it’s head in <10 seconds, whereas the WD RED will not park the head for 5 minutes. Without getting sidetracked into too much technical detail, this will reduce the wear on the drive. There is a tiny downside here, which is that the drive will use a tiny bit more power. It’s really not enough for anyone to notice though.
- Quiet: WD RED drives are very quiet, and 6 drives working hard gets really annoying with loud, clicky drives. I’m happy to report that the RED’s are very quiet!
note: The 3TB WD RED did not do very well in Backblaze’s Q3 2015 Hard drive failure analysis (shout out to Backblaze for being awesome and making this info public), but I’m not storing anything mission critical and I do offsite backups of my NAS to AWS Glacial storage. However, if you have mission critical data and reliability/data integrity is one of your primary considerations for your NAS, you should probably choose a drive with better results!
Case: Fractal Node 304
The case is a big decision, and the Fractal node seems to be one of the more popular choices for a home NAS these days. There are some other good options out there, especially if you want to be able to easily replace drives. Personally, I don’t mind removing 11 screws if/when I need to replace a drive (hopefully not very often with a 1 million hour MTBF. We do have 6 drives though, so this increases the chances of drive failure, obviously). If you think this will bother you, a lot of people seem to recommend the Lian Li PC-Q25B (~$120), which has ‘hot swappable’ type drive bays, which makes replacing drives super easy.
Motherboard: ASRock E3C226D2I
This is huge part of the NAS build. If there is one place you should stretch your budget, I would say it is here. While you can get a cheapo $60 consumer grade motherboard, you should really spring for a “server-grade” board. ASRock has some great options that are not crazy expensive, while Supermicro is also popular (but more expensive).
There are two huge features you’ll need that a “server-grade” board will provide:
- ECC Ram: If you are going to run Freenas, as I did, you theoretically HAVE to use ECC Ram. There is some debate on the topic, but you really shouldn’t be trying to save money here. Why would you gamble on something that could prevent all of your data getting corrupted? Worth it.
- IPMI (wiki): This is SUCH a cool feature which you will not have seen if you aren’t a sys admin. Basically, there’s a tiny, independent computer on the motherboard called a BMC. This computer can relay KVM (keyboard, video, mouse) data over the NIC (network interface card). The result is that you can remotely access and configure this computer, including but not limited to: bios & boot settings, powering on and off, etc). With IPMI, you can stuff this NAS in a closet somewhere, and if you ever need to change any settings, update the OS, etc, you don’t need to pull it out and connect a monitor and keyboard to it. Awesome!
Integrated CPU vs. Standalone Motherboard
One decision you’ll have to make is whether you’d prefer to go with a motherboard with an integrated CPU, or a board that does not include the CPU. I decided to go with a board that did not have an integrated CPU. I wanted total freedom and flexibility to upgrade in the future. The ASRock E3C226D2I (amazon) which I chose has a brother with an integrated CPU, the ASRock C2550D4I (amazon). The CPU is passively cooled, which keeps noise levels down (one less fan!). This board only has an Atom processor though, which will be fine for basic applications, but if you plan on doing anything more processor intensive (Plex, running a minecraft server, etc), you might want to consider going with a standalone board and go the core i3 route (as I did).
Make sure to get Ram supported by your motherboard. With ECC Ram this is really important, unlike buying a consumer grade motherboard. For the ASRock E3C226D2I that I used, the ram compatibility list is here.
CPU — Intel Core i3 4170 (amazon, Haswell refresh)
If you are going with a motherboard with integrated CPU, you can skip this part.
I went with the Intel core i3 4170 (~$120). I think it’s a great tradeoff between price and performance. It’s somewhat overkill, but it’s not much more expensive than the budget options where you would have to take a huge step back performance wise. Additionally, the i3 has a lower power consumption for equivalent tasks on the budget CPU’s.
If you are going to have a really ‘dumb’ NAS, solely used for file serving, there’s just no need to spend more on the CPU. In this case, the
Intel Pentium G3220 (amazon) should be completely adequate. I would not go with the cheaper Celeron (these are pretty junky nowadays, and wasteful energy wise).
An uninterruptible power supply is a very good idea, unless you are ok with having all of your data corrupted in the event of a power loss, such as: a black out, brown out, someone tripping over the power cable, accidentally turning off the power strip, etc. If you really don’t care about risking losing all the data on the NAS in something this common, you can skip the UPS; However, it’s cheap insurance (~$100) and will insure your system can shut down properly without corrupting all your data. Quick note: make sure to get one with PFC (wiki) if your power supply has PFC (very common in modern power supplies).
I went with RAID Z2, as I can have up to 2 drive failures without losing any data. It also means I have ~12 TB of usable space on the 18 TB of drives, which is an acceptable tradeoff. What’s so great about this is that if a drive were to die, I could RMA it and not have to worry too much about another drive dying and corrupting all my data while waiting for the RMA’d drive. The likelihood of 3 drives all failing in the span of <2 weeks is low enough for me to tolerate.
I got 2 of these PNY thumb drives (amazon), as they came up in my research of thumb drives that were compatible for Freenas. I got 2 so that I can mirror them for backups.
This was a lot of fun, but I didn’t take many pictures or document the issues I ran into much, but overall it was relatively easy and took me a few evenings after work to get everything up and running. If you’ve ever built a PC before, you should have no trouble. The software side of things is a bit trickier, but the Freenas community has a great forum with loads of answers to anything you might run into.
This was a really fun project, and the results are awesome. Having 12TB of space available for backups, home file storage, media, and Owncloud is awesome!