29 April 2008, 01:58 by mark hoekstra

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.


my bike parked near the data center and the data center itself.
click to enlarge

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? *^_^*


geektechnique.org still gave me a page while the webserver was disconnected… ^_^
click to enlarge

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).


my iPhone, my access point and the cable normally running to my webserver…
click to enlarge

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


my environment for three hours while my iPhone handled the traffic.
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:


direct link to video


direct link to video

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.


Bates still likes to watch compiler output and the last step in this process, configuring a new kernel and oh! i’ve got a new poster.
click to enlarge

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 ;-)


the current webserver, good to go for yet another long uptime (or so I hope).
click to enlarge

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!)

DIY trackback
TUAW

permalink - add to del.icio.us

  1. flow @ 29 April 2008, 15:19 :

    how much money do you spend on your computer/server hardware a month?
    where do you buy your hardware?
    ebay, retailer?



  2. mark hoekstra @ 29 April 2008, 20:07 :

    > how much money do you spend on your computer/server hardware a month?

    well, pretty much all i’ve got ;-)

    >where do you buy your hardware?
    ebay, retailer?

    well, I (still) have a day job and that happens to be in computer hardware and that allows me to find some pretty sweet deals sometimes, next to that I also buy from eBay.



  3. Julian @ 4 May 2008, 21:01 :

    OpenBSD on a Multi-CPU Server? I don’t really think that thats a good idea. But it’s your hardware after all ;-)



  4. BOK @ 6 May 2008, 12:35 :

    So regarding the iPhone, Arnoud proofs to be a willing hostmaster, right? ;-)
    PS you made it to TUAW once more!



  5. RuBBa_cHiKiN @ 10 September 2009, 11:34 :

    Hey there, I have a Lighttpd setup on my iPhone too, and it works perfectly on WAN, all computers on the network can visit it, but I need to know how you actually get it viewable globally. I assume the domain name is what you have from the source modem, so mine would most likely just end up being my home IP, but how do I forward the connection to my iPhone?



  6. Gard @ 2 October 2009, 00:07 :

    Excellent posts, thank’s.



As mentioned in the Message from Mark's family this site has been made static. This means that it will be no longer possible to comment on his ideas and projects, but that we all can continue to cherish his creativity.

previous: shuffling around

next: double the logic, but not how Moore meant it