How to change the ServerID in MMR setup: Difference between revisions
Ashrivastava (talk | contribs) No edit summary |
Ashrivastava (talk | contribs) No edit summary |
||
Line 11: | Line 11: | ||
Master: ldap://master1.domain.com:389ServerID: 2 Code: 6 Status: 0y 0M 0w 0d 0h 0m 31 CSNs: | Master: ldap://master1.domain.com:389ServerID: 2 Code: 6 Status: 0y 0M 0w 0d 0h 0m 31 CSNs: | ||
20200909225502.112266Z#000000#002#000000 | 20200909225502.112266Z#000000#002#000000 | ||
[zimbra@ldap1 ~]$ /opt/zimbra/libexec/zmreplchk | [zimbra@ldap1 ~]$ /opt/zimbra/libexec/zmreplchk | ||
Master: ldap://master1.domain.com:389 ServerID: 2 Code: 6 Status: 0y 0M 0w 0d 0h 0m 31s behind CSNs: | Master: ldap://master1.domain.com:389 ServerID: 2 Code: 6 Status: 0y 0M 0w 0d 0h 0m 31s behind CSNs: | ||
Line 18: | Line 19: | ||
====Solution:==== | ====Solution:==== | ||
Need to | Need to make changes for the parameter olcserverid in config file and reimport the config.back file to make the ServerId different. | ||
'''Step 1:''' | '''Step 1:''' | ||
Line 30: | Line 31: | ||
'''Step 3:''' | '''Step 3:''' | ||
Reimport the configuration database and main database on LDAP1 server. | Reimport the configuration database and main database on LDAP1 server. | ||
ldap stop | |||
cd /opt/zimbra/data/ldap | cd /opt/zimbra/data/ldap | ||
mv mdb mdb.old | mv mdb mdb.old | ||
Line 39: | Line 41: | ||
mv accesslog accesslog.old #On both Master LDAP server | mv accesslog accesslog.old #On both Master LDAP server | ||
mkdir -p accesslog/db #On both Matesr LDAP server | mkdir -p accesslog/db #On both Matesr LDAP server | ||
ldap start | |||
'''Step 4:''' | '''Step 4:''' | ||
Line 54: | Line 57: | ||
20221013134129.954789Z#000000#001#000000 | 20221013134129.954789Z#000000#001#000000 | ||
20200909225502.112266Z#000000#002#000000 | 20200909225502.112266Z#000000#002#000000 | ||
[zimbra@ldap1 ~]$ /opt/zimbra/libexec/zmreplchk | [zimbra@ldap1 ~]$ /opt/zimbra/libexec/zmreplchk | ||
Master: ldap://master1.domain.com:389 ServerID: 1 Code: 0 Status: In Sync CSNs: | Master: ldap://master1.domain.com:389 ServerID: 1 Code: 0 Status: In Sync CSNs: |
Revision as of 15:53, 19 October 2022
How to change the ServerID in MMR setup?
Problem:
In MMR setup both ldaps are not in sync due to ServerID is same for the both servers.
[zimbra@ldap2 ~]$ /opt/zimbra/libexec/zmreplchk Master: ldap://master2.domain.com:389 ServerID: 2 Code: 6 Status: 0y 0M 0w 0d 0h 0m 31 CSNs: 20221013134129.954789Z#000000#001#000000 Master: ldap://master1.domain.com:389ServerID: 2 Code: 6 Status: 0y 0M 0w 0d 0h 0m 31 CSNs: 20200909225502.112266Z#000000#002#000000 [zimbra@ldap1 ~]$ /opt/zimbra/libexec/zmreplchk Master: ldap://master1.domain.com:389 ServerID: 2 Code: 6 Status: 0y 0M 0w 0d 0h 0m 31s behind CSNs: 20221013134129.954789Z#000000#001#000000 Master: ldap://master2.domain.com:389 ServerID: 2 Code: 6 Status: 0y 0M 0w 0d 0h 0m 31s behind CSNs: 20200909225502.112266Z#000000#002#000000
Solution:
Need to make changes for the parameter olcserverid in config file and reimport the config.back file to make the ServerId different.
Step 1: Take the backup of main database and configuration database manually from LDAP1.
/opt/zimbra/libexec/zmslapcat /tmp /opt/zimbra/libexec/zmslapcat -c /tmp
Step 2: Make the change in "/opt/zimbra/data/ldap/config/cn=config.ldif" file, Set different ID (1) for the olcserverid parameter.
Step 3: Reimport the configuration database and main database on LDAP1 server.
ldap stop cd /opt/zimbra/data/ldap mv mdb mdb.old mv config config.bak mkdir -p mdb/db mkdir config /opt/zimbra/libexec/zmslapadd -c /tmp/ldap-config.bak /opt/zimbra/libexec/zmslapadd /tmp/ldap.bak mv accesslog accesslog.old #On both Master LDAP server mkdir -p accesslog/db #On both Matesr LDAP server ldap start
Step 4: Restart the services.
zmcontrol restart
Step 5: Now again check both ladps are in sync.
[zimbra@ldap2 ~]$ /opt/zimbra/libexec/zmreplchk Master: ldap://master1.domain.com:389 ServerID: 1 Code: 0 Status: In Sync CSNs: 20221013134129.954789Z#000000#001#000000 20200909225502.112266Z#000000#002#000000 Master: ldap://master2.domain.com:389 ServerID: 2 Code: 0 Status: In Sync CSNs: 20221013134129.954789Z#000000#001#000000 20200909225502.112266Z#000000#002#000000 [zimbra@ldap1 ~]$ /opt/zimbra/libexec/zmreplchk Master: ldap://master1.domain.com:389 ServerID: 1 Code: 0 Status: In Sync CSNs: 20221013134129.954789Z#000000#001#000000 20200909225502.112266Z#000000#002#000000 Master: ldap://master2.domain.com:389 ServerID: 2 Code: 0 Status: In Sync CSNs: 20221013134129.954789Z#000000#001#000000 20200909225502.112266Z#000000#002#000000
Submitted by: Aditya Shrivastava |