How to change the ServerID in MMR setup: Difference between revisions
Ashrivastava (talk | contribs) No edit summary |
Ashrivastava (talk | contribs) No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
__FORCETOC__ | __FORCETOC__ | ||
====Problem:==== | ====Problem:==== | ||
In MMR setup both | In MMR setup both ldap are not in sync due to the same ServerID for the both LDAP servers i.e.(ServerID: 2). | ||
[zimbra@ldap2 ~]$ /opt/zimbra/libexec/zmreplchk | [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: | Master: ldap://master2.domain.com:389 ServerID: 2 Code: 6 Status: 0y 0M 0w 0d 0h 0m 31 CSNs: | ||
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 modify the ServerID: 2 to 1 on LDAP1 server. To achieve this, Need to modify configuration database and update the value of parameter olcServerId to 1 on LDAP1 server. | ||
'''Step 1:''' | '''Step 1:''' | ||
Take the backup | Take the backup configuration database manually from LDAP1 server. | ||
Stop the ldap service and Export the ldap configuration database. | |||
su - zimbra | |||
ldap stop | |||
/opt/zimbra/libexec/zmslapcat -c /tmp | /opt/zimbra/libexec/zmslapcat -c /tmp | ||
'''Step 2:''' | '''Step 2:''' | ||
Modify the '''/tmp/ldap-config.bak''' to update the value of olcServerID and make it 1. | |||
'''Step 3:''' | '''Step 3:''' | ||
Verify the changed oclServerID before importing it back. | |||
[zimbra@ldap1 ~]$grep -i olcServerID: /tmp/ldap-config.bak | |||
olcServerID: 1 | |||
'''Step 4:''' | |||
Move the existing config directory and Import the configuration database on LDAP1 server. | |||
cd /opt/zimbra/data/ldap | cd /opt/zimbra/data/ldap | ||
mv config config.bak | mv config config.bak | ||
mkdir config | mkdir config | ||
/opt/zimbra/libexec/zmslapadd -c /tmp/ldap-config.bak | /opt/zimbra/libexec/zmslapadd -c /tmp/ldap-config.bak | ||
'''Step | '''Step 5:''' | ||
Restart the services. | Restart the services. | ||
ldap start | |||
'''Step | '''Step 6:''' | ||
Now again check both ladps are in sync. | Now again check both ladps are in sync. | ||
Line 54: | Line 59: | ||
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: |
Latest revision as of 20:54, 12 January 2023
How to change the ServerID in MMR setup?
Problem:
In MMR setup both ldap are not in sync due to the same ServerID for the both LDAP servers i.e.(ServerID: 2).
[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 modify the ServerID: 2 to 1 on LDAP1 server. To achieve this, Need to modify configuration database and update the value of parameter olcServerId to 1 on LDAP1 server.
Step 1: Take the backup configuration database manually from LDAP1 server. Stop the ldap service and Export the ldap configuration database.
su - zimbra ldap stop /opt/zimbra/libexec/zmslapcat -c /tmp
Step 2: Modify the /tmp/ldap-config.bak to update the value of olcServerID and make it 1.
Step 3: Verify the changed oclServerID before importing it back.
[zimbra@ldap1 ~]$grep -i olcServerID: /tmp/ldap-config.bak olcServerID: 1
Step 4: Move the existing config directory and Import the configuration database on LDAP1 server.
cd /opt/zimbra/data/ldap mv config config.bak mkdir config /opt/zimbra/libexec/zmslapadd -c /tmp/ldap-config.bak
Step 5: Restart the services.
ldap start
Step 6: 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 |