Page 1 of 2 12 LastLast
Results 1 to 10 of 61

Thread: [SOLVED] Zimbra on DRBD

Hybrid View

  1. #1
    Join Date
    Apr 2006
    Posts
    11
    Rep Power
    9

    Default [SOLVED] Zimbra on DRBD

    Has anyone tried Zimbra OSS high avalability on DRBD ?
    Will it work ?

  2. #2
    Join Date
    May 2006
    Location
    Germany
    Posts
    30
    Rep Power
    9

    Default

    Quote Originally Posted by prash
    Has anyone tried Zimbra OSS high avalability on DRBD ?
    Will it work ?
    I'm also very interested on this !!
    DRBD seems a good choice in general, just not sure if it also works proper for mail servers with lot of traffic.

    Or any other failover/ha solution running there. Have two good servers but no external storage.

    cheers

  3. #3
    Join Date
    Nov 2005
    Posts
    36
    Rep Power
    10

    Talking DRBD & Heartbeat SUCCESSFULL working !

    Hi folks,

    on my Debian-Servers i got ZIMBRA successfull working with heartbeat on a DRBD netraid !

    Short description (how i did it): FOR TESTING ONLY !!!!
    ==============================================


    I ASSUME, that you have a proper running installation of heartbeat & DRBD !!

    1. Make 2 (!) installations of Zimbra with exactly the same parameters, on 2 different server, of course.

    2. Define one server as Master (for yourself and later for heartbeat), and configure this one to your ZIMBRA-requirements.

    3. Test your Master-Zimbra-Server if everything is fine, up & running

    4. Remove on BOTH NODES ALL Zimbra auto-start-scripts, like
    Code:
    rm /etc/rc2.d/S99zimbra
    rm /etc/rc3.d/S99zimbra
    rm /etc/rc4.d/S99zimbra
    rm /etc/rc5.d/S99zimbra
    5. STOP ALL Zimbra services:
    Code:
    /etc/init.d/zimbra stop
    6. MOVE /opt to somewhere else, e.g /opt_save, and create /opt again:
    Code:
    # mv /opt /opt_save
    # mkdir /opt
    7. Get the DRBD working on /opt as a netraid. I don't know if it will work with symlinks, so i decided to mount /opt directly with DRBD. Don't forget /etc/fstab

    8. Now you have to reboot BOTH nodes, to be sure that you have a proper DRBD netraid running on /opt !!!
    Check also if heartbeat is running as well and mounts /opt properly if your Master is dead !!

    9. If everythings is working fine, then it's time to copy Zimbra back to production state:
    Code:
    mv /opt_save/zimbra /opt/
    10. Edit /etc/ha.d/haresources on BOTH NODES and ADD 'zimbra' at the end of the line where you a controlling, what heartbeat should start & stop.
    Code:
    # nano /etc/ha.d/haresources
    
    zimbra-01 drbddisk::netraid1 Filesystem::/dev/drbd0::/opt::ext3 YOUR_MASTER_IP zimbra
    11. REBOOT both Nodes, and Zimbra should now start on the master. If the master dies, the 2nd node will takeover completly

    BEWARE:
    ==> THIS WAS DONE JUST FOR TESTING PURPOSES !!!
    ==> EXACTLY ANALYSIS of Zimbra's behaviour is PENDING !!!


    I hope it'll work in a production enviroment, i will test it this week with nearly 60GB email, so we will see....

    /harry

  4. #4
    Join Date
    May 2006
    Location
    Germany
    Posts
    30
    Rep Power
    9

    Wink

    Quote Originally Posted by papaya74
    Hi folks,

    BEWARE:
    ==> THIS WAS DONE JUST FOR TESTING PURPOSES !!!
    ==> EXACTLY ANALYSIS of Zimbra's behaviour is PENDING !!!


    I hope it'll work in a production enviroment, i will test it this week with nearly 60GB email, so we will see....

    /harry

    Hi harry,

    how's going?
    Already in production?
    Still happy with it?
    New cognitions and tips through of your technical expertise?
    Whats your server specs and user enviroment?

    Thx & cheers
    Christian

    -- I sooo prefer Debian over fat RedHat ;-) --

  5. #5
    Join Date
    Nov 2005
    Posts
    36
    Rep Power
    10

    Default DRBD & ZIMBRA = STABLE !

    Hi everyone,

    i just want to give a short feedback, that DRBD & Zimbra are now working together since 3 months in a high production enviroment with thousands mails per day !

    I haven't noticed any problems so far !
    Takeover via Heartbeat & DRBD is working to 100% ;-)

    Regards,

    Harry

  6. #6
    Join Date
    Aug 2006
    Posts
    8
    Rep Power
    9

    Default zimbra on drbd setup

    Hi,

    I did a test setup on two servers with different hostname and ip address (but they both serve the same domain like example.com), the drbd and heartbeat work fine, but when I test the zimbra and shutdown the primary, the secondary becomes the primary also the partition mounted successfully, but zimbra can't start on secondary server.

    papaya mentioned do a same installation in two servers, but drbd and heartbeat both require to have different hostname and IPs, how to do the same installation in zimbra?

    Any helps will be appreciated!

    Thanks!

  7. #7
    Join Date
    Jan 2008
    Posts
    223
    Rep Power
    7

    Default

    Quote Originally Posted by papaya74 View Post
    Hi folks,

    on my Debian-Servers i got ZIMBRA successfull working with heartbeat on a DRBD netraid !

    Short description (how i did it): FOR TESTING ONLY !!!!
    ==============================================


    I ASSUME, that you have a proper running installation of heartbeat & DRBD !!

    1. Make 2 (!) installations of Zimbra with exactly the same parameters, on 2 different server, of course.

    2. Define one server as Master (for yourself and later for heartbeat), and configure this one to your ZIMBRA-requirements.

    3. Test your Master-Zimbra-Server if everything is fine, up & running

    4. Remove on BOTH NODES ALL Zimbra auto-start-scripts, like
    Code:
    rm /etc/rc2.d/S99zimbra
    rm /etc/rc3.d/S99zimbra
    rm /etc/rc4.d/S99zimbra
    rm /etc/rc5.d/S99zimbra
    5. STOP ALL Zimbra services:
    Code:
    /etc/init.d/zimbra stop
    6. MOVE /opt to somewhere else, e.g /opt_save, and create /opt again:
    Code:
    # mv /opt /opt_save
    # mkdir /opt
    7. Get the DRBD working on /opt as a netraid. I don't know if it will work with symlinks, so i decided to mount /opt directly with DRBD. Don't forget /etc/fstab

    8. Now you have to reboot BOTH nodes, to be sure that you have a proper DRBD netraid running on /opt !!!
    Check also if heartbeat is running as well and mounts /opt properly if your Master is dead !!

    9. If everythings is working fine, then it's time to copy Zimbra back to production state:
    Code:
    mv /opt_save/zimbra /opt/
    10. Edit /etc/ha.d/haresources on BOTH NODES and ADD 'zimbra' at the end of the line where you a controlling, what heartbeat should start & stop.
    Code:
    # nano /etc/ha.d/haresources
    
    zimbra-01 drbddisk::netraid1 Filesystem::/dev/drbd0::/opt::ext3 YOUR_MASTER_IP zimbra
    11. REBOOT both Nodes, and Zimbra should now start on the master. If the master dies, the 2nd node will takeover completly

    BEWARE:
    ==> THIS WAS DONE JUST FOR TESTING PURPOSES !!!
    ==> EXACTLY ANALYSIS of Zimbra's behaviour is PENDING !!!


    I hope it'll work in a production enviroment, i will test it this week with nearly 60GB email, so we will see....

    /harry
    Can u let me know if my Understanding is Correct on This..?

    Server - 1 IP-1
    Server - 2 IP-2
    Virtual_Server IP-0

    Direct Ethernet CrossOver Cable Connected between Server-1(IP-3)
    & Server-2(IP-4) With No Switches .(For Replication & Hear Beat)

    In Above Case Where IP-0,IP3 , IP4 Should be reflected.

  8. #8
    Join Date
    May 2008
    Location
    Nigeria
    Posts
    92
    Rep Power
    7

    Default Heartbeat 2.1.3 Fails to Start Zimbra

    Hi Papaya,

    I am using heartbeat 2.1.3 on CENTOS/REDHAT 5,

    Here's my /etc/ha.d/ha.cf:
    logfile /var/log/ha-log

    logfacility local0

    keepalive 2

    deadtime 60

    warntime 10

    initdead 120

    auto_failback on

    bcast eth0

    node hercules.olotu.com

    ping 192.168.183.2

    respawn hacluster /usr/lib/heartbeat/ipfail

    crm yes

    I am using crm,

    So I created and xml file using the command:
    /usr/lib/heartbeat/haresources2cib.py --stdout -c /etc/ha.d/ha.cf, and got this config file (I am testing it one a single node, since two nodes fail to work)

    Resources section:
    <resources>
    <group id="group_1">
    <primitive class="ocf" id="IPaddr_192_168_183_99" provider="heartbeat" type="IPaddr">
    <operations>
    <op id="IPaddr_192_168_183_99_mon" interval="5s" name="monitor" timeout="5s"/>
    </operations>
    <instance_attributes id="IPaddr_192_168_183_99_inst_attr">
    <attributes>
    <nvpair id="IPaddr_192_168_183_99_attr_0" name="ip" value="192.168.183.99"/>
    </attributes>
    </instance_attributes>
    </primitive>
    <primitive class="lsb" id="zimbra_2" provider="heartbeat" type="zimbra">
    <operations>
    <op id="zimbra_2_mon" interval="120s" name="monitor" timeout="60s"/>
    </operations>
    </primitive>
    </group>
    </resources>

    But Zimbra always fail to start! I get this error when I run "crm_mon"
    [root@hercules ~]# crm_mon
    Defaulting to one-shot mode
    You need to have curses available at compile time to enable console mode


    ============
    Last updated: Wed Jun 20 18:17:21 2012
    Current DC: hercules.olotu.com (a33babe8-8574-49a4-8f4e-1e7f7a43f551)
    1 Nodes configured.
    1 Resources configured.
    ============

    Node: hercules.olotu.com (a33babe8-8574-49a4-8f4e-1e7f7a43f551): online

    Resource Group: group_1
    IPaddr_192_168_183_99 (heartbeat:cf:IPaddr): Started hercules.olotu.com
    zimbra_2 (lsb:zimbra): Started hercules.olotu.com (unmanaged) FAILED

    Failed actions:
    zimbra_2_start_0 (node=hercules.olotu.com, call=7, rc=-2): Timed Out
    zimbra_2_stop_0 (node=hercules.olotu.com, call=8, rc=-2): Timed Out

    Then "crm_verify --live-check -V" gives me:
    [root@hercules ~]# crm_verify --live-check -V
    crm_verify[1103]: 2012/06/20_18:19:17 WARN: unpack_rsc_op: Processing failed op zimbra_2_start_0 on hercules.olotu.com: Timed Out
    crm_verify[1103]: 2012/06/20_18:19:17 WARN: unpack_rsc_op: Compatability handling for failed op zimbra_2_start_0 on hercules.olotu.com
    crm_verify[1103]: 2012/06/20_18:19:17 WARN: unpack_rsc_op: Processing failed op zimbra_2_stop_0 on hercules.olotu.com: Timed Out
    crm_verify[1103]: 2012/06/20_18:19:17 WARN: unpack_rsc_op: Compatability handling for failed op zimbra_2_stop_0 on hercules.olotu.com
    crm_verify[1103]: 2012/06/20_18:19:17 WARN: native_color: Resource zimbra_2 cannot run anywhere
    crm_verify[1103]: 2012/06/20_18:19:17 WARN: custom_action: Action zimbra_2_stop_0 (unmanaged)
    Warnings found during check: config may not be valid

    I have run checks on on linux-ha.org to be sure zimbra startup script is okay.

    KIndly help, anyone please!!

    I even created a custom zimbra init file, thinking maybe ZImbra's own startup script wasn't working:

    #!/bin/bash
    #
    # Run-level Startup script for the Zimbra services
    #
    # chkconfig: 345 91 19
    # description: Startup/Shutdown Zimbra services

    # if the executables do not exist -- display error

    # of the service or usage display
    RETVAL=0
    case "$1" in
    start)
    # Zimbra startup
    echo -n "Starting Zimbra: "
    su - zimbra -c "/opt/zimbra/bin/zmcontrol start"
    RETVAL=$?
    sleep 5
    touch /var/lock/subsys/zimbra
    echo "OK"
    ;;
    stop)
    # Zimbra shutdown
    echo -n "Shutdown Zimbra: "
    sleep 5
    su - zimbra -c "/opt/zimbra/bin/zmcontrol stop"
    RETVAL=$?
    rm -f /var/lock/subsys/zimbra
    echo "OK"
    ;;
    status)
    # Zimbra status
    echo -n "Zimbra Status: "
    su - zimbra -c "/opt/zimbra/bin/zmcontrol status"
    #if ! test -f /var/lock/subsys/zimbra ; then
    RETVAL=$?
    # RETVAL=3
    ;;
    reload|restart)
    # Zimbra shutdown
    echo -n "Shutdown Zimbra: "
    sleep 1
    su - zimbra -c "/opt/zimbra/bin/zmcontrol stop"
    RETVAL=$?
    rm -f /var/lock/subsys/zimbra
    echo "OK"
    # Zimbra startup
    echo -n "Starting Zimbra: "
    su - zimbra -c "/opt/zimbra/bin/zmcontrol start"
    RETVAL=$?
    sleep 1
    touch /var/lock/subsys/zimbra
    echo "OK"
    ;;
    *)
    echo "Usage: $0 start|stop|restart|reload|status"
    exit 1
    esac
    exit $RETVAL
    @


    STILL NOT WORKING, kindly share solutions please!



    Quote Originally Posted by papaya74 View Post
    Hi folks,

    on my Debian-Servers i got ZIMBRA successfull working with heartbeat on a DRBD netraid !

    Short description (how i did it): FOR TESTING ONLY !!!!
    ==============================================


    I ASSUME, that you have a proper running installation of heartbeat & DRBD !!

    1. Make 2 (!) installations of Zimbra with exactly the same parameters, on 2 different server, of course.

    2. Define one server as Master (for yourself and later for heartbeat), and configure this one to your ZIMBRA-requirements.

    3. Test your Master-Zimbra-Server if everything is fine, up & running

    4. Remove on BOTH NODES ALL Zimbra auto-start-scripts, like
    Code:
    rm /etc/rc2.d/S99zimbra
    rm /etc/rc3.d/S99zimbra
    rm /etc/rc4.d/S99zimbra
    rm /etc/rc5.d/S99zimbra
    5. STOP ALL Zimbra services:
    Code:
    /etc/init.d/zimbra stop
    6. MOVE /opt to somewhere else, e.g /opt_save, and create /opt again:
    Code:
    # mv /opt /opt_save
    # mkdir /opt
    7. Get the DRBD working on /opt as a netraid. I don't know if it will work with symlinks, so i decided to mount /opt directly with DRBD. Don't forget /etc/fstab

    8. Now you have to reboot BOTH nodes, to be sure that you have a proper DRBD netraid running on /opt !!!
    Check also if heartbeat is running as well and mounts /opt properly if your Master is dead !!

    9. If everythings is working fine, then it's time to copy Zimbra back to production state:
    Code:
    mv /opt_save/zimbra /opt/
    10. Edit /etc/ha.d/haresources on BOTH NODES and ADD 'zimbra' at the end of the line where you a controlling, what heartbeat should start & stop.
    Code:
    # nano /etc/ha.d/haresources
    
    zimbra-01 drbddisk::netraid1 Filesystem::/dev/drbd0::/opt::ext3 YOUR_MASTER_IP zimbra
    11. REBOOT both Nodes, and Zimbra should now start on the master. If the master dies, the 2nd node will takeover completly

    BEWARE:
    ==> THIS WAS DONE JUST FOR TESTING PURPOSES !!!
    ==> EXACTLY ANALYSIS of Zimbra's behaviour is PENDING !!!


    I hope it'll work in a production enviroment, i will test it this week with nearly 60GB email, so we will see....

    /harry

  9. #9
    Join Date
    Dec 2007
    Posts
    445
    Rep Power
    7

    Post

    Hi tapan,

    i had two server in development envirnoment (opensource zimbra 4.5.10)
    one with ip 172.17.218.43
    and other with ip 172.17.218.44

    with common /opt/zimbra on storage drive on both

    i need to implement DRBD in between them.
    so if one zimbra server fails then other sould be started automatically
    with that common storage( /opt/zimbra).

    Any help

    Regards,
    chandu

  10. #10
    Join Date
    Dec 2008
    Location
    San Rafael, CA
    Posts
    113
    Rep Power
    6

    Default

    Yes, we have two dual quad-core Intels with heartbeat running and have tested it thoroughly for failsafe. Works great!

    You do have to remember that the 'inactive' server does not activate Zimbra or the mail/file/data stores until it is 'active'. Also, when you are working on a server be sure never to log into the inactive server and try to do work like transfers or importing on the active server. It will crash it with a "split brain" error.

    Don't have time to go into all the intricacies. Will get back to this thread next week.

Similar Threads

  1. Replies: 26
    Last Post: 04-19-2011, 10:24 AM
  2. Zimbra shutdowns every n hours.
    By Andrewb in forum Administrators
    Replies: 13
    Last Post: 08-14-2007, 09:55 AM
  3. Fedora Core 3, Clean Install - Not working!
    By pcjackson in forum Installation
    Replies: 17
    Last Post: 03-05-2006, 07:38 PM
  4. Monitoring : Data not yet avalaible
    By s3nz3x in forum Installation
    Replies: 7
    Last Post: 11-30-2005, 07:18 PM
  5. FC3 Install and no zimbra ?
    By aws in forum Installation
    Replies: 10
    Last Post: 10-09-2005, 05:19 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
  •