In this age of generous broadband quotas, plentiful high-definition media content, vast collections of MP3s, system images and much more, the demand for reliable and constantly available storage is growing exponentially. It’s no longer a question of if we will run out of storage, but rather when. Fortunately, the constantly falling prices of hard disk drives and off-the-shelf Network Attached Storage (NAS) solutions has resulted in easy-to-use storage being available to everyday users. With disk space running low and wanting a more elegant solution, I set about my project of creating and documenting a DIY home-based NAS, with the following challenges in mind:
* Affordable / maximum value for money (can be made out of leftover parts)
* Capacity for at least 9 SATA HDDs, with space to grow in future
* Capacity for at least 8TB initially, with space to grow in future
* Expandable to at least 11 drives later
* Expandable easily, without having to wipe the existing information
* Reliable, with data redundancy, in the event of HDD failure, notifications
* Remotely administered by network (other known as a headless server)
* Accessible by all machines on the local network over wired/wi-fi
* Low power consumption
* Efficient usage of space
* Network performance sufficient to stream HD content
* Compact / quiet
* Low maintenance, set and forget
The services the NAS must provide are:
* File sharing to networked Windows machines and other devices (via SMB/CIFS)
* Bittorrent client for 24/7 downloading
* FTP server for remote file access
* Automated backup
* DLNA / Media streaming service to Xbox360 and other devices
* HTTP web server (optional)
SATA controller cards, if you have any lying around, they will come in useful.
Reasonable goals, I would suspect that many others fall into a similar category. We have some leftover low-end parts lying around, want affordable storage and are not the most technical people. On further research, there appeared to be two paths to achieve this goal. The first is buying a ready-made NAS unit, such as one from the main NAS manufacturers such as QNap, Synology, Netgear, Drobo or Buffalo. They generally offer hot-swapping capabilities, easy web administration, low power consumption and a variety of add-ons which allow for the above services to be run, hassle-free. But price-wise, their 4-bay solutions are around the $500 mark, with the 6-8 bay solutions close to, or over the $1500 mark, keeping in mind this is before HDD’s are purchased.
The second (and arguably more enjoyable) solution, is a DIY build. This would involve piecing together PC components of various origin, in a standard PC case, all geared towards achieving the above objectives with bang for buck as a priority. As I found out, the price difference is immense, the setup surprisingly easy, not to mention the satisfaction in a DIY build. There are also a multitude of NAS-oriented OS solutions available which I will also cover later. First, let’s discuss the components.
* The Case
The case is one the most important components here. In a NAS build, you don’t need space for fancy graphics cards, but instead as many 3.5″ HDD bays as possible. If you were running 6 or less HDDs at most, then there are stand alone compact cases available (such as the Lian Li PC-Q08 for $159). However, since we’re looking at long-term expandability, we need HDD bays. Alot of them. The standard Mid-Tower ATX cases generally houses 6 x 3.5″ bays, and 4 x 5.25″ bays, differing depending on individual design. Very few mid-tower cases remain affordable whilst offering more than 6-7 3.5″ bays, that’s why 4-in-3 bay adapters were invented. They allow the mounting of 4 (and sometimes 5) 3.5″ HDDs in the space of 3 x 5.25″ bays (which generally remain unused in this age where DVD drives are becoming a rare sight). The Coolermaster STB-3T4-E3-GP is one such solution, coming in at $39, whilst opening normal cases up for mass storage solutions. You are going to want at least a few fans drawing in cool air over the HDDs, and exhausting the warm air out of the case.
4 x 3.5″ HDDs in the space of 3 CD-ROM bays, with a fan included!
There are also 5-in-3’s available, or you can choose the cheaper option and use adapter brackets (for a 1-to-1 ratio).
I ended up choosing a Coolermaster Elite 430 case with 7 x 3.5″ bays, 4 x 5.25″ bays, included 430W power supply, dust filters and all for $64. It even looks half decent. If you wanted to go for something fancier, check out the Fractal Designs Array R2 (w/300W) – 6 x 3.5″, 1 x 2.5″ – $249. Very aesthetically pleasing, but the PSU is proprietary and non-ATX in dimension, meaning long-term PSU replacement may be troublesome.
* Power Supply
This doesn’t need to be too fancy, as the rest of the system is quite low in power draw. The largest draw will most likely be the array of HDDs, especially on bootup if they are are not staggered. Since HDD’s draw most of their current from the 12V rail (around 0.5-0.6A – 6W), sufficient total amperage is required here, with secondary consideration being given to pricing, efficiency and noise. I would stay away from no-name power supplies, instead opting for something mid-range in the Corsair / Coolermaster / Antec / Thermaltake range. A good option is the Corsair VX450W (33A on 12V) $88, but I ended up using a spare Thermaltake 430W PSU I had lying around. Extra SATA power connectors is a bonus as well, but not vital if you have enough splitters, as we will see later.
* CPU / Motherboard / Memory
NAS servers generally don’t require very powerful CPUs. If you will be running a parity-based RAID system, then parity calculations will take up the majority of any active CPU usage. After adding on OS / IO overheads, various web/FTP/BT servers, overall CPU usage is still quite low. Having said that, RAID5 performance on some standalone NAS systems is actually bottlenecked on large write operations, as they may pack in extremely low-power low-end CPUs. Anything faster than an old P4 or a Pentium Dual Core (E3300 or above) will have more than enough grunt to handle everything here. This will change depending on which motherboard you choose.
SATA power cables and data cables. You will be needing lots of these.
The choice for motherboards is important, not only due to the number of SATA ports available, but also the type of slots. For a NAS server, we prefer integrated graphics of some kind, a gigabit network port, and as many expansion slots as possible for to base more SATA ports on. You can opt for something like an Intel Dual Core E3300 w/Asus P5G1C-M – $114, using about 85w in total. If you have any DDR2 RAM lying around, this board will take it as well. Alternatively, if you want something more integrated, the Gigabyte GA-D525TUD (w/integrated Intel Atom D525) – $119 taking up around 45w in total. I ended up using an old Gigabyte GA-G41M-E2SL I had lying around, with an E5300 in there and 4GB of DDR2 (though anything more than 1GB is plenty).
* Storage Controller
The board that I chose utilises the Intel ICH7 to control the 4 SATA ports. However, we know that 4 SATA ports is insufficient, so what now? Enter the SATA port multiplier, the Addonics AD5HPMSXA (based on a JMicron JMB393) – $135. This standalone SATA controller allows one SATA port to be multiplied into five, enlisting the aid of it’s own on-board controller for hardware RAID functions (if required). It requires no PCI slots or any physical connection to the motherboard apart from the SATA cable, thus rendering the 4-port SATA board into potentially a 20-port SATA board. Of course, if all channels were running at maximum, serious bottlenecks would occur, but at $135, it’s miles ahead of the 8+port PCI-E SATA RAID solutions in the value stakes in what it allows.
5-port SATA multiplier. The jumper configuration is set to ‘Individual Drives’ mode, which should allow the controller to see up to 5-drives, through 1 SATA port.
However, it turns out that the ICH7 does not support such port multipliers working as multipliers. Instead, only in pre-specified RAID modes (which we won’t be using), or JBOD’s (which then renders the disk as one, with increased likelihood of failure). Only specific SATA controllers allow PM’s to recognise individual drives, with the common ones being those based on the Silicon Image 3132 or 3134. Naturally, I only discovered this after ordering the AD5HPMSXA. But if you don’t want to replace your board, you can buy add-on SATA controller cards such as the Sunix 1414 which is based on the Sil3132 to plug the port multiplier into. Alternatively, you could always just use a 4 port PCI/PCI-e SATA expansion card, either way will work (this latter method is far simplier than mine).
Sunix 1414 1+1 SATA controller. There are also 2-port and 4-port options available, both in PCI-E and PCI options.
Confused yet? This might help to explain the way this particular NAS is set-up:
* Hard Disks
Onto the HDDs then. Three common options currently exist for 2TB drives, which are the most cost-efficient option for NAS units, keeping in mind that 2 x 1TB drives will use more power than 2 x TB drives (and also using up valuable slots).
The Western Digital Caviar Green WD20EARS ($102), Samsung EcoGreen F4EG (HD204UI) ($96) and the Seagate Barracuda LP (ST32000542AS) ($99). Price-wise they are all virtually indistinguishable, with feature differences being the WD has 64MB of buffer vs 32MB on the others (also having a 65G shock resistance vs 70G on the others). The EcoGreen has a 5400rpm spindle speed vs 5900rpm, as well as the loudest operation at 29dba (vs 24-26dba on the others). The Barracuda has the highest power consumption at 6.9w vs 6-6.3w for the others. As you may have gathered, these differences are minimal at best, since these aren’t performance drives, the transfer speeds are also mostly irrelevant. All 3 drives are covered with a 3 year warranty.
I ended up picking up 4 x 2TB Seagate Barracude LPs. They will join 2 x Samsung 1.5TB (HD154UI), a WD 1TB (WD10EARS), and two WD 750GB (WD7500AVVS) to provide a total of 11.5TB of hard disk storage (though we will lose 2TB to parity checks as explained later). In the picture, you will notice there are enough slots for 3 more HDDs. After that, either some custom brackets will be required, or an external enclosure of some kind for future expansion.
Let’s say worst case scenario, you had nothing to start off with and bought all the parts required, you would be looking at $418.00 for the E3300/P5G41C combo in that case, with the Coolermaster 4-in-3 and 8 available SATA ports (through a 4-port SATA card). Add around $70 for each additional 4 SATA ports you will be using. For 4 x 2TB Seagate Barracuda drives @ $396, this works out to a total of $814 for an 8-TB NAS with 8-bays, with alot of expansion options, much cheaper than off-the-shelf solutions, even without HDDs. I was fortunate enough to have salvage lying around which I could use, thus bringing the price down.
The question is, how do we tie all this together and make it work? Stay tuned for Chapter 2: Software (and Making It All Work). If you have any questions, thoughts, etc. please feel free to comment.
The finished product. I tried to keep cabling as neat as possible, there are 3 further slots for additional HDDs later, and some empty expansion slots for more controller cards.
UPDATE: Part 2 of Build is complete! Click here.