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

Re: BDB recovery after power outage





--On Sunday, April 20, 2003 6:27 PM -0500 "Luke A. Kanies" <luke@madstop.com> wrote:

I'm currently running openldap-2.1.12 with BDB-4.1 as a backend.  I've
unfortunately now had two forced restarts of my server in the last month
(unrelated to OpenLDAP, of course) and both of them have resulted in data
loss in my OpenLDAP database.

Actually, the first one resulted first in a significant outage, since the
database apparently wasn't clean or something (no, I'm not that familiar
with BDB), which caused slapd to conveniently just sit there unable to
open the database and taking 100% of my CPU; it also wouldn't respond to
signals or give any feedback.  I finally figured out that the database had
to be recovered, but said recovery resulted in data loss (and not data
that was incredibly recent, either).

I just had another forced outage today, and that outage resulted in what
might amount to a catastrophic amount of data loss.  No, I don't have
backups yet, so sue me.

My question is, am I doing something completely retarded here, or does
OpenLDAP normally get data loss when a machine is forcibly restarted?
I've been using iPlanet's directory server for years and have neither had
this problem nor had to do anything special to prevent it, and I'm
wondering if OpenLDAP is different in this respect.

Or is the problem within BDB?  Should I be using ldbm instead (which
OpenLDAP does not, apparently, recommend), or some other database?

Any help would be greatly appreciated.

Luke,

First, I would suggest running something more recent than 2.1.12... That release is full of bugs, and is why 2.1.17 is marked the most stable (although if you have more than 50 or so indexes, you'll want to get 2.1.18 as soon as it is out).

On the backups issue, have you thought of doing a nightly slapcat? That is what we do... The BDB size of our DB is 1.9GB, the slapcat created LDIF file, when compressed with gzip, is 50MB. Quite the savings, and it gives us a restore point.

--Quanah


-- Quanah Gibson-Mount Senior Systems Administrator ITSS/TSS/Computing Systems Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html