Apr 182013
 

Intro to a DIY NAS

Lian Li PC-Q25So you want to consolidate your data and have been looking for the ability to store and serve to all the computers in your home. What better way to do this than creating your own NAS (network attached storage)? One could buy a preconfigured NAS such as the well reviewed Synology DiskStation 5-Bay DS1512+, which comes in at a hefty $800 without any disks! However, I have always been an advocate of DIY projects that can save you money and maybe teach you something along the way. Building your own NAS is a perfect candidate for the consummate ”DIYer” and with a little planning and background knowledge you will save a lot of money and get that warm fuzzy feeling when your build is complete. This build is directed toward using FreeNAS but will work with other NAS software solutions as well.

 

 

Key features of a DIY NAS
  • Low power consumption - electricity can be costly on a 24/7 appliance and will not get any cheaper. Some preconfigured solutions pull way too many watts and that will show on your monthly bill.
  • Choice of hardware components – you can look for the best deals to give your NAS the power that you need through careful planning for immediate and future storage needs.
  • Choice of OS – there are many different free and paid options out there to manage your NAS and each has their strengths and weaknesses. I will review a few of the popular ones later in this article.
  • Expandability - being able to easily upgrade your storage when the time calls for it is definitely a plus.
  • Reliability - your data is obviously important and redundancy is key to making sure you can survive a hard drive failure and recover and rebuild.
All of the above features are important, however at the end of the day cost is usually the biggest concern. So let’s get down to the nitty gritty and start choosing our basic hardware, while keeping cost in mind for the average user, and options for smaller and larger budgets.

Hardware

Motherboard and CPU

While almost any old hardware you have available would work well for a NAS, one of our main key features included low power consumption. A poor choice here could cost you more money spent in electricity the first year than the cost of the component itself.

The ideal board and CPU would:

  • be energy efficient
  • have as many sata ports as possible for expandability
  • have a gigabit lan connection
  • not cost an arm or a leg
  • handle the data load reliably
  • have a form factor that will keep our NAS footprint small

Asus C60M1-I NAS motherboardTaking the above points into account I found a perfect CPU/Motherboard combo that meets all of our requirements. The Asus C60M1-I going for a mere $80, has a dual core AMD C-60 processor and is based on the AMD Brazos platform.  The mini ITX form factor will help keep our footprint and power consumption down and having 6 x SATA 6Gbs ports, it seems like it was destined to fill the role of a low power server or HTPC.  Another plus is how quiet this board will run with its fanless heatsink design. While only “officially” supporting only 8GB of ram you can run 2x8GB sticks to get 16GB without any trouble. The onboard Realtek 8111F Gigabit LAN is not the greatest but is supported and works with most of the NAS software solutions available.

Due to the limited availability of the Asus C60M1-I, a more expensive but powerful alternative to this board/cpu would be a combination of the ASUS P8H77-I and the Celeron G1610 for a total of $148

Total cost so far: $80

RAM

Kingston HyperX BluAccording to FreeNAS hardware recommendations using the ZFS filesystem, as much memory as you can throw at it will increase performance and reliability.  Our motherboard can “unofficially” handle 16 GB total, so we will fill both slots and take advantage of the situation as memory is still fairly cheap. I chose Kingston HyperX Blu 16GB Kit (2×8 GB Modules) 1600MHz DDR3 to round out the memory and at $110 isn’t a bad deal and slow 1066 MHz memory is hard to find. The board will only clock the memory to 1066 MHz, so having the faster memory is irrelevant.

Total cost so far: $190

 Case

Lian Li PC-Q25Now we are going to need to find a suitable place to house all of our components while keeping things compact and easy to work with. The Lian Li PC-Q25B is a most righteous case that easily fills this role with aplomb. It’s a bit pricier than many other cases at $120, but it more than makes up for it in features, aesthetics, and build quality. This mini-ITX tower chassis has a built in 5 bay hot swap cage for 3.5″ drives and can hold a total of 7 3.5″ hard drives.  The hot swap capability is easily worth the price of admission and with the ability to use a standard ATX power supply you have one of the best compact NAS cases to be found.

