I’ve recently been setting up a home server for my parents using lucid. While it’s not quite a point and click setup process, the process is a lot more streamlined than it used to be.
They have an individual computer each running Windows 7 and, one laptop between them running XP. Mum is also a photographer and generates a large amount of data. Dad also generates a fair bit of data, less than Mum although he does do the occasional home video.
Backups are an ad-hoc affair. Mum has three hard disks in her computer which she manually copies files between and tries to ensure she has two copies of everything. Dad has a portable external drive which he backs up to infrequently. Between them, neither is confident that they’d get all their data back in the event of a disaster.
Dad also liked how my HTPC (running XBMC) worked, and decided one of those would be nice too. So I decided to setup a home server for them and solve all their computer problems. Well, almost.
I started writing this as a single article, but it got a bit long so I’ve decided to break it up into a series. This first post is an overview, the links to the other posts are at the bottom of this article.
I’m assuming a fairly good degree of technical knowledge here, but if there are any gaps you feel I should add please feel free to leave a comment. I am aiming this at a reader who is familiar with Linux and Ubuntu, has installed software with apt-get or Synaptic, is comfortable with using the command line, and understands the implications of using raid5.
Overview
This home server will perform the following tasks:
- Play music and video via the TV
- Present a file share to the network, with individual folders for Mum and Dad
- Backup the contents of their folders nightly to an external hard drive
- Provide a GUI-based remote administration interface
- Monitor backups and the raid array, sending emails to both Mum and Dad if something is amiss
Software that needs to be configured to perform these tasks:
- MDADM for RAID
- Xbox Media Center (XBMC) for media playback
- Samba for file sharing
- Back in Time for backup
- NeatX for remote administration
The main boot device in this case will be an IDE compact flash card. I did this partly because it makes recovery easier (just write an image to a flash card rather than a whole hard drive), but mainly because it frees up a SATA port!
The hardware components for this particular HTPC are:
- Gigabyte M85M-US2H motherboard
- AMD Athlon II 250
- 2gb DDR2 ram
- 4x640gb Western Digital 6400AAKS hard drives
- 1x1TB Western Digital Green
- 1x2TB Western Digital Green (in external esata case)
- 4 Raidon/Stardom hotswap drive bays
- IDE Compact Flash adaptor and 8gb 133x CF card
A note on raid
The 4x640gb drives are configured in a raid 5 array. Personally, this is about as large an array as I would trust Raid5 to, the future is redundancy at the file system layer, as ZFS and Btrfs are capable of. ZFS can’t be used in the Linux kernel and Btrfs isn’t even close to production-ready yet, so for now I believe Raid is still the most sensible option. But if you’re reading this in 2012, you should probably be using Btrfs instead.
Storage
The 1TB hdd is just a single disk for media to be played back on the TV. Anything here is considered replaceable (think of it like the internal HDD in a MySky or TiVO box), so it won’t be backed up at all.
The 2TB hdd is the backup drive. Each night the entire raid array is backed up to it with Back in Time, configured to take snapshots. Since it uses rsync, the backups are incremental and shouldn’t take more than a few minutes to run, depending on how much was changed during the day. Obviously as the array nears capacity fewer snapshots will be able to be kept, and once it does the idea is to replace the 2TB backup hdd with a new one, keep the old one as an archive, delete any data from the raid array that is no longer current, and start again with a fresh clean backup disk. Hopefully by then it will be a 3 or 4TB disk and they can keep more snapshots!
The file system on the backup HDD will be NTFS. This is because it supports hard links and is readable by the Windows machines, which is important for my parents when they go to retrieve files from the archive.
Final notes before we get to the nitty gritty
I had a bit of trouble getting the drive bays lined up with the ports that the OS reported they were attached to. This is important because if mdadm tells Dad that the sata disk on port x has failed, I need him to be able to know that it’s the disk in bay x. Unfortunately on the motherboard I used, Ubuntu assigns them like so:
0 – 1
1 – 3
2 – 2
3 – 4
(motherboard port – ubuntu port)
So while your motherboard may be better designed than mine, don’t assume they are in the same order. The links to the follow-up articles are below:
- OS and package installation
- Configuring the raid array and creating a partition
- Creating user accounts and setting up the file shares
- Configuring the backup system
- Monitoring and email configuration
- Media playback and XBMC




