Promoting Replica to LDAP Master: Difference between revisions
No edit summary |
No edit summary |
||
Line 47: | Line 47: | ||
|- style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes" | |- style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes" | ||
| style="width: 4.65in; background: #E6E6E6; padding: 0in 5.4pt 0in 5.4pt" width="798" | | | style="width: 4.65in; background: #E6E6E6; padding: 0in 5.4pt 0in 5.4pt" width="798" | | ||
cp /opt/zimbra/conf/custom/ldap/DB_CONFIG.accesslog /opt/zimbra/accesslog/db/DB_CONFIG | cp /opt/zimbra/conf/custom/ldap/DB_CONFIG.accesslog /opt/zimbra/data/ldap/accesslog/db/DB_CONFIG | ||
|} | |} | ||
:For the default DB_CONFIG: | :For the default DB_CONFIG: | ||
Line 53: | Line 53: | ||
|- style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes" | |- style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes" | ||
| style="width: 4.65in; background: #E6E6E6; padding: 0in 5.4pt 0in 5.4pt" width="798" | | | style="width: 4.65in; background: #E6E6E6; padding: 0in 5.4pt 0in 5.4pt" width="798" | | ||
cp /opt/zimbra/openldap/var/openldap-data/DB_CONFIG.accesslog /opt/zimbra/accesslog/db/DB_CONFIG | cp /opt/zimbra/openldap/var/openldap-data/DB_CONFIG.accesslog /opt/zimbra/data/ldap/accesslog/db/DB_CONFIG | ||
|} | |} | ||
:Start ldap again: | :Start ldap again: | ||
Line 65: | Line 65: | ||
|- style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes" | |- style="mso-yfti-irow: 0; mso-yfti-firstrow: yes; mso-yfti-lastrow: yes" | ||
| style="width: 4.65in; background: #E6E6E6; padding: 0in 5.4pt 0in 5.4pt" width="798" | | | style="width: 4.65in; background: #E6E6E6; padding: 0in 5.4pt 0in 5.4pt" width="798" | | ||
ldapadd -x -H ldapi:/// -D "cn=config" -w "ldap root password" | ldapadd -x -H ldapi:/// -D "cn=config" -w "ldap root password"<br /> | ||
dn: olcDatabase={2}hdb,cn=config<br /> | dn: olcDatabase={2}hdb,cn=config<br /> | ||
changetype: add<br /> | changetype: add<br /> |
Revision as of 01:56, 25 May 2011

Article Information |
---|
This article applies to the following ZCS versions. |
Only one master LDAP server can exist and this LDAP server is authoritative for user information, server configuration, etc. The instructions that follow explain how to promote a replica LDAP server to master and disable the previous LDAP master.
Promoting a Replica Server – Demoting the Master Server
Before you can promote a replica LDAP server to become the master LDAP server, your LDAP replication servers must be up and working correctly; that is the replica LDAP server(s) must be receiving LDAP updates from the master. See the Multi-Server Installation Guide, LDAP Replication Installation chapter.
To promote a replica server to be master
- Shut down all services on all ZCS servers by running zmcontrol stop.
- On the replica LDAP server that will be the new master LDAP server, do the following as the zimbra user:
- a. Start ldap: ldap start
- b. Note the ldap root password, as it will be used extensively: zmlocalconfig -s ldap_root_password
- c. Update the main ldap database to be a master:
ldapmodify -x -H ldapi:/// -D "cn=config" -w "ldap root password" |
- d. Prepare the accesslog database for the new master:
ldap stop |
- e. Copy in the relevant DB_CONFIG file. For a custom DB_CONFIG:
cp /opt/zimbra/conf/custom/ldap/DB_CONFIG.accesslog /opt/zimbra/data/ldap/accesslog/db/DB_CONFIG |
- For the default DB_CONFIG:
cp /opt/zimbra/openldap/var/openldap-data/DB_CONFIG.accesslog /opt/zimbra/data/ldap/accesslog/db/DB_CONFIG |
- Start ldap again:
ldap start |
- f. Add the accesslog database:
ldapadd -x -H ldapi:/// -D "cn=config" -w "ldap root password" |
- g. Update the localconfig values for this server:
zmlocalconfig –e ldap_master_url= <new_master_directory_address> |
- h. On all other servers, update the localconfig values:
zmlocalconfig –e ldap_master_url= <new_master_directory_address> |
- i. On all the other servers, update zmlocalconfig -e ldap_url to remove the old master server. It should already include the new one.
3. Now you run zmmtainit to edit the ldap*.cf files in /opt/zimbra/conf to set the new master LDAP server as the authority for the MTA.These files tell Postfix how to connect to the LDAP server for various commands. If you are moving the directories, you might have Postfix pointing to a server that no longer runs LDAP, which will cause mail delivery to stop.
Note: zmmtainit should be run on the hosts that are running an MTA, but is not required on the other hosts.
As zimbra, type the following. The "XX" is a dummy value. The zmmtainit command will use the ldap_url value from localconfig in spite of this.
/opt/zimbra/libexec/zmmtainit XX |
4. Start the new LDAP master, type zmcontrol start. Then start up the services on all the other servers. At this point, services should be up and running on all hosts, and they should all be working off the new Master LDAP server.
Note: After the replica is promoted to Master, you should verify that the backup schedule is correctly set. Run zmschedulebackup -q. The schedule should match the backup schedule on the Mail Stores. If the backup schedule does not, run the zmschedulebackup command to set the backup schedule.
Shut down the previous master
The old LDAP master must be disabled.
Related Articles