Another option would be the Fractal Design Node 304 for around $110. It has 6 hard drive bays and can also accept a standard ATX power supplyFractal Node 304

Total cost so far: $420

Power Supply

SeaSonic SSR-360GPWith the NAS running 24/7 we need to efficiently supply power to all of the components. The best way to do this is to size your power supply so that the total system idle/load watts are between 20-80% of power supply rating. To help you figure this out a good calculator can be found here. Any supply with an 80+ rating would be beneficial so I chose an 80+ gold rated supply for our build as the payback on a platinum rated model is still ridiculous.  I have chosen a Seasonic SSR-360GP 360W 80PLUS Gold ATX power supply. It has plenty of clean juice for all of our components and will run cool, quiet, efficient, and for $60 is a good deal on a quality power supply.

Total cost so far: $480

Storage

SanDisk CruzerFit

FreeNAS Drive

FreeNAS requires a minimum of a 2 GB flash drive for installation as the system is a running image (runs directly from drive), 1 GB is partitioned for the operating system and the other 1 GB is reserved for upgrades. I opted to go with a $7 SanDisk Cruzer Fit 4 GB USB Flash Drive to use for my FreeNAS installation. Here is the official guide for installation.

Total cost so far: $487

Storage Drives

WD RED NAS HDThis is where the little NAS box will get expensive. Storage isn’t cheap and reliable drives are even more expensive. I would suggest starting with a RAIDZ1 configuration and using the 5 available hot swap bays. Using RAIDZ1 will mean that if one disk fails you can replace it and “resilver” or rebuild the drive and maintain the array. There is always a certain amount of risk when using any type of raid and if you want more of a safety net check out the other RAIDZ versions here. For the disks I have chosen 5 WD Red 3 TB NAS Hard Drives at $158 each ($790 total). The Reds are purpose built for a NAS system and are well worth the extra money.  This will give us 1 drive for parity and 4 drives for storage that is a gross of 12 TB or 10.5 TB net (useable) storage with 3TB for parity. If you don’t have the money for that much storage just substitute the 1 TB ($390 total) or 2 TB ($580 total) versions in the same quantity of 5. Check this article for why you need a purpose built hard drive

Total cost so far: $1277

Optional Hardware

If you want better network throughput and have the managed switch to take advantage of link aggregation of two gigabit interfaces together then I suggest using a dual intel network interface card. They are rock solid and reliable and the best deal I have found is a Intel PRO/1000 Pt Dual Port Server Adapter at $80.

Optional Software

There are many different NAS software distributions that you can try. Here are a few to check out:

  •  unRAID - very easy to upgrade, low hardware requirements, slower transfer speeds than other NAS software, after three disks a license must be purchased.
  • OpenMediaVault –  easy to install, full featured, free, and good performance.
  • Nas4Free - very similar to FreeNas using the ZFS filesystem.

Conclusion

Well I hope I have shed some light on the hardware and software needed to get a home NAS running. By building our own box we can expand in the future and saved over $300 compared to the Synology system at the beginning of the article if we used the same disks.  The hardware chosen will give you a NAS that will serve almost any home users needs. I will be doing a post about the setup of FreeNas in the coming weeks.

Check out my other article on an Affordable DIY NAS!

Let me know if you have any questions or comments!

 

