Tuesday, April 23, 2013

Why we need a NAS (file server) at home

The modern home is digital and networked. More and more devices or their supporting set-top-boxes/peripherals are getting connected to the Internet as well as each other for sharing data such as music, pictures, videos, etc. What started with just the PC/Laptop having this connectivity has invaded smartphones, tablets, TV or TV set-top boxes, surveillance cameras, camcorders, digital cameras, etc. Maybe the future will involve white goods too (refrigerator, microwave, etc). 

They key point is in this digital and connected world, devices have their own content (generated or consumed) in digital format  like


  1. videos is growing to astronomical sizes. 1080p is easily in access of 10 GB per movie. We have our consumer digicams and camcorder generating this data at home which we wouild like to backup as well as surveillance data
  2. music which is encoded as lossy with MP3 codec now has a better option of FLAC which does not compromise fidelity (of the source from here it is made) but would take up much larger space than MP3. 
  3. Data of gaming consoles, smartphones and other handheld devices
  4. And of-course our PC and laptops have data which needs a backup (application installers, our generated data)
And we need storage do maintain these library. Tons (or rather terabytes) of it. .

Whether you buy all this electronic content, or download pirated variants, or just say exchange with friends, their is a cost (in terms of the pain) to re-download it incase we lose it. I have 30$/month broadband connection in India which can move a 4 GB per day from the cloud to my network, till the Fair Usage Policy (FUP) kicks in after 25 GB and throttles my broadband speed to just 128 Kbps. Besides you may not get the content also (like some old videos or photographs you recorded).  Their may be  need to talk and explain that why you want to download again. You need reliable fail-safe storage.

So how do we handle this ? Two ways actually:

  1. the first is to tie storage to access devices (smartphones, tabs, Pcs, Music streamers, HTPCs etc)_ and always keep a copy on centralized non-RAID storage. You have to manage  downloading from cloud, moving from download device to access device and moving it to backup device. And it may not be possible to automate this always. Also the access device has storage constraints  what if it gets full and we can't expand storage. 
  2. The other option is to use an *extensible* centralized storage (aka NAS) which can support multiple access protocols (NFS, CIFS, Apple, DLNA, etc), concurrent clients and a high speed wired+wireless router which can help access devices pick up this content on demand from the NAS. In essence my own personal cloud. 
I chose the 2nd option. I like the idea of separation of storage, compute and access devices simplu\y because I can upgrade the parts as and when they reach obsolescence.

Let me list down the requirements for this NAS
(1) The storage cost should be cheap (its mostly write once read many type). HDDs fit the bill.
(2)  The storage should be durable (we need RAID support)
(3) The storage should be able grow with the need -- I need a big chassis which can atleast support 4 (or more  HDDs) even though I may begin with 2 or 4 only
(4) Should support High transfer rates (read/write) preferably near the limits of Gigabit Ethernet and primarily because I am possibly going to access data concurrently (for eg., TV playing videos while PC copying some data into the NAS)
(5) Its big or its beautiful is a nice to have feature, but not a mandatory requirement
(6) Consume less power if possible, though being the most energy efficient is not a mandatory requirement
(7) Hot-swap is a nice to have feature, not mandatory

In India pre-built BYOD NASs with high performance cost about $300 for a 2 bay, $600+ for a 4 bay and upwards of $2000 for 8-bay and 12-16 bays cost upwards of $4000. Since I am looking immediately at a 2-bay and 4-bay in 1 year time, I am staring at an investment of $600+ and the struggle to get it and we still have to pay atleast $200 per TB of RAID storage. That's an immediate investment of $1000. Very high for a file-server.

So I decide to make my own. Here's what I think I need:

(1) Software -- FreeNAS 9+ (BSD based, but who cares if it works well and can support my hardware)
(2) Chassis -- A Tower or NAS chassis with 6-8 bays atleast (later I can chuck it and go for a tall tower case if I need more disks)
(3) Motherboard -- Preferably no onboard sound card, no on board graphics or just the most simple integrated graphics, the maximum number of SATA ports supporting RAID or a RAID add on card with good number of ports. The RAID port is a very key requirement. Also one PCI express slot to add expansion RAID card could be useful in long-term \.
(4) RAM - As much as freeNAS needs, Its cheao these days or 8 or 16 or 32 isn't going to scare me off.
(5) HDDs -- Low cost/GB, Low speed (I do not think HDD speed is a bottleneck but rather than the GbE interface to data transfer) which means low power also and safe to be used in RAID setup ( wI will use only software RAID for the ease of repair if I lose the hardware and can't find the similar RAID controller card or on-board chipset)

With this in mind I go about this build. keep tuned in the following posts for what build I did.