I needed a RAIDed NAS box that I could rsync to for backing up Linux filesystems. While there are commercial offerings for around the same price, none of them provided native Linux filesystems or allowed SSH access and/or rsync, so I decided to roll my own. This is one way you can make a cost-competitive and low-power RAIDed NAS box in Ubuntu that does ssh/rsync, nfs, and samba. All prices listed are approximate, since I bought more than I needed initially (see below for explanation), but prices do include shipping.
- $43.65 for a a cheap case. My main requirement was getting one that wasn’t enormous yet still had at least 4 5.25″ drive slots.
- $365.79 for VIA SN10000EG motherboard, 512MB RAM, and power supply kit.
- $9.35 for a 1:4 MOLEX splitter and a 1:2 MOLEX splitter.
- $46.55 for a 110W DC Power Supply.
- $44.98 for an 8GB CF card as my boot disk. You can probably get by with 4GB, but I wanted room to add more software to the box.
- $78.78 for a 4x SATA hot-swap box. (requires 5x MOLEX cables; provides 4x SATA cables)
- $391.89 for 4 factory-recertified 500GB SATA drives. (no link because the same drives don’t stay in stock long)
- total ~$980.99(*)
You can probably do it cheaper if you have different requirements. I wanted to reduce the number of moving parts and keep power consumption low, so I went with a passively-cooled mini-ITX motherboard and a CF boot disk. You could easily save about $300 by using more conventional motherboards, but keep an eye out for how much it costs to run the box constantly. My design only has 6 moving parts: 4 SATA HDDs and 2 cooling fans for the HDD enclosure. When off, the power brick consumes 4W (there are likely better models available). On boot, it spikes to 133W while the HDDs power on. At idle, it consumes 67W, and when the RAID is under heavy access, it consumes 77W.
Once all your parts are in, assemble the system. The only tricks involve the power converter board and the hot-swap enclosure. Stick the unprinted part of the power converter motherboard into the PCI Express slot on the motherboard, to keep it away from metal. I also recommend that you attach your enclosure’s topmost SATA drive slot to SATA connector 1 on your motherboard, following the progression down to the bottommost SATA drive slot connecting to SATA connector 4 on your motherboard. This way, if, say, /dev/sda1 fails, you’ll know it’s behind the topmost door in the enclosure.
(*) I ordered more parts than I needed to, and if I avoided the waste with a second RAIDbox, I think the price would be closer to $900. Specific areas of waste were due to cabling and necessary PSU upgrades.
One thought on “Ubuntu RAIDbox: Part 1”
By the way, huge thanks to CPLUG members for helping me in my research. In particular, I couldn’t get PXE booting to happen without Chris Moates’ help on what combination of software to use, and he and several other CPLUG members offered key insights into how software RAID worked in Linux.