Last updated by on .

 Posted by on April 18, 2013  Add comments
  • http://twitter.com/jrphoenix77 Foxfyre

    Sounds like a great idea! Getting a newer Wireless N router with USB ports and a large externall hard drive would be quite a bit cheaper though in my opinion. Especially since most people probably already have one or the other.

    • http://www.technutz.com/ Gary the TechNut

      Depends on what your needs are. Some people have multiple devices that would be accessing that disk through the low bandwidth usb port…for backup, streaming, and file transfer. Imagine trying to drain a small 5000 gallon swimming pool through a hole about the size of a dime vs. being able to use a firehose. Also, what do you do when you need to add more storage? This would be an ok solution for someone that just needs to access small files on a few computers, but definitely not ideal for serving a wired home with multiple computers and HTPC’s. Or for someone moving very large files. The performance is just not there.

      • http://twitter.com/jrphoenix77 Foxfyre

        I will give you the low bandwidth for one reason. For whatever reason, router manufacturers don’t seem to be intelligent enough to know that wireless N needs USB 3.0. As such, the USB ports that come in most new routers are 2.0. Which probably won’t cause a problem for most people unless they’re doing really high bandwidth stuff, but it is disappointing. If these routers came with USB 3.0, then the bottleneck issue wouldn’t really be there.

        • Andy

          You are completely ignoring the CPU part. Forget low end routers, not even many high end routers have the processing power to saturate usb2 bandwidth let alone gigabit or usb3 bandwidth. There’s also an issue with 2.4ghz band interfering with usb3 causing slow speed and dropped connections.

          Unless all you do is listen to mp3, a dedicated nas solution like this is the way to go. I am currently using the Raspberry Pi as a NAS but that 10 mb/s speed is really testing my patience. It get tiring when you need to transfer large files often.

  • http://www.technutz.com/ Gary the TechNut

    Depends on what your needs are. Some people have multiple devices that would be accessing that disk through the low bandwidth usb port…for backup, streaming, and file transfer. Imagine trying to drain a small 5000 gallon swimming pool through a hole about the size of a dime vs. being able to use a firehose. Also, what do you do when you need to add more storage? This would be an ok solution for someone that just needs to access small files on a few computers, but definitely not ideal for serving a wired home with multiple computers and HTPC’s.

  • olos

    Great article. Thanks for the guidelines.

    I think you should also mention about encryption supported by FreeNAS which also justifies the need in hardware changes (hardware with AES instruction set support – Bulldozer and Piledriver based processors, Intel – i5 and i7).

    I’d love to see your next article about FreeNAS. Is it possible you could describe how to port (create) plugins in FreeNAS (perhaps duplicity or xbmc)?

    • http://www.technutz.com/ Gary the TechNut

      The new disk encryption is definitely exciting and offers up enterprise level data protection. You can do the full disk encryption with hardware that does not support the AES instructions set…however, a 20-30% performance hit will be taken by the processor due to the extra overhead encountered. Also, if you already have an unencrypted volume created you would have to back up and rebuild the volume to enable the new full disk encryption.

      I agree that if you are looking to encrypt your data that hardware level AES instruction set is a must to lower the processing overhead.

      I’m not sure if a plugin has been created for xbmc for the plugins jail. I do know people use the popular plugin minidlna to serve to other devices running xmbc etc.. I will look into this more and see what I can find.

  • Kosta

    Just started researching and looking into building my own NAS with the minimal hardware needed to achieve the top speed of a GB network. That said, I have a DNS-323 now, which tops at about 22mb/s read, and 16mb/s write. I am hoping to achieve full speed of my network, with writes hopefully at about 100-120mb/s, and also very speedy reads. My network is completely CAT6 with all certified components which should achieve that. All in theory of course, but I hope to achieve speeds of at least a commercial NAS devices like QNAP and Synology.
    Also it would be nice if possible to run a RAID10 with 6-8 disks, like in the Synology 8-disk station, however never found a board with 8 SATA ports. I reckon a SATA RAID card would be necessary for that.

    So the question is simple (which goes for both situations, 6x HDD on the board, or the PCIEX SATA card separately):
    Would the processing power be enough for that? I noticed the Synology NAS have usually dual core CPUs, while here a proposed speed is dual core 1Ghz. How does that measure?
    Thanks
    Kosta

    • http://www.technutz.com/ Gary the TechNut

      You can get a port multiplier like this http://amzn.to/YrXK4B to expand the number of disks and still retain your pciex slot for a good network card like this one http://amzn.to/10l4R16 and do link aggregation. You should be able to get close to the speeds you mention (around 80-100 mb/s) using the Intel card vs. the onboard Realtek LAN. I am going to have to do a little digging around to double check that the SATA chipset on this board is port multiplier aware.

      • Kosta

        Alright, that sounds great. At the beginning it’s going to be 3-4 disks, but it’s good to know I am future proof with the port multiplier.

        The NIC sounds fine, however I never knew one can connect two network cables to one device and have higher speed?? But I’m just googling link aggregation, so I’ll learn :)

        The open question is still if the dual core 1Ghz CPU on this motherboard is enough to achieve the speeds, or does the CPU speed play ANY role in how speedy the network transfer and disk writes are? I read also somewhere that the port multipliers take away the SATA port speed and also take more CPU cycles, correct? Wouldn’t then a faster CPU be better? I of course still want to maintain lowest power usage possible.

        • http://www.technutz.com/ Gary the TechNut

          You should be fine with this CPU, that being said, you don’t need to be concerned so much with cpu performance as local disk access (internal to the system)is going to be much faster even with a port multiplier. You will still be limited to gigabit speeds (128MB/s theoretical, ~80MB/s in practice) accessing the NAS over the network. The biggest point in hardware when building around FreeNAS is the memory. The more you have the better the performance :)

          • Kosta

            Thanks, I already read the FreeNAS guide too, explaining some things about the file system and the need of AES-NI encryption on the CPU, I know only some CPUs have it. However, not really sure if I should encrypt data. It’s not corporate server, it’s just a mere home server, photos, music, videos, movies, the usual stuff.
            Why is it so hard to achieve full speed, I mean, what is needed?? One another thing gave me a thought: say I connect the NAS with two cables to the router/switch, but the cable between the switch and the router/switch is a single CAT6, and also from the switch beside the computer is also a single connection – wouldn’t these connectionis block the communication, meaning I should also have two cables between the switch and the router/switch, and to the computer? Or are two cables only needed when connecting the NAS to the switch?

            Only darn thing is, the Intel NIC you proposed is $60 in the US, and 140€ here (around $160)!!

            Would this combination be a better solution maybe (it’s merely €40 more)?:
            AMD A4-5300, 2x 3.40GHz, boxed
            ASRock FM2A85X-ITX, A85X Sockel-FM2

            I would still need the Intel NIC though.

  • Pingback: HTPC Build | Intel Next Unit of Computing (NUC) - TechNutz.com

  • JPH

    Thank you for the great DIY guidance, I am going to build a NAS based on your recommendations.
    Do you know any 5-bay cases, without doors (the 5th bay will host a blu-ray) and which includes activity leds for the hdd?
    Thank you

  • AJO

    Gary you are the man with your builds!!

    What would be a good motherboard (at least 5x SATA 6Gbs ports) to use if I wanted to use the

    Intel Core i3-3220T you used in your HTPC build? I want to use Plex Media Server on my NAS and read on their FAQ that if I wanted the NAS to transcode 1080p I would need at least a Core 2 Duo 2.4ghz CPU.

    • http://www.technutz.com/ Gary the TechNut

      Here is the board you would need http://amzn.to/14CBdVg it has 6 sata ports and will work great for this application. Not too many 1155 itx boards with this many ports :)

  • Pingback: Purpose Built NAS Hard Drives and Why You Need Them - TechNutz.com

  • amar

    Gary,

    Can a home built NAS system double as a personal cloud storage? (meaning the storage is in my house and not on a remote server). If so, what components might be used for low cost personal cloud setup? My goal is to have no monthly or annual service fees, and keep my files/data off remote servers (NSA revelations show possibility of loss of privacy, ownership, and freedom on public servers/services)

    Thanks

    • http://www.technutz.com/ Gary the TechNut

      You could use ownCloud (http://owncloud.org/) running on Ubuntu server (http://www.ubuntu.com/download/server). There is a great guide here: http://ubuntuserverguide.com/2013/03/how-to-install-owncloud-5-in-ubuntu-server-12-10.html. Here is a build list (http://amzn.to/14R9spO) minus hard drives that totals under $200 and will give you storage upgrade options in the future by adding a SATA card. Just add the disks you want to use.

      While you could add ownCloud to FreeNAS, it is a pretty involved process to add this type of plugin.

      • amar

        Gary… Wow! Great information and great resources. I will definitely look into this.

        Okay, I might be trying to bite off too much in one solution… but I will ask at the hazard of sounding too dumb…

        Would it be ridiculous to think to maybe bump up to an Intel i3 and dual boot into an occasional PC so my son can do school work (his PC is Windows XP and showing age). The demands on NAS file sharing/backups or Cloud access could be coordinated around this school work. If reasonable… would Intel i3 processor be too much energy consumption for a NAS/PC used 24/7 (assuming any non-school work would be NAS/Cloud use)… Just let me know if I am crazy.

        Thank so much…

        Amar

        • http://www.technutz.com/ Gary the TechNut

          Your very welcome Amar,

          To be honest the Celeron G1610 could do all of what you are wanting to do with no problem. If you want a little more performance the i3-3220T (http://amzn.to/121auBk) is another option and it only draws a max of 35 watts. You can do whatever you want with your NAS/PC ;) that is one of the great things about DIY!

          Gary

          • amar

            Gary… That’s good news, pretty exciting to find a solution that should be better than some of the off the shelf NAS (I was lookiing at “WD My Book Live Personal Cloud Storage NAS”, but it was getting mixed reviews). I built a PC about a decade ago, now it is time to do it again with my sons.
            … . First time to your site, but have you bookmarked and am now subscribed.

            Thank you,

            Amar

  • Pingback: OpenELEC HTPC Build | XBMC Media Center on the Cheap - TechNutz.com

  • Goober

    Thanks, Gary – great build, except for one thing: that Asus C60M1-I motherboard has apparently been discontinued, and is almost impossible to find at a reasonable price any more. A couple days ago Newegg had an open-box sale on them, and they evaporated before I had a chance to order. If anyone hears of a successor to this board, or knows of a mobo/CPU combo like this, with 6 SATA ports, for around the $80 price point, I’d sure love to hear about it! An Intel Core i3 board and CPU is out of range for me, price-wise.

    • http://www.technutz.com/ Gary the TechNut

      Your welcome Goober, It’s quite a shame about the availability of the Asus C60M1-I as it was such a great deal. I am on the hunt for a replacement to recommend and will update this post when I find it. As of right now I have only found one solution that is almost twice the price to stay in the mini-ITX form factor and not compromise on SATA ports. Of course it has a much more powerful processor and room for RAM.

  • Pingback: An Affordable DIY NAS Build 2013 | FreeNAS Edition - TechNutz.com

  • rusty shakleford

    “The onboard Realtek 8111F Gigabit LAN is not the greatest but is supported ”
    im finding this not to be true, but it seem like a Intel gigbit NIC is better anyways

  • Robert

    As this DIY-PC-NAS is supposed to run (not only-but mentioned) FreeNAS with ZFS, I would have thought ECC memory to be mandatory in order to avoid single bit flips in broken RAM DIMMS, that might be able to damage ZFS checksum funcionality and therefore its data integrity which can mean data loss!! There are lots of articles and discussions about this issue around the net. Of couse this would raise mainboard & DIMM prices quite a bit.

  • KGC

    With a FreeNAS + ZFS setup isn’t it mandatory to have ECC memory? This would mean that you need a server grade motherboard too, isn’t it?