Results 1 to 3 of 3

Thread: My Successful Migration from Centos 4.x to Centos 6.3 with Zimbra

  1. #1
    langs's Avatar
    langs is offline Special Member
    Join Date
    Sep 2006
    Location
    Brisbane
    Posts
    132
    Rep Power
    8

    Default My Successful Migration from Centos 4.x to Centos 6.3 with Zimbra

    This might get a bit long and for that I appologise but I felt this might be of assistance to someone out there maybe since when I notified Zimbra support that I was going to migrate I got the following responce;

    Thank you for contacting VMWARE Zimbra Support. Regarding your issue I would like to inform you that we do not support for the Cent OS. Regarding the method to migration of ZCS from one server to another you need to have the same version of OS on both the machines
    Okay so the first line is pretty bog standard but I was supprised to hear from support that I couldn't migrate to between OS versions which i knew to be false. So chork up another dud support ticket responce, serioulsy you'd think after all these years that would get better but it hasn't.

    Anyway moving on... back in March 2006 I went live with the setup mentioned here: NAS/iSCSI

    After 6 wonderful years starting with Zimbra 4 and going till Zimbra 7.2.1 it was time to put the old girl to rest. To be honest if Zimbra had released version 8.0.0 on RHEL4 64 I would probably still be using it even though it was getting a bit tired. They didn't so this was the catalyst for change, I decided to build a new server, give it new storage and upgrade to Centos 6.3 and Zimbra 8.0.0.

    This is the new rig is hardware certified for Centos and RHEL;

    Chenbro 217B 2U Chassis
    Zippy 650W Redundant PSU's
    2x Intel Xeon E5-2620 CPU's (6 cores, 20mb cache)
    SuperMicro X9DRi-F Motherboard
    16GB DDR3 ECC Memory
    2x Intel 240GB '520' Series SSD's (Raid Mirror)

    Instead of using a Qlogic HBA for iSCSI this time I just added an additional Intel Gigabit ET dual port server adaptor to connect to the Dell MD3000i iSCSI target which has the MailStor and Backup volumes on it.

    To install Centos 6.3 I grabbed the lastest net install and did a basic server installation noting to give it the exact same hostname as the current production server. From there is was a matter of some fine tuning.

    Code:
    yum update -y
    service postfix stop
    chkconfig postfix off
    yum install nc libstdc++ -y
    Then I commented out the 'Defaults requiretty' in /etc/sudoers

    Next I went about setting up the network, at thing juncture I should mention I have an external firewall that sits infront of my mail environment so the following isn't so scary.

    Code:
    service iptables save
    service iptables stop
    chkconfig iptables off
    service ip6tables save
    service ip6tables stop
    chkconfig ip6tables off
    I then editted the required interface files to set eth0 for the lan and eth2 for the iSCSI.
    Code:
    /etc/sysconfig/networking-scripts/ifcfg-eth0
    /etc/sysconfig/networking-scripts/ifcfg-eth2
    This was following my making sure /etc/hosts and /etc/resolv.conf matched my production enviroment, note you have to give your new server a dummy IP till you are ready to shutdown the production enviroment, but it needs to have the same hostname.

    Then it was time to get the iSCSI initiator firing and mounting on boot in fstab;

    Code:
    yum install isci-initiator-utils -y
    /sbin/iscsiadm -m discovery -t sendtargets -p $TARGETIP
    chkconfig iscsi on
    chkconfig iscsid on
    /sbin/iscsiadm -m node -o show
    /sbin/iscsiadm -m node --targetname $iqn.target.string --portal $TargetIP:Port --login
    /sbin/iscsiadm -m session -o show
    At this point you should be connected and logged into the iSCSI target, in my case the Dell MD3000i.. easy way to really check is;
    Code:
    cat /proc/partitions
    which should show you a new device such as /dev/sdc.

    Now you have to partition and format the new iSCSI device.

    Code:
    fdisk /dev/sdc
    n = new partition
    p = primary
    w =write
    mkfs.ext4 /dev/sdc1
    Now we need to mount it on boot;

    Code:
    vi /etc/fstab
    /dev/sdc1  /mnt/path  ext4  _netdev  0  0
    Let me stress it is very important to use the _netdev option, failure to do so will make your system unbootable and have you reaching for rescue media to fix fstab.

    With the core framework out the way it's time to take care of the Zimbra requirements;

    Code:
    yum install glibc-devel sudo linidn gmp ntp -y
    Now comes the fun part, we need to do a dummy install of Zimbra. You must use the same version on the new server as you have on the production server, so if you have 7.2.0 in production you need to install 7.2.0 on the new server not 7.2.1 for example. In my case I upgraded my current production to 7.2.1 which was the lastest supported on Centos 4.

    Code:
    tar zxvf zcs-NETWORK-7.2.1_GA_2790.RHEL6_64.20120815212257.tgz
    Note I am using the RHEL6 version not the RHEL4 one, you want the Zimbra verison that corrisponds to your installed OS.

    Code:
    ./install -s -platform-override
    The -s is extremely important, this installs the Zimbra packages and sets up the user and db etc without configuring Zimbra. At this point to make your life easier you want to edit /etc/passwd and /etc/group and make sure the 'Zimbra' user and group have the same uid & gid as your production system.

    We need to rename /opt/zimba to /opt/zimbra.dummy, you do not want to delete it just yet as you will be requiring a directory from it later.

    We are now ready to copy our data from the production server to the new server. As I have a very large MailStore I did this with the production server in service, to give you an idea it took 2 days to copy my MailStore. Note you run this from your production server not the new server.

    Code:
    rsync -r -a -v -e "ssh -l root" --progress --delete /opt/zimbra $newserverIP:/opt
    rsync -r -a -v -e "ssh -l root" --progress --delete /path/to/mailstore $newsererIP:/mnt
    This could take anywhere from a couple of hours to a couple of days depending on how many users there are and how big their mailboxes are. Once the initial transfer is done you want to stop the Zimbra services on your production server and do the process again, which will be much much faster as it will delete old files and only copy over whats changed. Again make certain the production zimbra services as stopped for the second pass.

    Code:
    rsync -r -a -v -e "ssh -l root" --progress --delete /opt/zimbra $newserverIP:/opt
    rsync -r -a -v -e "ssh -l root" --progress --delete /path/to/mailstore $newsererIP:/mnt
    At this point you need to shutdown the production server as it's now offically retired. It's now time to change the IP Address on the new server to reflect the IP Address that was assigned to the now retired server. Edit /etc/hosts and /etc/sysconfig/networking-scripts/ifcfg-eth0 then;

    Code:
    /etc/init.d/network restart
    Then check to make sure your new server is responding on the new IP Address. Now with Centos6 and Zimbra using Perl5.10 instead of the older versions of perl found on Zimbra 7.2.1 and Centos 4 we need do the following to avoid getting a Perl symbol lookup error: Perl_Tstack_sp_ptr.

    Code:
    rm -rf /opt/zimbra/zimbramon/lib/x86_64-linux-thread-multi
    mv /opt/zimbra.dummy/zimbramon/lib/x86_64-linux-thread-multi /opt/zimbra/zimbramon/lib
    rm -rf /opt/zimbra.dummy
    This replaces the old perl5.8 with perl5.10 from the newer RHEL6 release, and we can now dump the dummy install files as well.

    We need to tidy up permissions so now run;

    Code:
    /opt/zimbra/libexec/zmfixperms -extended
    From here we are on the home stretch, now we have to rerun the install script this time without the -s option to configure our new install and upgrade 7.2.1 to 7.2.1 using the config from our old production server.

    Code:
    ./install -platform-override
    just follow the prompts as per any other Zimbra upgrade and congradulations you have a new production mail server running 7.2.1 ready to rock n roll on Centos6.3. From here we make sure we can send and receive mail and check the back up paths etc. Then you follow the standard Zimbra steps to upgrade from 7.2.1 to 8.0.0

    I hope this is of some use or at least gives someone some ideas.

    Matt

  2. #2
    liverpoolfcfan's Avatar
    liverpoolfcfan is offline Outstanding Member
    Join Date
    Oct 2009
    Location
    Dublin, IRELAND
    Posts
    698
    Rep Power
    6

    Default

    Thanks a million for this. I have been starting to look at migrating from CentOS 5_x64 to CentOS 6_x64 and was getting confused by the various wiki documents out there. This makes much more sense to me.

  3. #3
    langs's Avatar
    langs is offline Special Member
    Join Date
    Sep 2006
    Location
    Brisbane
    Posts
    132
    Rep Power
    8

    Default

    Np mate I am glad it was of some help :-)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 7
    Last Post: 04-13-2014, 01:04 PM
  2. Successful upgrade from 6.0.9 to 6.0.10 on Centos 5 64bit
    By matnor in forum Zimbra Success Stories
    Replies: 1
    Last Post: 01-03-2011, 05:56 PM
  3. Successful upgrade from 6.0.8 to 6.0.9 on Centos 5 64bit
    By matnor in forum Zimbra Success Stories
    Replies: 7
    Last Post: 12-01-2010, 03:23 AM
  4. Successful upgrade from 6.0.7 NE to 6.0.8 NE on CentOS 5 64bit
    By batfastad in forum Zimbra Success Stories
    Replies: 0
    Last Post: 08-31-2010, 04:57 PM
  5. Successful update from 6.0.3 to 6.0.5 NE CentOS x64
    By Goonsniper in forum Zimbra Success Stories
    Replies: 0
    Last Post: 02-20-2010, 12:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •