maintentance and a megalomaniacal iPhone
the hardware which went into my old server. 4× 1GB memory and 2× 320GB drives
click to enlarge
This last friday, I finally went to the data center with some new hardware for my old webserver. Somehow I’ve been doubting all along how to make the best use of my second server and finally I decided I’m going to upgrade the old one and then put the second one on top of that. And that’s a process I now started.
Last friday I started out by placing 4GB extra (for a total of 6GB) in my server and replacing both disks with new ones. The old ones (simple desktop IDE-drives) have been working nice for three years(!). To be able to replace the drives I had to prepare the drives already at home with the correct partitions and filesystem (linux raid autodetect) on there and I gambled I could get my server to accept one of those disks, with larger partitions and rebuild to that and afterwards replace the second disk with a new one and do the same. Since I (more than three years ago) decided to run Gentoo on there and I prepared the server back then with software RAID1 and LVM2, I also suspected I would be able to resize the filesystem once this setup was running…
It’s been a long time since I had some serious (and planned) downtime and this time, especially because I knew I had to rebuild RAID-arrays and such, I thought it would be nice to have something still hosting some kind of page when I would be busy with my webserver. Now of course, I could’ve just plugged the cable in my laptop and let that one host one static page, but how much fun is that? *^_^*
Sooooooooo, after a while I thought it would be nice to use my black iPhone just for that, I mean, it’s this miracle phone according to some and it’s a Unix-machine for sure, so that should do it. In my Installer.app I already spotted Apache but after some searching I also found lighttpd for iPhones which (to me) seemed perfect for the job. I did make an appointment with my generous host but didn’t tell him (yet) about my plans. When I arrived at the office to pick up the keys and badges to get in to the data center, I, more or less as a joke, brought up the plan to connect my iPhone through an access point to his hosting network and while I didn’t expect it, he thought I should just do that, and so I brought the access point and my iPhone to the data center as well. *^_^*
Once there I disconnected my website and plugged the network cable from the webserver into the access point and those of you who visited my website then, saw this (this is a mirror).
It worked flawlessly and in the three hours I needed to rebuild my server, my iPhone handled 411 unique visitors (there was an access_log running along on my phone) which is just about my normal traffic in these quiet days.
After this I needed to get to work and put my webserver down and start working…
last login (on the console) may 2nd 2006 and bye bye uptime… 694 days!
click to enlarge
...but, because I had to wait for disks to rebuild, I had loooots of time and so I also shot two little videos:
Everything went well and after three hours I could put this very site back up. Now uptime is nice, but I decided I would continue to work on my server at home and update Gentoo completely on this box. Everyone who ever done such a thing, knows that can be quite a hassle and it has taken me a great deal of my weekend and I’m not there yet completely. All the packages have been updated, last night I also updated Apache on there and tonight I recompiled a new kernel. Tomorrow afternoon, when I’m already near the data center, I will reboot the machine one more time to get it on the new kernel and after that I can do some extra fine-tuning. I haven’t got a clue how much traffic this setup would now be able to handle, it seems to handle the ‘base traffic’ a lot better than before somehow. (if anyone still has issues, please leave a comment and if it craps out… well, it craps out ^_^). Next to that, this webserver will be a backup webserver for this site and only serving MySQL to server number two, which will run OpenBSD and lighttpd and act as my front end webserver.
And well, that’s that! My old webserver is (imho) still good for another two years or such and when I also co located server number two (which I’m gonna do in a couple of days, there’s holidays coming up and OpenBSD 4.3) my setup is complete and I can, well, post a project for a change ;-)
Update: This afternoon I rebooted the machine on the new kernel, which is/was the last step in the complete upgrade of this machine. I already figured I should be near the data center for if something went wrong and indeed it did. It seemed I made a mistake in the kernelconfig, but I could fix that (thanks Bas, who happened to be there and helped me out with that) right there on the spot and rebooted again and… solved. Soooo, this old machine is all current again, with 6GB of memory (instead of 2), new disks and an updated Gentoo with kernel 2.6.24 *^_^*
(and the best is yet to come, server number two!)