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

RE: BDB recovery after power outage



On Mon, 21 Apr 2003, Frank Swasey wrote:

> My real concern here is that I see the BDB backend as being pushed but
> there seems to be a refusal to even deal with the issue of putting
> together a quick start document about what the beginning BDB backend DBA
> needs to know.  Yes, I do feel that is something that needs to come out
> of the OpenLDAP documentation because it is OpenLDAP that is using BDB.
> Would it be nice if Sleepycat provided that documentation -- hell yes.
> Are they going to?  I'm not going to hold my breath.

I would just like to make one point on this topic:  As far as I
understand, if you don't set the 'checkpoint' variable in the slapd.conf,
then if your slapd ever dies in a bad way, you are essentially guaranteed
data corruption.  In other words, if you recommend BDB but don't mention
this setting _in_the_same_place_you_recommend_BDB_, then you are
recommending that people who use OpenLDAP lose data and time.

If there were documentation added on this one piece, it would go a helluva
long way towards helping.  To get started, I'll include the snippet I
think should be added to the doc page for slapd.conf on openldap.org:

(Taken directly from the slapd-bdb page, then with an addendum)

checkpoint <kbyte> <min>
              Specify the frequency for checkpointing the database
transaction log.  A checkpoint operation flushes the database buffers to
disk and writes a checkpoint record in the log.  The checkpoint will occur
if either <kbyte> data has been written or <min> minutes have passed since
the last checkpoint.  Both arguments default to zero, in which case they
are ignored <change>and your data is never flushed to disk.  A reasonable
default is 250kb and 15 minutes.  If you do not set this in your
slapd.conf file, you will have likely have to use db_recover after every
reboot</change>.  See the Berkeley DB reference guide for more details.

There, can someone add that to documentation for slapd.conf on the
openldap site?  Change the numbers to reasonable ones, I just made those
up.

Very simple, but would have saved me hours if that were mentioned on the
main slapd page.

Luke

-- 
A child can go only so far in life without potty training.  It is not
mere coincidence that six of the last seven presidents were potty
trained, not to mention nearly half of the nation's state legislators.
                -- Dave Barry