GNU/Linux: Server Upgrade Problem Solving

Notice: This article is not specifically about GNU/Linux. It is under our GNU/Linux category because the server in the article was and is a GNU/Linux based server. Some portions of the article deal with solving upgrade problems for applications that run on the underlying GNU/Linux distribution. In summary, this is a hardware and software article.

Recently my company had the opportunity to upgrade a server to Mandriva 2010 that was running an old version of the Mandriva GNU/Linux distribution. The system had been in place running along nicely for a few years and had not been upgraded to a new release in all that time except for some security patches. Then it started hanging mysteriously whenever under load from users opening Squirrelmail with large amounts of mail in the INBOX. Looking at logs, checking settings and system files revealed nothing. However, once the system was taken off-line, brought in-house to ERACC and the cover removed we discovered there were several popped capacitors on the old motherboard. This was determined to be the source of the hangs:

Gigabyte Motherboard Blown Capacitors

This old Gigabyte motherboard was from near the beginning of the AMD dual-CPU era when one could first put together a system with two AMD Athlon MP CPUs in it. It had a pair of these installed (AMD Athlon MP 2400+) and 512 MB of RAM. The Gigabyte board also had two PCI 64-bit slots, one of which was in use with an Adaptec 29160 SCSI controller that controls two SCSI drives. These were in a Linux MD RAID1 configuration except for the “/boot” partition. The small business owner of the server did not want to buy an entirely new server due to the current poor economy (Thanks to our current USA presidential administration and a complicit Congress. The bums.) and cash-flow being so tight. A new server could easily end up costing well over a thousand dollars. So my company was given the task of replacing this old motherboard with another from the same time frame and then doing an upgrade on the installed OS. Searching the web turned up some “recovered” (a.k.a. used.) Tyan S2469GN dual-CPU boards. These were not new but they were the best we were able to find for this system.

Luckily this particular server only handles smtp send/receive, some webmail and serves a few HTML pages for a small off-shoot business of the parent business. It would not be catastrophic for it to be down for a while. So, we could take the time to get things right while trying to keep things as inexpensive as possible. The client ordered one of the S2469GN boards and called us to come get it when it came in. Once we had the S2469GN here we discovered it was just slightly too large for the existing case. The S2469GN is a full sized Extended ATX, full CEB specification motherboard (12″ x 13″). We also discovered that the Gigabyte motherboard used a 20-pin power plug where the S2469GN uses a 24-pin power plug and requires an 8-pin power plug as well. So, we informed the client he would need a different case and an ATX EPS12V power supply. A search of old cases and power supplies at our offices and at the client site did not turn up anything we could use.

A search of new cases turned up the Antec P193 to handle the full sized EATX S2469GN motherboard. A search of power supplies came up with the BFG GX-550 ATX12V 2.2 550 Watt modular power supply. Both were found at online retail shops at a decent price that would not break the budget for this job. (ERACC does not sell individual components, only complete systems and some software licenses.) The client ordered these and once again called us to come get them when they arrived. For the record, the Antec P193 is a beautiful, roomy, well designed case.

Assembly of the system went smoothly due to the excellent design of the P193 case. The Adaptec and RAID1 configured drives were installed. The floppy drive (It is beige! Ack!) and CD drive (Also beige! Good Grief!) were installed. Then all power and data cables were connected, tied off and routed for air flow. The S2469GN has on-board ATI video. Powering up the system went well except for the floppy drive which failed to be recognized. This was replaced with a new (Still beige though!) floppy drive. Then the system passed POST and the old Mandriva distribution booted without a hitch. Now it was time to upgrade the system to the latest Mandriva 2010 release.

The Linux MD configured RAID1 was accessed using a Mandriva 2010 Live CD. The Mandriva 2010 KDE4 Live CD was found to be too “fat” for the old system with 512 MB of RAM so we used the Mandriva 2010 Gnome Live CD which was not quite so bad. We mounted one of our NFS server shares and backed up the critical data and configuration from the system by copying the relevant files and directories to a subdirectory on the NFS share. Then the system was rebooted to the installed OS. We selected the next version up from the installed Mandriva version from online repositories using because a big upgrade jump from the old version to the new 2010 release would probably fail. Then began the process of running updates with urpmi –auto-update -v to get the new version, then getting the new kernel, rebooting, and doing it all over again for the next release in line.

