Yesterday I upgraded one of the servers I maintain from FreeBSD 4.11, which had reached its end of life, into the latest production release 6.2. It was a humbling experience.
The machine I upgraded supports many services. It provides Unix accounts with CVS and imap mail access, serves static web pages and wikis, runs a bug management database, is an authoritative and slave DNS server, runs mailing lists, sends CVS commit reports, and collects and reports weather statistics. The recommended way to upgrade from 4.x to 5.x and beyond is to "backup everything, reformat, reinstall, and restore everything". This turned out to be a lot more difficult than I anticipated.
In order to minimize service downtime, I setup a virtual machine, where, over a period of two weeks, I installed 6.2RC1 and all the software I required. I tested all the services I could test, and tuned settings that required updating. This was needed, because during the upgrade process I decided to move to newer versions of software like the Apache web server. I was unable to test some services, like the authoritative DNS server and the serial console, due to differences between the virtual and the actual setup. I also performed a test migration from the 4.11 to the virtual 6.2 machine, and drafted this as a transfer procedure I could execute step-by-step during the actual migration.
Given my preparations, I planned for the upgrade to take half a day,
but in the end it took about 20 hours, with some services restored
after about 10 hours.
As you can see from my notes above, what started (and should have continued)
as a series of neat ticks along my checklist, ended up as a frantic
hole-plugging exercise.
The procedure involved
Things went wrong from the beginning. To save some time, I planned to issue the first commands remotely from a serial console before commuting on-site. Distressingly, because on the previous day we attached a keyboard to the server, I lost touch with the machine when I brought it down to single-user mode. Other problems I encountered during the upgrade were DNS lookups that didn't work in single-user mode, and a partition editor that refused to write my data to disk giving me a write error.
However, the worst problems happened after the upgrade, when I brought up the server under 6.2 and began testing the various services. These are the problems I encountered (and fixed):
listen-on { 127.0.0.1; };
)I also forgot to transfer:
/etc/ntpd.conf
)/etc/sysctl.conf
), and/etc/daily.local
).Last modified: Wednesday, April 4, 2007 1:48 pm
Unless otherwise expressly stated, all original material on this page created by Diomidis Spinellis is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.