[SOLVED] Zimbra on DRBD

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
prash
Posts: 11
Joined: Fri Sep 12, 2014 10:09 pm

[SOLVED] Zimbra on DRBD

Post by prash »

Has anyone tried Zimbra OSS high avalability on DRBD ?

Will it work ?
CJ.deb
Posts: 29
Joined: Fri Sep 12, 2014 10:11 pm

[SOLVED] Zimbra on DRBD

Post by CJ.deb »

[quote user="prash"]Has anyone tried Zimbra OSS high avalability on DRBD ?

Will it work ?[/QUOTE]
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
papaya74
Posts: 36
Joined: Fri Sep 12, 2014 10:00 pm

[SOLVED] Zimbra on DRBD

Post by papaya74 »

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 !! :cool:
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 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: /etc/init.d/zimbra stop
6. MOVE /opt to somewhere else, e.g /opt_save, and create /opt again:

# 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: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.

# 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
CJ.deb
Posts: 29
Joined: Fri Sep 12, 2014 10:11 pm

[SOLVED] Zimbra on DRBD

Post by CJ.deb »

[quote user="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[/QUOTE]


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 ;-) --
papaya74
Posts: 36
Joined: Fri Sep 12, 2014 10:00 pm

[SOLVED] Zimbra on DRBD

Post by papaya74 »

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
zimber
Posts: 8
Joined: Fri Sep 12, 2014 10:14 pm

[SOLVED] Zimbra on DRBD

Post by zimber »

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!
dcand
Posts: 1
Joined: Fri Sep 12, 2014 10:22 pm

[SOLVED] Zimbra on DRBD

Post by dcand »

DRBD and heartbeat are properly configured and working. The problem is Zimbra does not start during a failover on the remaining host.
It reports that LDAP cannot be started and then stops starting the whole thing. Papaya74, can you give some more information on your setup and the installation/configuration process, please? Especially how you configured network settings (host names) would be of high interest.
Many thanks for your work!
papaya74
Posts: 36
Joined: Fri Sep 12, 2014 10:00 pm

[SOLVED] Zimbra on DRBD

Post by papaya74 »

Hi folks,
okay, i try to give some more information about my setup.
1. Zimbra is being used inhouse ONLY, which means, people are connecting by IP-adresses for IMAP and Web-GUI in our internal LAN.
2. We have 6 static IPs from our Internet-Provider
3. I setup a MX-Record from our Hosting-Provider --> Public IP of our Internet-Line --> Portforwarding --> Zimbra-Server
4. LAN-IP Setup
Zimbra Virtual (Heartbeat) = 192.168.100.100

Zimbra-01 = 192.168.100.101

Zimbra-02 = 192.168.100.102
5. Zimbra-01:


# nano /etc/hosts
127.0.0.1 our-domain.com localhost.localdomain localhost

192.168.100.101 zimbra-01 our-domain.com

192.168.100.102 zimbra-02


6. Zimbra-02:
# nano /etc/hosts
127.0.0.1 our-domain.com localhost.localdomain localhost

192.168.100.102 zimbra-02 our-domain.com

192.168.100.101 zimbra-01




7. ADMIN-UI


**General**:

Service host name: our-domain.com

LMTP bind address: localhost
**MTA**:

Web mail MTA Hostname: localhost

Relay MTA for external delivery: smtp.our-provider.com

Enable DNS lookups: DISABLED
That's all, i can mention here...
BTW: I also had problems updating from 3.2x to 4.0 with LDAP & LMTP bindings, and it was a try & error game to get it work, but with the information above it's running right now ;)
Best Regards,
Harry
leog21
Advanced member
Advanced member
Posts: 122
Joined: Fri Sep 12, 2014 10:45 pm

[SOLVED] Zimbra on DRBD

Post by leog21 »

papaya74,
Thanks for your post, it really helped me setup our Zimbra with DRBD.
I have a question regarding these settings, also did you do any special configs to bind Zimbra services to a particular ip? We are having some problems with Zimbra serving services on both the real and virtual (HA) ip.


LMTP bind address: localhost

Web mail MTA Hostname: localhost

Enable DNS lookups: DISABLED
Thanks,

Leo
tapan.thapa
Posts: 27
Joined: Fri Sep 12, 2014 10:39 pm

[SOLVED] Zimbra on DRBD

Post by tapan.thapa »

I also got the success in clustering of two zimbra server. If any one require any help do let me know.
Post Reply