Friday, July 21, 2006

Downgrading MDaemon from 8.1.4 to 7.2.3

I just successfully downgraded a MDaemon mail system from 8.14 back to 7.2.3. It's a challenge and a time-consuming job. I had to be careful and patient all the time, because:MDAEMON
  • it is a critical system for the business of the server's owner;
  • all the current user accounts and their emails must be preserved;
  • all the relevant system settings of current mail server should be kept as well;
  • down time is only allowed in the gap between the work time in Asia and Europe;
  • all the operations should be done remotely;
  • the connection speed between China and Australia is awfully slow.
The last recommended upgrade of the mail server could not be activated for free, and then its WebAdmin did not function any more after conducting the restore procedure suggested by the new version's document. So I was recently asked to restore the mail system back to its initial version as well as to expand its disk space.

The MDaemon email server runs Windows 2003 Server on a virtual machine (VM) hosted by VMware GSX Server. Its W2K3 system partition has a Ghost image saved on the DOS partition of this VM. The first installation of MDaemon 7.2.3 has a full backup stored on the third partition containing current MDaemon system and data files. I created all the above backups after I set up the whole system for production running. These backups are essential for this downgrade operation.

The virtual mail server, as well as other VMs, is hosted by a Dell PowerEdge server physically located at an ISP in Jinan, China, more than 8,600 kilometres away from Sydney in where I am currently living. All the operations were done remotely, by either Remote Desktop or DRAC4 Console, over the Internet via VPN. Thanks to Dell's Console Redirect, a Java applet based application, I can remotely "see" the server's screen, no matter what OS the server runs, even in naked BIOS mode! So I can even remotely re-configure the server's RAID settings and completely reinstall all software from its DVD and tape drive. In fact, even when I was physically beside the server, I would still use the DRAC4 Console to access it because the server has no monitor and no keyboard at all!

The following are the steps from the beginning to the end. The key steps are underlined.
  1. Shutdown the VM of this mail server.
  2. Backup the mail server by copying its VM files to another partition on the host server.
  3. Remove the 2nd virtual disk specializing for emails from the mail server VM.
  4. Delete the corresponding virtual disk file to free up disk space.
  5. Shutdown other VMs staying on the same partition of the mail server VM.
  6. Defrag the above partition on the host server.
  7. Start the other VMs that were stopped before the defragment.
  8. Create a new 80 GB virtual SCSI disk with fixed size and name it literally.
  9. Add the new disk to the mail server VM, as the 2nd SCSI disk.
  10. Copy back the virtual disk files containing the email backups from another partition
  11. Rename the virtual disk files literally and edit the .vmdk file respectively.
  12. Attach the above virtual disk back to the mail server VM, as the 3rd hard disk.
  13. Start the email server VM from VMware VM console.
  14. Choose MS-DOS at the Startup menu of Windows 2003 Server.
  15. Run Ghost to restore the system partition from the image on the DOS partition.
  16. Reboot the email server VM to the Windows 2003 that was just restored.
  17. Login as Administrator and shutdown all MDaemon's services
  18. Run MMC/Disk Management and confirm that a new hard disk has been added.
  19. Rename the partition on the 3rd disk initially for emails from drive letter M to N.
  20. Reboot the email server and ignore the error message for not started system services.
  21. Login as Administrator and run MMC/Disk Management again.
  22. Allocate the whole of 2nd empty disk for logical drive M and format it with NTFS.
  23. Run NTBackup to restore MDaemon's first installation back to drive M.
  24. Copy the following folders from drive N to the corresponding folders on drive M.

    • Archives
    • Localq
    • RawFiles
    • Badmsgs
    • LockFiles
    • Remoteq
    • CFilter
    • Logs
    • SpamAssassin
    • Digests
    • OldFiles
    • Temp
    • Domains
    • Pem
    • Users
    • Gateways
    • PublicFolders
    • Inbound
    • Queues

  25. Copy the following files from the App folder on drive N to the same folder on drive M.

    • alias.dat
    • multipop.dat
    • domains.dat
    • tarpit.dat
    • forward.dat
    • userlist.dat

  26. Shutdown the Windows 2003 and stop the mail server VM.
  27. Re-configure the VM to remove the 3rd virtual disk, leave it therehost as a spare disk
  28. Start the mail server VM again.
  29. Boot the VM into Windows 2003 Server and login as Administrator.
  30. Run MDaemon' console to adjust some system settings as necessary.
Recommended readings:

No comments: