LDAP Multi Master Replication: Difference between revisions

No edit summary
No edit summary
Line 4: Line 4:
Two example hostnames will be used throughout this document.
Two example hostnames will be used throughout this document.


master1.example.com (Primary initial master)
master1.example.com (Primary master)
master2.example.com (Secondary master that is being added)
master2.example.com (Secondary master that is being added)


Line 32: Line 32:
  * On the installation menu, choose "1" for common configuration
  * On the installation menu, choose "1" for common configuration
  * Change the ldap master hostname to be that of your primary master (Ex. master1.example.com)
  * Change the ldap master hostname to be that of your primary master (Ex. master1.example.com)
  * Change the admin password to be that of the Zimbra admin password on the master
  * Change the admin password to be that of the Zimbra admin password on the primary master


  * On the installation menu, choose "2" for LDAP configuration
  * On the installation menu, choose "2" for LDAP configuration
  * Choose "4" to change the replication type to '''mmr''' instead of '''replica'''
  * Choose "4" to change the replication type to '''mmr''' instead of '''replica'''
  * The Server ID for this secondary master will default to 2.  Leave it unchanged if this is the second master.  See more in the Server ID section below.
  * The Server ID for this secondary master will default to 2.  Leave it unchanged if this is the second master.  See more in the Server ID section below.
* Change "7" to match the replica password from the primary master
* Change "8" to match the postfix password from the primary master
* Change "9" to match the amavis password from the primary master
* Change "10" to match the nginx password from the primary master
* After installation finishes, update the ldap_master_url to contain both masters, preferring this master.
* '''zmlocalconfig -e ldap_master_url="ldap://master2.example.com:389 ldap://master1.example.com:389"


== Promoting an existing replica to be a multi-master ==
== Promoting an existing replica to be a multi-master ==

Revision as of 21:44, 25 July 2011

Admin Article

Article Information

This article applies to the following ZCS versions.

ZCS 8.0 Article ZCS 8.0

Zimbra Multi-Master Replication

The ability to have more than a single functioning master has been added with ZCS 8.0 and later. This document details the steps required for setting up a Multi-Master configuration, as well as how to perform administrative tasks such as promote an existing replica to be part of the multi-master pool. Multi-Master Replication will be shortened to MMR for the rest of this document.

Two example hostnames will be used throughout this document.

master1.example.com (Primary master) master2.example.com (Secondary master that is being added)

Data to have before starting

* Zimbra Admin LDAP Password
* LDAP replication password
* NGINX LDAP password
* Amavis LDAP password
* Postfix LDAP password

Enabling Multi-Master replication on an existing Single node master

This assumes you already have an installed single-master ZCS LDAP server that is not already enabled for MMR. Enabling MMR is a manual one-time step. You will need to know the hostname of the secondary master you plan on adding into the multi-master pool before you can enable MMR on your standalone master.

On the single-node master as the zimbra user:

* ./libexec/zmldapenable-mmr -s 1 -m ldap://master2.example.com:389/ 

Executing this command will do the following things:

* Set this master's Server ID (sid) to 1
* Tell the master that it will be in a pool with a secondary master named secondmaster.example.com that is listening to LDAP on port 389
* It will use the default Replication ID (rid) of 100 for the secondary master

Installing a Secondary master

To install a brand new secondary master, install ZCS as you normally would for a multi-node installation. zcs-ldap must be one of the packages chosen for installation.

* On the installation menu, choose "1" for common configuration
* Change the ldap master hostname to be that of your primary master (Ex. master1.example.com)
* Change the admin password to be that of the Zimbra admin password on the primary master
* On the installation menu, choose "2" for LDAP configuration
* Choose "4" to change the replication type to mmr instead of replica
* The Server ID for this secondary master will default to 2.  Leave it unchanged if this is the second master.  See more in the Server ID section below.
* Change "7" to match the replica password from the primary master
* Change "8" to match the postfix password from the primary master
* Change "9" to match the amavis password from the primary master
* Change "10" to match the nginx password from the primary master
* After installation finishes, update the ldap_master_url to contain both masters, preferring this master.
* zmlocalconfig -e ldap_master_url="ldap://master2.example.com:389 ldap://master1.example.com:389"

Promoting an existing replica to be a multi-master

MMR utilities

=Server ID information (sid)

Replication ID information (rid)

Configuring more than two masters

Jump to: navigation, search