August 23, 2009 – 10:32 pm
This is my first blog post on our website! This ended up being kind of long, but I hope you enjoy reading about our latest project.
The Problem
Molly and I take a lot of pictures and video. Our current disk usage for video is 78GB and pictures is 160GB. That amounts to 34,000+ pictures, although many are duplicates shot in RAW+jpeg formats. Each full memory card from my camera dumps another 2GB onto the hard drive, which was beginning to run out of space. We had been shuffling files around between the two 320GB hard drives in our desktop in order to avoid the “low disk space” warnings and burning DVDs of the files we don’t access often. More importantly, these hard drives contain the only copies of these pictures and videos, which document the last six years of our lives together and countless memories. A destructive Windows virus or hard drive failure could potentially erase all of our media. We decided to add more storage space and proactively safeguard our pictures and videos. The best solution was decided to be building a home server with redundant hard drives.
The Solution
A home server is an always on, standalone computer that allows for centralized storage of files that can be access over a network (wired or wireless), as well as performing other duties. Our goals were to have lots of storage, easily upgraded and expanded, protected from viruses, and low energy use. After much research, we ended up building the following:
AMD Sempron 140 Sargas 2.7GHz Socket AM3 processor
ASRock M3A780GXH/128M motherboard
Crucial 2GB DDR3 RAM
Two 1TB Western Digital Caviar Green SATA-II hard drives for storage
100GB Western Digital IDE hard drive for operating system (pulled from our parts box of computer stuff)
Case, fans, cables, and other accessories
The server went together fairly quickly and I fortunately didn’t forget to order any critical pieces. The processor chosen is a low power model than only uses 45 watts. The Green series hard drives are also low energy devices. The complete up-and-running server only uses 82 watts in idle condition, which is pretty low. It’s just a little more than what a single 60 watt light bulb uses, so this shouldn’t affect our electric bill too much. Most amazing is that the heatsink on the processor is cool to the touch, without the slightest hint of warmth. The exhaust air leaving the case is also room temperature. The motherboard has six SATA-II ports, allowing us to connect an additional four hard drives someday.

The case has blue LED fans. A little bit of flair can be a good thing.

Close up of the internals.
Software
Ubuntu Linux (9.04 Jaunty Desktop Edition) was chosen for the operating system for several reasons. First, I have a personal preference for using Linux. Second, Linux is renown for stability in server applications (something like 80 to 90% of the internet [web servers] runs on Linux). Third, there has never been a single widespread virus for Linux. Fourth, Linux is easy to customize and modify. And fifth, Linux is open source and FREE!
Backup Policy
Only one of the terabyte hard drives is shared with Windows. The second terabyte drive is synched to the first every night. A program called rsync is scheduled by cron to run automatically. Rsync only transfers files which are new or have changed, so it doesn’t synch everything all the time. It is also set up to not delete files that were deleted from the original drive. So if the shared drive gets deleted by accident or virus, the backup drive will still retain the files. A RAID array was considered, but some vulnerabilities led me to choosing the backup method discussed.
I might use another hard drive to to make yet another backup. As mentioned, many of my pictures are duplicates. The RAW files average about 10MB and the jpeg files average about 2.5MB. I like keeping the RAW files because it contains the image information straight off the camera’s sensor without lossy compression, like jpeg does. However, in a something-better-than-nothing situation, I could just synch the jpeg files, only needing one fourth the storage size. This drive would then be disconnected from the server and stored in a fireproof safe at the other end of the house, which would protect and lightning strikes (should the surge protector on the server fail to operate fast enough), fire, and theft of the server. Synching would only be done every month or two since it would have to be done manually. Might be a little excessive, but I really don’t want to lose my lifetime of pictures.
Integration with the Network
Our Windows desktop computer was modified to have the “My Pictures” and “My Videos” folders seamlessly point to the server. So when you go to Start -> My Pictures, you are instantly taken to the server without noticing the difference. Our current network is a 100Mbit LAN, so data transfers are decently fast. Not as fast as transferring from one local drive to another, but fast enough to move around large files in a reasonable amount of time. Faster speeds could be achieved with a newer Gigabit ethernet card on the desktop computer and a Gigabit switch. The rest of the network and devices (server included) are Gigabit capable.
Access
The server is located in our office/guest bedroom closet. Since it doesn’t have a monitor attached, all access has to be done over the network. Only a USB keyboard is connected in order to log in to Linux. Once logged in, you can access the server’s command line through encrypted SSH terminal, or you can access the graphical interface over VNC. VNC is a remote desktop protocol that enables you to control one computer remotely from another. So from our desktop (or my laptop), I can remote desktop to the server and use it as if I were sitting in front of it with a monitor, mouse, and keyboard. It is pretty cool.
Networking
In order to get our desktop, server, PS3, and DVR connected to the network (Dish wants to charge $5 a month for NOT having your DVR connected to the internet!), we needed to run Cat-5e ethernet cable from the jacks, through the walls and attic, and back to our central networking station, the office closet. Only existing jacks were chosen to have ethernet added because this greatly simplified the installation. Our home builder graciously installed two coax and one phone line in every wall plate, so one coax cable was disconnected and used as a pull string to feed cable up through the walls and into the attic. Once done, the coax was pulled back down and reconnected. A while back I ran our surround sound through the walls and attic and did not have existing cables to pull on which was a real pain.
A standard six port wall plate was chosen that is capable of accepting various inserts for coax and ethernet jacks, and blank inserts covered up unused holes. Four runs of Cat-5e was made to the entertainment center for the PS3 and DVR, leaving two spares (a Wii for Logan someday? and who knows what else). Two runs were made to the desktop, leaving one spare for connecting a laptop to the wired network (faster than wireless) or a future network capable printer. One run was made to my hobby table, also for laptop use.

This is the wallplate for the entertainment center.
All the Cat-5e cables terminate in the closet where I also used wall plates as a kind of patch panel. One port was used for coax which I had to swap with our previous internet enabled outlet in the outside cable service box. The cable modem gets a signal from this jack and connects our wireless router to the internet. Each port on the router connects to an ethernet jack somewhere in the house. Since we only have a four port router, we can only have four devices on the network at a time. Including a (Gigabit) switch into the network someday would allow us to make use of the other jacks.

The patch panel.
Optimizing the Wireless Network
A wireless survery was conducted in order to find the optimal orientation for the wireless router. Since it doesn’t use external antennas, it’s not obvious how obtain optimal coverage in our house. The survey was conducted by running kismet on my laptop from the back of the living room, which is our most frequently used wireless area. Kismet is a wireless network analyzer program that reads received signal strength from an access point, and much more information. The router was orientated on each 3D plane and signal strength was measured. I found that any upright orientation provided noticeably better received power than when it was lying flat, which is probably how most people end up using it. It pays to be a nerd.

This particular orientation was chosen because it allows the wires to flow cleanly.
PS3 Media Server
The server also functions as a media server for the PS3. This allows access to our pictures and video to the PS3, which displays on the TV. So now we can watch all our home movies on the TV without having to burn DVDs, and sometimes it’s just more fun to flip through pictures on the big screen. I don’t know how accurate this is, but the media server software running on the server reported a peak transfer rate of 68Mbps, which is pretty darn fast.
Conclusion
We’ve had a lot of fun using the home server so far, and it’s given more things to learn about and tinker with Linux. It presents endless possibilities for other uses, like acting as a DVR for security cameras, hosting a live “Puppy Palace” webcam, home automation to control electrical outlets and appliances, and just about anything else. If you’ve made it this far, thanks for reading. There will be a quiz next time I see you.

The complete setup.
Posted in Ryan's Blog | 2 Comments »