Building a FreeBSD NAS, part I: The hardware
Tags: howtos, freebsd
I recently found myself on a nice vacation with some time on my hands, so I finally set out to carry out one of my side projects—building my own NAS.
This is the first post of a (planned) series of articles, detailing my journey into the jungles of both hardware and software. I am by no means a hardware expert, put I did put at least some thought into the whole endeavour. If some of my choices seem questionable to you, it might not have been enough effort on my part.
Please note that one of my goals was to build a NAS that does not consume too much power. When in doubt, I sacrificed performance for decreased energy consumption.
After reading many tests comparing performance and energy consumption, I settled for an Intel Celeron G530 processor. My alternative choice would be an Intel Celeron G540, but they were out of stock. Both processors have a low energy consumption and their default fan is running very silently. With their 2 cores, the NAS will have enough CPU power to, say, stream videos while running some background jobs.
I quickly settled for a microATX mainboard with integrated graphics because I do not want to use extension cards. In this category, the mainboards by MSI have been given mostly good reviews. This narrowed to my search, and I ultimately homed in on an MSI B75MA-E33 mainboard. The board has all the nice features I want:
- Integrated Intel HD Graphics (HDMI and D-SUB connectors)
- Integrated audio (not sure whether I am going to use it; the specification claims that it has 8-channel support but I did not try this so far)
- 2 DDR3 slots
- USB 3.0 support
- A Gigabit LAN port
- 1 SATA III port and 3 SATA II ports
The SATA ports are especially interesting: I planned on adding one hard drive exclusively reserved for the operating system. Here, performance is definitely nice to have. The hard drives that provide the actual storage of the NAS do not require 6 Gb/s transfer speed.
To accompany the mainboard, I also bought some SATA cables, because you can never have enough of those.
For my configuration, I selected a 4 GB Kingston RAM module (KVR16N11/4). Should RAM turn out to be a bottleneck later on, I can always upgrade to 8 GB.
This is where it gets interesting. The NAS shall not be too loud and its idle power consumption shall be as small as possible. I thus looked out for a power supply marked 80 PLUS. This certification means that the power supply has more than 80% energy efficiency at various load levels. Since the NAS probably will not require much power all the time, it makes sense to invest in an efficient power supply. I finally selected a beQuiet! System Power 7 300W power supply. A quick digression: This brand seems to cater to the European market only, but there have been talks of expansion. Be sure to try out one of their power supplies if given the opportunity. The components have a high quality and the fan is very silent.
When ordering the power supply, I made a beginner’s mistake: I did not pay attention to the number of SATA power connectors. It turns out that I required to buy a separate Molex to SATA power adapter. Who in their right mind builds power supplies with only 2 SATA power connectors? Apparently most of the manufacturers do, as I now know…
Since I wanted to reserve one disk for the exclusive use of the operating system of the NAS, I did not have many choices here. I purchased a SanDisk SDSSDP-064G-G25 64 GB SSD. An SSD consumes less power in general, and I want to reserve the option of turning off the remaining hard drives of the NAS during standby/idle times. I also purchased a Digitus 3.5” mounting kit for the SSD. Again, this manufacturer seems to be European as well. From the sight of it, the products by Rosewill look like the best alternative for the US market.
For the storage, I bought two Western Digital Red (WD20EFRX) drives with 2 TB each. WD claims that these drives are NAS-optimized. The 3-year warranty was definitely a convincing argument for me. While I do not plan on letting my NAS run 24x7, it sure is nice to know that WD considers these drives to be suited for that sort of operation. I like to keep my options open. Some reviews also demonstrate that the drives only consume about two thirds of the power of comparable drives for file accesses. All in all, this seems to be worth the extra price.
I also purchased two hard drive vibration absorbers. In Germany, they are sold as Sharkoon HDD Vibe Fixers. On amazon.com, I have seen the Nexus DoubleTwin hard drive vibration absorber. Basically, you want some sort of fixture for the 5.25” bays in your case so that the hard drives do not vibrate. This is really worth the bother—when I installed the absorbers, I initially thought the power was not connected to the hard drives! Now, my NAS makes no sound except for the running of the fans and the trademark whirrrrrrr when the hard drives turn on for the first time.
Since I have a spot near my desk that is large enough for a mid-tower case to fit in, I did not go for the specialized NAS cases. While cases like the Lian Li Cube look really cool, getting everything to fit in there is really annoying. I thus bought a mid-tower case, the Sharkoon Rebel9 Pro Economy. While not as stylish as the smaller cases, it is well-built and has nine 5.25” bays. For the non-European market, the Gamma classic by NZXT appears to be a good choice, as well.
With all that talk about power consumption above, it is now time for some numbers. In its out-of-the-box configuration (with all drives present), the NAS consumes about 35W, which is not that bad. After some optimizations, which I aim to explain in another post, I managed to decrease the power consumption to around 23W during idle time. I am still evaluating the power consumption under different scenarios, but I am already happy with anything below 30W.
Some assembly required
I now pull a mathematician and finish with “the actual assembly is left as an exercise to the reader”. In all seriousness, though, there are better guides for doing this. I definitely recommend one of Jeff Atwood’s guides on building, upgrading, and rebuilding a PC. All guides are humorously-written and contains lots of good advice for aspiring PC builders.