Difference between revisions of "King0770-Notes-ldap-fragmentation"

(Created page with "Have you ever noticed ldap fragmentation on you ldap replica nodes before?<br> <br> <code><pre> zimbra@ldap-replica002 ~]$ date;mdb_stat -a -e -f /opt/zimbra/data/ldap/mdb/db...")
(No difference)

Revision as of 20:22, 20 November 2018

Have you ever noticed ldap fragmentation on you ldap replica nodes before?

zimbra@ldap-replica002 ~]$ date;mdb_stat -a -e -f /opt/zimbra/data/ldap/mdb/db | grep "Free pages" | awk '{print $3 * 4096/1024/1024 " MB"}'
Tue Nov 20 12:12:34 MST 2018
3419.11 MB

[zimbra@ldap-replica002 ~]$ date;mdb_stat -a -e -f /opt/zimbra/data/ldap/mdb/db | grep "Free pages" | awk '{print $3 * 4096/1024/1024 " MB"}'
Tue Nov 20 12:14:16 MST 2018
3554.54 MB

[zimbra@ldap-replica002 ~]$ date;mdb_stat -a -e -f /opt/zimbra/data/ldap/mdb/db | grep "Free pages" | awk '{print $3 * 4096/1024/1024 " MB"}'
Tue Nov 20 12:15:14 MST 2018
3627.49 MB

[zimbra@ldap-replica002 ~]$ date;mdb_stat -a -e -f /opt/zimbra/data/ldap/mdb/db | grep "Free pages" | awk '{print $3 * 4096/1024/1024 " MB"}'
Tue Nov 20 12:16:19 MST 2018
3721.03 MB

[zimbra@ldap-replica002 ~]$ date;mdb_stat -a -e -f /opt/zimbra/data/ldap/mdb/db | grep "Free pages" | awk '{print $3 * 4096/1024/1024 " MB"}'
Tue Nov 20 12:19:13 MST 2018
3932.64 MB

[zimbra@ldap-replica002 ~]$ date;mdb_stat -a -e -f /opt/zimbra/data/ldap/mdb/db | grep "Free pages" | awk '{print $3 * 4096/1024/1024 " MB"}'
Tue Nov 20 12:20:24 MST 2018
4031.6 MB

[zimbra@ldap-replica002 ~]$ date;mdb_stat -a -e -f /opt/zimbra/data/ldap/mdb/db | grep "Free pages" | awk '{print $3 * 4096/1024/1024 " MB"}'
Tue Nov 20 12:21:58 MST 2018
4160.29 MB

Then do the following as the zimbra user

1) Remove the ldap replica it out of the VIP pool    <<== you must do this FIRST

2) zmcontrol stop

3) su - zimbra; mv /opt/zimbra/data/ldap/mdb/ /opt/zimbra/ldap/mdb.old

4) cd /opt/zimbra/data/ldap

5) mkdir -p mdb/db

6) mdb_copy /opt/zimbra/data/ldap/mdb,old/db /opt/zimbra/data/ldap/mdb/db
7) zmcontrol start
Jump to: navigation, search