Optimizing 5.0 to 6.0 LDAP upgrade: Difference between revisions
m (added article footer and category) |
No edit summary |
||
(30 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{BC|Certified}} | ||
__FORCETOC__ | |||
<div class="col-md-12 ibox-content"> | |||
=Optimizing Zimbra Collaboration 5.0 to 6.0 - LDAP upgrade= | |||
{{KB|{{ZC}}|{{ZCS 6.0}}|{{ZCS 5.0}}|}} | |||
{{Archive}} | |||
=LDAP customization= | =LDAP customization= | ||
==Install software only== | |||
To start, we need to have the 6.0 software installed. As root, run: | |||
#Install 6.0 software only, don't upgrade yet | |||
./install.sh -s | |||
==Pre-upgrade tuning== | ==Pre-upgrade tuning== | ||
Line 7: | Line 17: | ||
When upgrading from ZCS 5.0.x to ZCS 6.0.x, the LDAP database is exported and then re-imported as the OpenLDAP and underlying database software have changed versions, requiring that this be done. It is possible to optimize this process by increasing the resources available to OpenLDAP to perform this task before starting the upgrade. The primary way of doing this is to increase the number of threads slapadd can have available to it for indexing while importing the new database. To modify the default value from 1 to the number of real cores on your server, do the following. This example assumes you have 8 real cores available (4 dual core cpus, for example): | When upgrading from ZCS 5.0.x to ZCS 6.0.x, the LDAP database is exported and then re-imported as the OpenLDAP and underlying database software have changed versions, requiring that this be done. It is possible to optimize this process by increasing the resources available to OpenLDAP to perform this task before starting the upgrade. The primary way of doing this is to increase the number of threads slapadd can have available to it for indexing while importing the new database. To modify the default value from 1 to the number of real cores on your server, do the following. This example assumes you have 8 real cores available (4 dual core cpus, for example): | ||
# When this finishes, we want to update the olcToolThreads value | # When this finishes, we want to update the olcToolThreads value | ||
cd /opt/zimbra/openldap/etc/openldap/config | cd /opt/zimbra/openldap/etc/openldap/config | ||
Line 16: | Line 24: | ||
You will also want to ensure you have a correctly customized DB_CONFIG file. It is advised to have this configured pre-upgrade. This is documented at [[Managing_Customized_BDB_configurations]] | You will also want to ensure you have a correctly customized DB_CONFIG file. It is advised to have this configured pre-upgrade. This is documented at [[Managing_Customized_BDB_configurations]] | ||
If you have a particularly large database, you will also want to pre-set the cachesize values so that when slapd starts up, it'll be able to function well. In this example, we'll update for a database with 500,000 entries. | |||
# When this finishes, we want to update the various cachesize values | |||
cd /opt/zimbra/openldap/etc/openldap/config/cn\=config | |||
# Edit olcDatabase\=\{2\}hdb.ldif | |||
olcDbCacheSize: 500000 | |||
olcDbIDLcacheSize: 500000 | |||
olcDbCacheFree: 1000 | |||
olcDbDNcacheSize: 0 | |||
We set olcDbDNcacheSize to 0 so that it will be unlimited (2.3 default behavior). It is not advised to limit the DN cachesize. | |||
==Extra schema migration== | ==Extra schema migration== | ||
If you have used additional schema outside of the schema shipped with ZCS, please see [[Installing_custom_ldap_schema_6.0]]. You will need to install these schema prior to running the upgrade. | |||
Note: the directory /opt/zimbra/data/ldap/config/cn\=config/cn\=schema does not exist at this stage, so create it (as zimbra user) and follow the above instructions. It will get populated with the core files after you run zmsetup.pl | |||
==Extra indices== | |||
If you have added additional indices to the basic slapd configuration (for example, configuring NIS or samba), you'll need to put those in place before running the upgrade as well. For example, to add the NIS indexing and samba indexing pieces, we would do this: | |||
# Add additional indices | |||
cd /opt/zimbra/openldap/etc/openldap/config/cn\=config | |||
# Edit olcDatabase\=\{2\}hdb.ldif | |||
# Find the olcDbIndex section, and then append to it. | |||
olcDbIndex: uidNumber eq | |||
olcDbIndex: gidNumber eq | |||
olcDbIndex: memberUID eq | |||
olcDbIndex: sambaSID eq | |||
olcDbIndex: sambaPrimaryGroupSID eq | |||
olcDbIndex: sambaDomainName eq | |||
==Update DB_CONFIG.custom== | |||
For 6.0.2 and later:<br> | |||
If you have created a DB_CONFIG.custom file, you will need to copy it to ''/opt/zimbra/conf/custom/ldap/DB_CONFIG''<br> | |||
If you have created a DB_CONFIG.accesslog.custom file, you will need to copy it to ''/opt/zimbra/conf/custom/ldap/DB_CONFIG.accesslog'' | |||
For 6.0.1 and prior:<br> | |||
If you have created a DB_CONFIG.custom file, you will need to copy it to ''/opt/zimbra/openldap/var/openldap-data/''<br> | |||
If you have created a DB_CONFIG.accesslog.custom file, you will need to copy it to ''/opt/zimbra/openldap/var/openldap-data/'' | |||
This is due to [http://bugzilla.zimbra.com/show_bug.cgi?id=40636 DB_CONFIG.custom not preserved across OpenLDAP upgrades] | |||
==Start the upgrade== | |||
After you are complete, as root run: | |||
/opt/zimbra/libexec/zmsetup.pl | |||
to start the upgrade. | |||
{{Article Footer|Zimbra Collaboration Suite 6.0| | {{Article Footer|Zimbra Collaboration Suite 6.0|4/14/2009}} | ||
[[Category:LDAP]] | [[Category:LDAP]] | ||
[[Category:ZCS 6.0]] | |||
[[Category:ZCS 5.0]] |
Latest revision as of 00:58, 11 July 2015
Optimizing Zimbra Collaboration 5.0 to 6.0 - LDAP upgrade
LDAP customization
Install software only
To start, we need to have the 6.0 software installed. As root, run:
#Install 6.0 software only, don't upgrade yet ./install.sh -s
Pre-upgrade tuning
When upgrading from ZCS 5.0.x to ZCS 6.0.x, the LDAP database is exported and then re-imported as the OpenLDAP and underlying database software have changed versions, requiring that this be done. It is possible to optimize this process by increasing the resources available to OpenLDAP to perform this task before starting the upgrade. The primary way of doing this is to increase the number of threads slapadd can have available to it for indexing while importing the new database. To modify the default value from 1 to the number of real cores on your server, do the following. This example assumes you have 8 real cores available (4 dual core cpus, for example):
# When this finishes, we want to update the olcToolThreads value cd /opt/zimbra/openldap/etc/openldap/config # Edit cn=config.ldif, and replace the value for olcToolThreads olcToolThreads: 8
You will also want to ensure you have a correctly customized DB_CONFIG file. It is advised to have this configured pre-upgrade. This is documented at Managing_Customized_BDB_configurations
If you have a particularly large database, you will also want to pre-set the cachesize values so that when slapd starts up, it'll be able to function well. In this example, we'll update for a database with 500,000 entries.
# When this finishes, we want to update the various cachesize values cd /opt/zimbra/openldap/etc/openldap/config/cn\=config # Edit olcDatabase\=\{2\}hdb.ldif olcDbCacheSize: 500000 olcDbIDLcacheSize: 500000 olcDbCacheFree: 1000 olcDbDNcacheSize: 0
We set olcDbDNcacheSize to 0 so that it will be unlimited (2.3 default behavior). It is not advised to limit the DN cachesize.
Extra schema migration
If you have used additional schema outside of the schema shipped with ZCS, please see Installing_custom_ldap_schema_6.0. You will need to install these schema prior to running the upgrade.
Note: the directory /opt/zimbra/data/ldap/config/cn\=config/cn\=schema does not exist at this stage, so create it (as zimbra user) and follow the above instructions. It will get populated with the core files after you run zmsetup.pl
Extra indices
If you have added additional indices to the basic slapd configuration (for example, configuring NIS or samba), you'll need to put those in place before running the upgrade as well. For example, to add the NIS indexing and samba indexing pieces, we would do this:
# Add additional indices cd /opt/zimbra/openldap/etc/openldap/config/cn\=config # Edit olcDatabase\=\{2\}hdb.ldif # Find the olcDbIndex section, and then append to it. olcDbIndex: uidNumber eq olcDbIndex: gidNumber eq olcDbIndex: memberUID eq olcDbIndex: sambaSID eq olcDbIndex: sambaPrimaryGroupSID eq olcDbIndex: sambaDomainName eq
Update DB_CONFIG.custom
For 6.0.2 and later:
If you have created a DB_CONFIG.custom file, you will need to copy it to /opt/zimbra/conf/custom/ldap/DB_CONFIG
If you have created a DB_CONFIG.accesslog.custom file, you will need to copy it to /opt/zimbra/conf/custom/ldap/DB_CONFIG.accesslog
For 6.0.1 and prior:
If you have created a DB_CONFIG.custom file, you will need to copy it to /opt/zimbra/openldap/var/openldap-data/
If you have created a DB_CONFIG.accesslog.custom file, you will need to copy it to /opt/zimbra/openldap/var/openldap-data/
This is due to DB_CONFIG.custom not preserved across OpenLDAP upgrades
Start the upgrade
After you are complete, as root run:
/opt/zimbra/libexec/zmsetup.pl
to start the upgrade.