ewams

Home Storage with a NAS

Contents: Background: Why a NAS?
Proudly, I am a nerd. Meaning I have several technology devices at my disposal any given moment. I wanted a way to work outside on my laptop, go inside when it starts raining to play on my desktop, start watching a movie in the living room on a TV, and finish it up on a tablet while in bed. To make this all possible a central and sharable storage medium is needed. Ownership cost is also a factor. If a drive fails I want to be able to replace it myself, not send it back to the manufacture. Not to forget the freedom of being able to choose which software (and hardware!) to use. I also want to keep the financial cost down during the whole lifetime of the device.

The hardware
NameNewegg LinkQuantityCost EachTotal
Western Digital Caviar Green WD10EADS 1TB SATA Hard DriveThe Egg6$90$540
Kingston 512MB 240-Pin DDR2 SDRAM DDR2 800The Egg2$9.75$19.50
SeaSonic SS-300ET 300W ATX12V Ver.2.2 80 PLUS Certified Power SupplyThe Egg1$39$39
SYBA SD-CF-IDE-A IDE to Compact Flash AdapterThe Egg1$11$11
MASSCOOL FD08025S1M4 80mm Case FanThe Egg2$1.80$3.60
APEVIA CF12SL-UBL 120mm Blue LED Case FanThe Egg2$6.50$13
Kingston 2GB Compact Flash CardThe Egg1$12.25$12.25
Rosewill FE-A020 Black SECC Steel ATX Mid Tower Computer CaseThe Egg1$40$40
Intel Celeron 440 Conroe-L 2.0GHz 512KB L2 Cache LGA 775 35W Single-Core Processor BX80557440The Egg1$53$53
Intel BOXDP43TF LGA 775 Intel P43 ATX Intel MotherboardThe Egg1$58$58
D-Link DGS-2208 10/100/1000Mbps 8-Port Desktop Green Ethernet SwitchThe Egg1$47$47

Total cost: $840 USD, shipped.
All the parts right out of the box



The software
The are many possible ways to serve up data through a NAS. I could run a Windows based server, buy a solution like NASLite, make my own using Red Hat, or try out some open source solutions.
Windows has an additional license fee for use, and I will have to patch the machine often. Not to mention the newer versions require 10 or more GB of disk space to install. Pass.
NASLite is recommended by many on several forums and the software itself looks nice in their screenshots. I really like to try before I buy, and they really want my credit card number. Pass.
Red Hat [9] tickles my pickle. We go way back and hopefully we go way forward. This option to set up my own services is tempting, but I know me, and I know that I will keep messing with it and keep messing with it and rebuild it hundreds of times. I want a solution that is just click click and use. Sorry buddy, pass.
Openfiler I ran in to just before deciding on FreeNAS and ended up trying it out on a VM. You know when your spidey sense goes off and something just doesn't feel right? For some reason I got that with this product. Pass.
I have been following the FreeNAS project for quite some time and even used it in one of my projects at RIT. It has always been simple to use and pretty much a set it and forget it kind of solution. Lets give FreeNAS a try. Shall we?

Lets build some memory[ies]
Originally I was going to build my own case, while constructing the case I needed to burn in the drives so I put everything together on a table.
The machine put together on a table running burn in. Yes those are poker chip boxes. :)

I installed Windows XP on one of the drives and ran Bart's Stuff Test on all 6 drives for 5 days and did not get any errors through S.M.A.R.T. Time to install FreeNAS.

At build time, version .69b4 stable and .7 release candidate 1 were available. Feeling a little risky and wanting to help squash out some bugs I chose the RC version.
Booting from CD and installing the OS is simple and takes just a few minutes. The FreeNAS install is only about 40-50MB in size which meant I did not have to install the OS on a hard drive and chose instead to use a 2GB Compact Flash card as my OS drive. Many people use a USB stick but I did not want a USB drive sticking out of the back or have to rewire a USB port to inside the case. It was exciting (in fall of 2009) to *about* to have 6 terabytes of storage at my disposal.

Quickly though, my excitement turned to frustration. After you install FreeNAS you are able to perform all administrative tasks through a web interface but, for some reason the NIC was not connecting to the network and receiving a DHCP address. Manually assigning an address through the command line did not resolve the problem either. Thinking I had a motherboard issue I booted a Knoppix CD and could get on the network. Same thing with [a linux distro I hate so some of you will know its name] live cd and a fresh Windows XP install. Does BSD not love me anymore?

Some quick research found that my NIC was not supported by FreeBSD yet. Apparently my motherboard was only about a month old and FreeBSD was between release cycles so there was no support for my hardware. The great news is Intel had a driver for NetBSD on their website that worked fine with my FreeNAS install. Thank you Intel for supporting *nix and BSD. Time to server up some terrabittles.

It was at this time that I decided to not build a custom case and instead order one online. The case arrived and I installed all the hardware with the typical fondness of a creator. My storage child was beginning to take shape. After a final cable check I pressed the power button and waited about a minute to access the web interface but it never came up. I turned it off and rechecked all the cables, everything was snapped in to place just fine, what is the problem? I plugged a monitor in and powered on. "No OS detected." Troubleshooting led to the CF-to-IDE connector as the culprit.

