Tuesday, July 6, 2010

Server Biology

Starting with the server... a bit more than a home server perhaps.

I acquired a Dell PowerEdge 1600SC over eBay a few years ago. After a few upgrades it looks like this:
. 2x Intel Xeon 2.4GHz HT CPU's
. 3GB DDR ECC RAM
. Dell PERC4 SCSI Hardware RAID Controller
.. 2x Seagate 146GB 10kRPM SCSI 68pin - configured as 1x 146GB RAID1 Array
. Adaptec ASR-2420SA SATA Hardware RAID Controller
.. 3x Samsung 1TB 5400RPM SATA - configured as 1x 2TB RAID5 Array
. Dell DRACIII/XT Remote Access Card
. Intel PCI-X Gigabit Ethernet adapter
. Intel PCI Fast Ethernet adapter
. LG IDE DVD-Burner

Next step was to backup my Gentoo Linux installation that was doing most of the serving (including NAT, firewalling and transparent web proxy) from the machine before blowing it away and installing VMware ESXi 3.5. Backup was done using my favourite piece of open-source, Clonezilla.

VMware ESXi 3.5 was installed in under a few minutes - from the reports on the web I put this down to having enough memory (apparently it will refuse to install if you don't have at least 1GB) and the SCSI disks (you can get around this with some creative installation techniques).
The first thing I learned was that to make it a silky smooth install you need to erase the partition table on the disks - this way ESXi assumes you want to use the entire disk and formats it up for you on the installation disk.
Once installed it was a case of restoring the backup... this is where things get a little interesting. Given that most of the PC's in the house are not Linux or FreeBSD based, I had an issue where ESXi doesn't recognise the USB backup disk and some fool formatted it in EXT3... oops!
Fortunately using my work copy of VMware Workstation on a laptop soon had my backups coming across the network at a snails pace...

Changing from "physical" to "virtual" is apparently easy when you have the machine there physically - that is, when you don't have to format it to install ESXi on the machine first. Fortunately, some quick thinking had me back up and running quickly through the use of CloneZilla! Quite simply, with my virtual copy of FreeBSD running on a laptop hosting an SSH session, I created a new virtual machine on the ESXi box and booted a CloneZilla ISO, connected by SSH to the laptop and pulled down about 10% of the backup.
What about the other 90% - all of the data, the movies, music and photographs? It was easier to file copy them on to the USB disk, so it was just a matter of booting into the new Gentoo VM and SSH them back from the laptop.

Interestingly, going to a virtual machine had an unintended bonus for expandability. When configuring up the hard disk it occurred to me that because everything was now virtual, I could make as many disks as I liked. So I now have one whole disk for the operating system (root, /etc, /usr...) and one disk each for /home and each of the movies, photographs and music folders. The advantage here is that on a conventional system if I want to expand the music partition (which happens to be located on a partition between the photographs and the movies) I would have to shuffle around partitions, potentially taking a lot of time and upsetting things. On ESXi, you can simply expand the disk in the "settings" menu and then expand the partition to cover the new space. Job done - no shuffling of partitions.

The obvious next question would be why have everything in partitions? Why not have an enourmous single partition? Well that is partially a hold-over from having two hard disk controllers and thus a minimum of two disks, as well as many years of configuring paranoid OpenBSD systems. The advantage of having partitions mean that if something goes crazy and fills up the /home partition, or any of the other data partitions then the process stops - the rest of the machine will not experience any problems as /var and /tmp are isolated.

The next most obvious question would be, why use ESXi (and lose those nice USB ports!) when you're only running one operating system to do it all?
Well, there are somethings that I trust Gentoo to do... and somethings I prefer to do with OpenBSD!! In addition to that I have searched high and low for an automatic backup solution for the family PC's and not found anything better than Windows Home Server... and when I say better, I mean easier!

But we'll save that for a later post...

No comments:

Post a Comment