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

RE: BDB recovery after power outage



On Mon, 21 Apr 2003, Quanah Gibson-Mount wrote:

>
>
> --On Monday, April 21, 2003 3:21 PM -0400 Frank Swasey
> <Frank.Swasey@uvm.edu> wrote:
>
> >
> > 1) What is required to set up the BDB Environment optimally for OpenLDAP
> > usage?
>
> This differs for every setup.  What is best for our DB may not be best
> for yours. You need to look at the amount of RAM you have available for
> the application, the size of the DB, etc. I've posted Stanford's BDB
> DB_CONFIG file to this list several times, with an explanation of the
> parameters as well.

You haven't really answered his question here; there are definitely _some_
settings that can be started with as a default.  In fact, if I use LDBM
with OpenLDAP, I get a bunch of reasonable defaults for free, and then, in
the online documentation for slapd.conf, those defaults are listed.

As my previous email mentioned, failure to mention a reasonable default
for the 'checkpoint' setting will almost invariable result in data
corruption, won't it?  What possible reason can you have for not a)
documenting a reasonable default in a very easy to find place, and b)
coding some kind of default into OpenLDAP?

> > 2) What is the daily process(es) that should be done to maintain the
> > health of a BDB?
>
> Ours maintains its health with no intervention from us.

So by extension, in general BDB should maintain itself?  I think this is a
valid question; the slapd-bdb man page states that BDB is the recommended
back end for slapd, but doesn't mention that most people who ignore their
log files get full filesystems, or even point to any "hey, you're going to
have to look at this" settings, like checkpoint.  I think that's a
shortcoming, and a missed opportunity to point to salient points of
research.

> > 3) OMG the power went out!  To recover the BDB, I do?
>
> I'd hope you made backups, either with BDB's tools to do so, or by
> exporting your DB to LDIF... same as with any application's data.

Not that I expect the openldap docs to convince me to make backups, but it
wouldn't hurt if the section discussing use of a given backend mentioned a
generally valid backup scheme.  E.g.: "If you use BDB, an acceptable
backup scheme is to stop the slapd server, run slapcat to make a copy of
the LDIF data, and then start the slapd server."  Or "The slapd server
must be stopped during usage of any BDB db_* tools."  These are not
necessarily obvious, and don't take much time to document.

I don't trust my experience, but I'm fully willing to patch both the
slapd-bdb man page and the slapd.conf doc in the Admin guide and put these
snippets in there.  I think they're really important, and they answer
little questions I've had the entire time I've been using BDB with
OpenLDAP.

Luke

-- 
The death rate on Earth is: .... (computing) .... One per person.