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

Re: BDB corruption on every unclean shutdown



On Sun, 11 Jan 2004 17:17:23 -0800
"Howard Chu" <hyc@highlandsun.com> wrote:

> Gosh, that's funny, every time my system power cycles due to a crash
> or power loss, my filesystems get corrupted too. Luckily my system
> startup scripts run fsck to repair the damage before anything else can
> try to use the filesystems.
I wish it were that easy...

First of all, since the filesystem in question is ext3, apart from it
being journalled my box *does* run fsck when needed. The curious thing
is, whereas there was only one time when the check actually reported any
issues to correct and even them got fixed in automatic mode, while the
BDB got corrupted every time. Amazing, isn't it? One would find it not
surprising that that the heavily-used database files are the most prone
to integrity losses on abrupt shutdowns, but only if there *were*
filesystem-level integrity errors in the first place.

Second, is it normal for slapd to hang under such circumstances?
Shouldn't it give errors instead?

Third, the database in question is almost entirely read-only (with quite
a lot of caching even so to take some load off slapd), because the only
kind of modifications occuring regularly is the users changing their
passwords - and that doesn't happen so often that it should make a
serious difference. When there are writes, however, all the transactions
seem to get committed correctly; what is more, when I examine the
corrupted databases the data (or at least most of it) appears to be
there. As if it were a problem with some internal structures being
destroyed... I tried reindexing the databases, but it didn't help.

> Try reading http://www.openldap.org/faq/index.cgi?file=893
Basically, I have already read this part of the FAQ. Still, there might
be something I have missed in the documents it links to, so thanks for
reminding me.

Regards,
-- 
MS