Red Hat Bugzilla – Bug 21091
openldap changes db format between 6.2 and 7.0
Last modified: 2007-04-18 12:29:55 EDT
I just upgraded my server from RH6.2 to RH7. Everything worked great
except that the ldap server stopped working. After a bunch of checking I
figured out that slapd for RH6.2 reads/writes the directory databases in
"db2" format while RH7 reads/writes them in "gdbm" format. This may be due
to the makefile being configured with different "--with-ldmb-api=" options
but I didn't check that.
- I ended up uninstalling ldap, reinstalling the binary from 6.2, dumping
the database in ldif (text) form with ldbmcat, reinstalling the binaries
from 7.0, and importing the directory data with ldapadd.
- An easier fix (once you know what the problem is) is probably to just
recompile the new openldap rpm with the "--with-ldbm-api=db2"
- At a minimum you need to add the file /etc/openldap/README.rpm that
describes what is going on.
- Better would be to discuss the issue in the ldap chapter that is included
with the RH docs.
- Best is to convert the database from db2 to gdbm (with backups) during
the rpm upgrade.
Converting during an upgrade is out of the question due to uncertainties about
the amount of available disk space. The on-disk format was changed to gdbm to
insulate the package from incompatible formats being used by multiple versions
This isn't going to get any better because the format for the data stored by
OpenLDAP will change between 1.2 and 2.0, though the openldap12 compatibility
package will include the ldbmcat utility from 1.2 to ease the transition, and a
note will be added to the release notes for the next release about this. I will
add a note to the package just in case it doesn't get added elsewhere and close
this bug when I do it.
Documentation on the upgrade procedures has been added to openldap-2.0.7-2,
which will land in Raw Hide when it is next updated.