[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: bdb backend - reliable or not?

--On Thursday, July 20, 2006 10:23 AM +0200 Tomasz Chmielewski <mangoo@wpkg.org> wrote:

Previously I was using OpenLDAP 2.1.x and 2.2.x with ldbm backend.

I never had problems with it.

As I've read on the list that ldbm support will be dropped in the next
major version of OpenLDAP, and bdb is the recommended backend, I decided
to deploy a couple of new OpenLDAP servers with bdb backend.

Unfortunately, the choice was a disaster - a couple of tests showed that after powering off the server, OpenLDAP is not able to start anymore - all I see in logs is a single message (loglevel 256):

bdb_db_open: unclean shutdown detected; attempting recovery.

And that's it, it never recovers.

I'm using a pretty old OpenLDAP version, 2.3.6, so my first guess is that the problems are because of it, and I'm on my way to upgrade.

On the other hand, I didn't have problems with ldbm on 2.3.6, or on any
older OpenLDAP version, so can one conclude that ldbm is more reliable
and crash-resistant?

Will an upgrade to 2.3.24 solve my problems with bdb, or shall I revert
back to ldbm?

Performance is not an issue here, databases are relatively small.
What is important is the ability to survive unexpected system

I suggest you read the FAQ entry about the differences between the backends. I also suggest you use a current version of OpenLDAP for doing your testing. The OpenLDAP 2.3 branch added a function that will automatically recover bdb/hdb databases after an unclean shutdown, but there were some bugs in that in the earlier 2.3 release branch.

As for ldbm and unclean shutdowns, just because slapd starts with it, by no means does that indicate that your database is healthy and happy. A major difference between bdb/hdb and ldbm is that bdb/hdb actually detect issues with the database, whereas ldbm is quite happy to run with an extremely corrupted database.


-- Quanah Gibson-Mount Principal Software Developer ITS/Shared Application Services Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html