Earlier this year Microsoft announced the end of TechNet Direct. For those of you unfamiliar with this it was one of the best things MS ever did, and will be sorely missed. For a couple hundred quid a year you had access to nearly every piece of software MS offered as long as you didn’t use it in ‘production’ (this meant you could build test platforms, try stuff out, but the moment it started being used for work, you had to pay for full licences).
This was a bit of an issue for me, working with MS platforms I had set up a pretty big test domain and had placed a server at my parents house which managed their machines as well as replicating files between their server and mine giving an off-site backup for all of us. Very handy, and it allowed me to test things running over a WAN. In fact, as I was waiting for my visa at the time I took the opportunity of the HP cashback offer on N54L microservers to upgrade the little Atom box I had there, and split the services running on it into multiple servers running on Hyper-V.
I’d just got it running beautifully when MS announced that Technet Direct was no more, and as such my server would be unlicensed at the end of my subscription. Not having the cash for multiple 700 quid Server 2012 licences I decided to finally get stuck in to the alternatives.
I’ll write up the fun I had trying to get Samba 4 to run as a Active Directory Domain Controller with a MS Server 2008 R2 DC later, but for now lets just say after a lot of tweaking, it just wasn’t going to be viable, given that it was going to have to run for at least two years trouble free and only being able to access it remotely.
So I needed a simple solution, something mainly to back up my parents’ files from their desktop and laptop, and act as an off-site backup for my own data. I’d been using nas4free earlier but without some form of authentication server it was being a pain, and then as a final straw it dropped its configuration right when I rather needed it. I’ll probably be using nas4free again later, so don’t take this as a suggestion it’s awful, just not quite what I needed for this.
Knowing Windows based kit much better than *nix I looked back at Windows Home Server, which seemed perfect for this, apart from the fact that the last version is 2011 and MS have canned it, so there’d never be an upgrade. I could have gone for Server Essentials, but at over 200 pounds it would be quite a spend for this and given that Essentials has to hold the FSMO roles, if I added my own to the network later that would be two separate AD domains I’d have to look after, again, not what I was looking for.
Surely some chaps had produced a *nix based equivalent to Windows Home Server though, and a quick Google brought me to Amahi. I took a deep breath, a large backup and threw the latest Amahi 7 Express on the server. I installed it on a 250GB drive that came with the microserver that I’d tucked away in the top of the server (Where a DVD drive would normally sit) and after a bit of a poke around the GUI it seemed to be what I needed. Be careful of the partitions here, the default created a /home partition which was all the spare space, and a / that was only about 45GB, this created a bit of an issue as I shall reveal below.
Then I added four storage drives into the four drive slots, and after a quick poke around the wiki I had them added, but with a partition alignment error when I mounted them, so I used fdisk instead of their suggested tool, and that seemed to do the trick.
Amahi has a spinoff project called Greyhole which is similar to the WHS system. Rather than a traditional RAID system it pools all the drives into one big store. When you copy a file to a share it’s stored there until Greyhole copies it off onto the storage drives, you can specify how many drives you want files from each share to be stored on, and thus how protected they are. For example I have four drives, and I’ve set a share to store two copies, this means that any given file is on at least two separate drives so if one fails I have another copy. Setting the number of copies higher means I could have two drives with the file on fail and still be ok, however this comes at the expense of total storage space. This also means that unlike a RAID volume you can replace any drive with a larger one to give a bigger pool, and you don’t need matched drives. Handy when you have a collection of mismatched drives, or you just need that little more space!
Configuring Greyhole was quite simple, once I realised that for Amahi 7 Express the GUI options don’t exist yet and you have to configure it manually, which isn’t as hard as it appears. Just follow the wiki and you’ll be fine. You’ll need to uncomment or edit the shares you need in the /etc/greyhole.conf file, it’s easy enough, just look for the Shares Settings and Storage Pool sections, and follow the examples.
Finally I started copying the files from the backup to the shares, and this was where I discovered the partition issue. Greyhole can’t clear down the landing zone when it’s completely full. With only a 45GB landing zone this was a pain when you have hundreds of gigs to copy! You can fire off the Greyhole process with greyhole -f at the command line, but it’s a race as to whether it can process files as fast as they’re copied to the share. I grabbed a GParted ISO and resized the home partition (there is very little usage anyway it appears) giving me a much larger landing zone. If I didn’t have the space on the system drive I’m using, then you can also move the landing zone to another drive.
Seems to be working nicely now, I need to set up a backup to an external drive just in case, and there’s some more bits and pieces to do but I’m happy with it so far. If they get the documentation squared away a bit and finish off some of the plugins it’ll be pretty hard to beat as a home server for most people. Most of the plugins are paid for (this is how they fund the server) but they all seem to be around 5 US Dollars, so they’re not exactly spendy. It being Fedora under the hood you can always roll your own though.
I’ll write more as I play with it further, but for now, it’s a neat solution for those not wanting to get too technical. Perfect for the parents!