After going through several of these upgrade/reboot cycles one of the reboots was done before getting the newer Linux kernel installed. This usually would not be a problem, but for some reason the system completely lost access to the RAID due to this. After talking it over it was determined the best choice to go on would be to do a fresh install. Sure, we could have managed to get the new kernel on there and gone on with the upgrade cycles. But a decision was made to recommend the fresh install to make sure old cruft was gone from the system. After all, we had a backup of the important data and configuration files. The client was contacted and gave the “go ahead”. We decided to get rid of the RAID and just use both disks as discrete drives. The primary disk would hold the /boot files, /root, etc/, opt/, and so on. The second drive would hold /home and /var/www.

After replacing the old CD drive with a used DVDRW drive (At least this one is silver and black.) a fresh install of Mandriva 2010 was done and the needed applications were installed. Including Apache, Postfix, Squirrelmail, Courier (authdaemon, pop and imap) and so on. The backup of /home was copied back over. Settings for daemons were copied and edited as needed. Then, once all was in place, we began testing the system. While doing testing it was discovered that the old IMAP with Squirrelmail had created mbox style mail boxes under /home/(username)/Mail/* while the new setup needs maildir style mail directories and files under /home/(username)/Maildir/*. This was a conundrum as we did not want the end-users to lose access to their archived mail that was in the /home/(username)/Mail/* mbox style files.

After a bit of research three tools were used to solve this problem. One was built in-house and calls the other two to do the work:

  • maildirmake – a tool included with the Courier-IMAP package.
  • mbox2mdir – a mailbox to maildir converter by Sergey A. Galin.
  • convertmbox – a bash script built in-house to use the other tools and get the job done.

The maildirmake tool will create a maildir structure that can be used with modern IMAP maildir servers. Here is how a basic maildir will appear:


When instructed to create new “folders” the Courier-IMAP server will create subdirectories off this structure like so:


Here are the contents of the convertmbox script:

for i in *; do
case "$i" in
Trash) echo "Skipping Trash file." ;;
*) maildirmake $HOME/Maildir/."$i" && mbox2mdir ./"$i" $HOME/Maildir/."$i"/cur ;;

The convertmbox script is gzipped in the URL above. Use gzip -d convertmbox.gz to extract it if getting it from the URL above.

To use this one logs in as root, uses “su – username” to switch to a user, changes to the directory containing mbox style mail files and types /path/to/convertmbox to convert the files. After verifying a successful conversion one may then use “rm -rf mbox_mail_directory” to get rid of the old mbox style files and containing directory.

Testing the system with Squirrelmail following conversion of the user’s mail files showed that the conversion was successful. The old Mail directories were then removed. Then the system was ready to be delivered and placed back in operation following on-site testing to make sure nothing was amiss.

This article has had this many unique accesses:

click for free hit counter
get a free hit counter

Notice: All comments here are approved by a moderator before they will show up. Depending on the time of day this can take several hours. Please be patient and only post comments once. Thank you.


Published by

Gene A.

Gene is a "Unix Guy", network technologist, system trouble-shooter and IT generalist with over 20 years experience in the SOHO and SMB markets. He is familiar with and conversant in eComStation (a.k.a. OS/2), DOS (PC, MS and Free), Unix, Linux and those GUI based systems from Microsoft. Gene is also a follower of Jesus (forgiven, not perfect), and this does inform his world view.

2 thoughts on “GNU/Linux: Server Upgrade Problem Solving”

  1. To clarify this statement, ‘The Mandriva 2010 KDE4 Live CD was found to be too ?fat? for the old system with 512 MB of RAM …’, I will say that it ran WAY too slow. While the Gnome version of the Live CD was better, it was not all that fast either.

Leave a Reply

Your email address will not be published. Required fields are marked *

Follow the directions below to post a comment if you are human. After 3 failed tries reload the page to start with new images.