This is the first in a series of articles with information on how I’m building a full IT infrastructure for my home.
Digital information. It’s everywhere. For most of us, it started with digital music (compact discs). Then we moved on to personal computers. Now, everything is digital. I talk digitally on my cell phone. I listen to digital music (MP3 files on my computer or my iPod). DVDs, youTube, email, photos, grocery list… all digital.
The modern household is digital. And much of my most important digital assets are stored on computers. Therefore, it’s important to have a good digital infrastructure in my house. How many of you are a hard disk crash away from losing your precious family photos?
In this series of blog postings, I’ll explain the different pieces of my digital infrastructure as I build and integrate them.
Having suffered a few hard drive crashes in recent years, I’ve finally become properly paranoid enough to set up a centralized digital storage system. The requirements for my system are:
1. Must have redundant storage so a single disk failure will not cause me to lose more than a few hours worth of data.
2. Must be accessible from either my laptop, my Windows XP desktop, or my Ubuntu Linux desktop.
3. Must have a lot of storage space.
4. Must run quietly and not consume too much power.
5. Must run 24/7.
6. Must be fast enough to stream media (such as DVD)
7. Must allow secure, remote access (such as Secure FTP)
8. Must be affordable.
My first attempt at meeting these requirements has been with the following hardware and software:
1. Refurbished Dell Optiplex GX260, 2 gigaHertz Intel P4, 512MB RAM, 80 Gig hard drive. Cost: $218 including shipping.
2. A pair of Seagate 500 GB IDE disk drives. Cost: $240 for the pair, including shipping.
3. An open source Network Attached Storage (NAS) operating system called FreeNAS.
Prior to my purchase of the GX260, I did some googling to make sure it was compatible with both FreeNAS as well as Ubuntu Linux (in case I decide to use it as a linux box instead.)
My total investment is $468. Turnkey products I looked at cost much more and offered fewer features.
When my refurbished computer arrived, the mouse was crushed due to improper packing. Also, the keyboard would not work due to the fact that at some point in time, someone drove a screw through a printed circuit board in the underside. The company has replacements for both in route. However, I don’t really need these as my system operates in a headless configuration once it is set up. No monitor, mouse, or keyboard are needed. For the first part of setup, I needed only a monitor and keyboard.
My initial goal was to set up a RAID 1 mirrored drive configuration. I would have a total of 500 gig of storage with software mirroring. However, FreeNAS was not stable in this configuration, most likely due to my power settings. If you want to try a RAID setup, you should not use any power saving settings. Since this is for home use and is idle quite a bit, I really wanted to save power by using 10 minute spindown. After 10 minutes of inactivity, the drives spin down to low power mode. This keeps the machine running cooler, saves wear on the drives and keeps them in the habit of spinning up and down on a regular basis. (I had a drive in a work PC that worked wonderfully for years, until I powered the PC down for a few hours and then it never would come back up. It hadn’t been spun down in ages and I lost all my data when it wouldn’t come back up.)
So, with my RAID configuration being problematic, I decided to use what I think is actually a better overall solution anyway — RSYNC. This is a service that is built into FreeNAS that allows hard drives to be copied (sync’d) to other local hard drives, or hard drives on other computers.
On my system, I installed the operating system on the 80 gig hard drive. I also put the swap file on this drive (though I doubt the swap file will get used.) On this same IDE channel, I added one of my 500 gig drives. On the second channel, I have the other 500 gig drive and the CD-ROM. All three hard drives are set to spin down into their lowest power mode after ten minutes of being idle.
Each night at 1:00am, RSYNC runs a scheduled job to copy all the data from my primary 500 gig drive to the backup 500 gig drive. So, it is an automatic, daily backup. RSYNC is smart enough to only copy files that have changed. The advantage of this over RAID mirroring is that if I accidently delete a file during the day, I have until 1am to recover the file off my backup.
I plan to implement another change that will give me even more time to recover files. Right now, I have my sync job set to delete files off the backup that are deleted off the primary. I will probably changed the job so that the delete operation only happens once every month or two.
If we look at my list of requirements, we can see that numbers 1, 3, 4, 5, and 8 are met. But what about the others?
One of the services that FreeNAS has bundled is CIFS (aka SMB). This is MS Windows compatible file sharing. It was a very simple matter to configure this service. (This is not a how to, so I won’t explain the setup here.) So, that takes care of requirement 2.
Another feature is an FTP server. And you can also activate SSH, which allows you to run your FTP server through SSH which encrypts the data, providing secure access. Yay, number 7 is done.
What about the speed? Initially, I was disappointed with the speed. While it was fast enough to both record and play back TV shows from Windows MCE, it was only about 10 megabits per second. However, I discovered that the bottleneck was not the FreeNAS system, but my wireless laptop connection. Attaching a network cable to my laptop resulted in about a 450% improvement in speed during file copy operations. So, media streaming works great too. All my requirements are met.
There are some caveats:
1. FreeNAS is in beta. While it’s based on the very stable FreeBSD (which Mac OS X is based on), there are some issues with stability for some folks. There are also numbers that show FreeBSD to be slower than other solutions such as OpenFiler, and NASLite. However, neither of those products currently meet all my needs.
2. FreeNAS does not support WebDAV (yet). Since I have secure FTP, WebDAV is not a requirement, but it would be nice. It is slated for a future release. (Now, I just need OpenOffice to support WebDAV better!)
3. Software RAID is not a good idea if you plan to spin down your drives to save power/overheating/wear.
4. While FreeBSD has lots of avid supporters, a NAS based on a Linux distro is probably more viable long term as linux is becoming more mainstream.
For now, I plan to let FreeNAS run for a bit and see how it goes. If I am not happy with it, I may switch to a Linux solution. But so far, it is working for me.