I ordered a new $7 dollar CF-to-IDE adapter which did not require a ribbon cable like the last one as it just plugs straight into the IDE adapter on the motherboard. After a new install I set up the drives into a software RAID 5 volume and presented it all through a CIFS share. The format during the RAID volume creation took about 50 hours and resulted in 4.4 usable terabytes. A nice thing to note, this is a real terabyte (base 2) not a hard drive manufacture's terabyte (base 10).

Master of tera
At about $190 a usable terabyte how does it make out? Here is a status summary of the drives after being powered on for a week.
Disk status summary showing size and temperature.
I have never seen them above 38 Celsius, even in the summer.

Here is the status of the system while in the middle of writing a 10GB .vmdk file at 30MB/s.
System status summary showing CPU usage, memory usage, and disk usage.


Jamming to tunes
One fine day in February with ice on the roads our fair city of Nashville shut down. I figured this would be a perfect day to change the oil in my vehicle and do some other maintenance. To keep me company I brought out my laptop and planned to listen to some of my music collection. After running the music player it said I had zero songs in my library. Zero? Not true, a few more than that definitely exist. Reboot the machine and still the same answer. Check the fileshare and sure enough, it won't connect. Checking on the FreeNAS box I discover it is on and the harddrive indicator light is flashing normally. The web interface discloses some other non-normal status: a hard drive failure detected.

Sadly, I power down the NAS and I just happened to have a spare 1TB drive of the same make and model sitting on my desk. Swap out the old for the new and tell FreeNAS to rebuild the array. 40 hours later all data is available and the music flows once more. The bad drive I ran several tests on and was unable to find anything wrong with it, but seeing as it was still under warranty I paid the $5 shipping and had it replaced.

Four months later and many thousands of miles added on to my vehicle it was time to change the oil again. I performed quite literally the same process as my last oil change. Laptop. Music. Drive fail. Replace drive. Data restored. Searches online found that many other people with the Western Digital WD10EADS drives that were running RAID arrays were having the same problem, most more often than myself. They were more vocal than me about the failures seeing as it appears people really love RAID 0. (someone please email me eric5@ewams.net (remove the 5) and tell me why you would choose to run RAID 0 with 1TB or denser drives.)

The Western Digital WD10EADS is a "Green" hard disk drive. Such green features include 5400RPM spinning platters, heads the park after a certain time of no use (the actual number I don't know, 2-5 minutes), and the disks spin down as well. When the drives basically go in to power saving mode it takes them a while to respond back to new queries as they have to spin back up and move the needle to its new track. Typically a hard drive will respond to queries within 5-10ms, but with the WD10EADS in power-saving mode it results in an increased query response time which can mean in a RAID set the controller might mark the drive as failed. There is supposed to be a tool available from WD that allows you to disable this powering down but I have been unable to find it and I think it is too risky for drives with data already on them. While this green drive is using cool technology it is very frustrating for applications such as a NAS. This is not a fault with the vendor but my own for not researching more before purchase.

Security
With over 4TB of data you want to keep it safe. Not only from people but also reduce the chance of accidents and manageable risks. I just want to go over some key points about how I am doing so with the NAS.
  1. The administration panel access is locked down with a username and password, which aren't the defaults.
  2. Anonymous users have read only access to only certain areas (anonymous needed for some devices).
  3. Different data types are in different shares and have different access restrictions. IE, entertainment such as music and video is stored together and accessible from anyone. My research data is in its own share which only I have permission. My housemates have their own shares with only their permissions.
  4. There is a rule on the router to drop all traffic from the NAS.
  5. The NAS itself is out of the way and housed between sturdy items of furniture. It also has several centimeters of clearance around it to allow airflow and prevent bumps and vibrations.
  6. The physical location is away from other electronics and not in direct sunlight to prevent interference.
  7. The drives are in a RAID 5 configuration.
  8. Important data has a backup stored elsewhere.
  9. When the machine is not going to be used it is turned off, gracefully.
You may notice that encryption is not mentioned. I chose not to encrypt the data as I don't care if you know what movies I own, it does not protect against destruction, the network is locked down, and it would decrease available capacity.

Conclusion
The need for a storage solution in my home has grown for many reasons such as using multiple computers, data growth exploding, and having different access mediums. For the needs of my household a NAS machine was built combining custom hardware and FreeNAS software to create over 4TB of data storage. With them I am able to watch a movie, work on a report, rock out to music, and use multiple devices simultaneously all without having to remember where I saved something or moving data around with flash drives. It does save time and makes my [digital] life easier. Not to forget that the non-technical folks that are around do not have to fiddle with it because it is easy and just works.

The FreeNAS project has come a long way over the years and now with the corporate support of iXsystems the upcoming versions of FreeNAS look to be promising. They also have an active community and great support documentation. FreeNAS is a solution for the home and even SMB's that I recommend if it fits your needs.

It is exciting to see how technology is coming along. After a year I have almost filled up my NAS to safe levels so it is about time to upgrade capacity. The going rate for a 2TB drive is the same as the 1TB I purchase only a year before. Not to mention 3TB drives are already available to consumers. Adding capacity to the current NAS will be another project for another day.

Inside the finished product. There is room for more drives.
As you can see, there is room for about 8 new 2TB drives ;)

Do you use FreeNAS or some other NAS solution? What have you done to solve your storage needs? I would love to hear from you! Please feel free to contact me anytime, my info is at the top of the page.

Written by Eric Wamsley
Posted: December 5th, 2010 11:00pm
Topic: Home Storage
Tags: freenas, terabyte, home_storage, data, technology,


 ©Eric Wamsley - ewams.net