Results 1 to 9 of 9

Thread: Zimbra, DRBD and Hearbeat, with 2 servers not in the same LAN

  1. #1
    DCC
    DCC is offline New Member
    Join Date
    May 2007
    Posts
    4
    Rep Power
    8

    Default Zimbra, DRBD and Hearbeat, with 2 servers not in the same LAN

    We have difficulties setting up Zimbra in combination with DRBD and Heartbeat. This is our situation:

    We are setting up Zimbra, using DRBD and Heartbeat to make it highly available. We hired 2 dedicated servers in two separate datacenters, so that zimbra will still be available when either network goes down.

    In any Heatbeat & DRBD documentation that I've seen the two machines are in the same local network. A virtual ip address is then used to always make the active machine available at the same address, and the domain name for the zimba interface (eg. mail.domain.com) resolves to that virtual ip address.

    However, in our situation we can't use a virtual ip address, since it would only be known locally, and our servers are in two completely separated networks.

    The first solution we came up with, was to run our own DNS server and update the entry for the zimbra interface (I'll stick with mail.domain.com for the rest of this post) whenever the primary server fails. In more detail:

    server 1:
    ip: 130.0.0.45
    primary server, running zimbra

    server 2:
    ip: 145.0.0.50
    secondary server, waiting until server 1 fails

    mail.domain.com points to 130.0.0.45

    (the ip addresses used aren't the real ips, they're just there to show that the servers are in different networks)

    Now, when server 1 fails, server 2 notices this through Heartbeat, mounts the drbd partition, fires up Zimbra, and updates the A record for mail.domain.com to point to 145.0.0.50. This all works fine. The problem is that DNS entries are being cached client-side, so a person visiting mail.domain.com will still be directed to 130.0.0.45. We tried setting the time-to-live value in Bind really low (120 seconds), but this seems to be ignored by most clients we tried with. (afaik DNS clients aren't required to throw away their cached values after the ttl has passed). In case of a failover, it can take hours before clients seem to notice the destination of mail.domain.com has changed, breaking the point of using a high availability setup (we want such a setup because it offers fast recovery of the zimbra service in case of a failure, if it's going to take hours we might just as well use a single machine).

    Another option we thought of was to create a virtual LAN, so that we could use a virtual ip address and use the setup as shown in most examples. The problem with this option is that a single external ip address has to be forwarded to the virtual ip address of the active server. If the network in which the router that does this forwarding resides goes down, our server still becomes unavailable, making it dependent on a single network again. We chose to hire two geographically separated servers so that not only hardware failures could be overcome quickly, but also network failures. So again, this is not an option.
    (Also, we would need the cooperation of both our hosts to create a virtual LAN and it's quite complex, so we're not really eager to use such a setup.)

    Now, our question:

    How can we setup DRBD and Heartbeat in such way that when either a network failure or hardware failure occurs, Zimbra is made available again quickly?

    If there would be a solution that only requires us to tweak our setup using a DNS update a little this would be great, however, suggestions that need a total rearrange are also welcome.
    Last edited by DCC; 07-16-2007 at 10:47 AM.

  2. #2
    greenrenault's Avatar
    greenrenault is offline Partner (VAR/HSP)
    Join Date
    Jul 2006
    Location
    Australia, ACT
    Posts
    197
    Rep Power
    9

    Default Seen?

    Have you read this discussion thread?
    http://www.zimbra.com/forums/adminis...mbra-drbd.html

  3. #3
    leog21 is offline Special Member
    Join Date
    Sep 2007
    Posts
    123
    Rep Power
    7

    Default

    Hi,

    What happened to your DRBD setup? Were you able to get Zimbra working with DRBD?

    We have Zimbra working with DRBD but in a single location with a hearbeat failover. I'd like to exchange notes if possible.

    Thanks,
    Leo

  4. #4
    DCC
    DCC is offline New Member
    Join Date
    May 2007
    Posts
    4
    Rep Power
    8

    Default

    Sorry for the belated reply.

    During a failure a few weeks ago we noticed that DRBD corrupted some of the data (mostly MySQL data). Since then we have been running without a failover server. Currently we are planning on installing one mailserver in a different network with a lower MX priority, which will keep all mail during a failure on our Zimbra server and will deliver the mail to Zimbra once it comes online again.

    Nonetheless we're rather curious wether your installation is running without corrupting your data. Have you been able to test various possible situations ?

    Having a failover Zimbra server is still a good idea, even in the same network :)
    Quote Originally Posted by greenrenault View Post
    Have you read this discussion thread?
    http://www.zimbra.com/forums/adminis...mbra-drbd.html
    Yes, we have. Thanks :)

  5. #5
    leog21 is offline Special Member
    Join Date
    Sep 2007
    Posts
    123
    Rep Power
    7

    Default

    Thanks for the reply. Do you know what caused the fail over that resulted in the DB corruption?

    Did you use heartbeat with your DRBD setup?

  6. #6
    kwinstrand is offline New Member
    Join Date
    Aug 2008
    Posts
    4
    Rep Power
    6

    Default Follow-up?

    Did you ever figure this out? If so, can you tell us what you ended up doing?

    I'd like to try a similar setup and am anticipating the same issues.

  7. #7
    Chadsel Chen is offline Active Member
    Join Date
    Jul 2007
    Location
    New York, NY
    Posts
    46
    Rep Power
    8

    Default

    Quote Originally Posted by DCC View Post
    Sorry for the belated reply.

    During a failure a few weeks ago we noticed that DRBD corrupted some of the data (mostly MySQL data). Since then we have been running without a failover server. Currently we are planning on installing one mailserver in a different network with a lower MX priority, which will keep all mail during a failure on our Zimbra server and will deliver the mail to Zimbra once it comes online again.

    Nonetheless we're rather curious wether your installation is running without corrupting your data. Have you been able to test various possible situations ?

    Having a failover Zimbra server is still a good idea, even in the same network

    Yes, we have. Thanks
    DRBD is not recommended over WAN since it relied heavily on bandwidth. If you setup over WAN, it's quite possible you experienced data corruption.

  8. #8
    Chadsel Chen is offline Active Member
    Join Date
    Jul 2007
    Location
    New York, NY
    Posts
    46
    Rep Power
    8

    Default

    DRBD could be implemented over WAN and I plan to do this project in near term.
    Check DRBD proxy.

  9. #9
    Samp is offline Advanced Member
    Join Date
    Jun 2006
    Posts
    209
    Rep Power
    9

    Default

    Quote Originally Posted by Chadsel Chen View Post
    DRBD could be implemented over WAN and I plan to do this project in near term.
    Check DRBD proxy.
    I'm interested too !

    Sam.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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