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

Re: Log sequence error on db_recover



Hi Tonni,
Yes the __db* files are intact after the reboot, but the log files and the bdb files are corrupted. I guess I will have to ensure existence of an ldif to fall back on in case of failure.



thanks manoj


From: Tony Earnshaw <tonye@billy.demon.nl>
To: openldap-software@OpenLDAP.org
Subject: Re: Log sequence error on db_recover
Date: Sat, 07 Feb 2004 10:46:47 +0100

fre, 06.02.2004 kl. 23.44 skrev Manoj Lal:

> >Try mv'ing the log to an invalid name and running 'db_recover -c' again.
>
> db_recover runs without errors. But bdb files don't get generated.
>
> [openldap-data]# db_recover -c -v
> db_recover: Finding last valid log LSN: file: 4 offset 159583
> db_recover: Recovery starting from [2][28]
> db_recover: Recovery complete at Sat Jan 24 07:55:07 2004
> db_recover: Maximum transaction ID 8000016e Recovery checkpoint [4][159583]
> db_recover: Recovery complete at Sat Jan 24 07:55:07 2004
> db_recover: Maximum transaction id 80000000 Recovery checkpoint [4][159583]
> [openldap-data]# echo $?
> 0
> [openldap-data]# ls
> log.0000000002 log.0000000003 log.0000000004


There would appear to be some clash between what you are experiencing
and my understanding of that.

My understanding was, that the __db* and index files are intact after a
system reboot, but that the log file is corrupt. I just tried the
following in sequence for you. I can't show cut'n paste.

This is RH RHEL3, BDB 4.2.52+2 patches, Openldap 2.2.5 - but I've done
it on BDB 4.1.25 and Openldap 2.1.25 and earlier versions of both - with
the same result.

In the database directory:

... belt and braces ;)

'slapcat -l ldif'
'slapcat -l ../ldif'

'db_archive -l'

returns:

log.0000000001
log.0000000002

'service ldap stop'

'mv log.0000000001 old.log.0000000001'
'mv log.0000000001 old.log.0000000001'

'db_recover -c'

results in a new log.0000000001 being generated. At first this is
minimal length (28 bytes), though the first db_checkpoint will generate
a useful logfile.

'service ldap start'

results in normal Openldap functions, though I've now sacrificed my old
logs.

> What seems to be the problem?

I think there is a misunderstanding of what you're experiencing, since
I've had to run db_recover many times in runlevel 1 mode, when root
can't log in any more on this RHEL 3 *notebook* (and previous 7.2) after
an unwarranted shutdown.

'db_recover -c' has never once let me down, with any BDB version. If it
should, I've ensured that I always have a recent ldif to fall back on.

>  Are there any fixes in 4.1.25 towards the
> problem that I see?

No, the fixes are to the actual database libraries:

http://www.sleepycat.com/update/index.html

--Tonni


--

mail: billy - at - billy.demon.nl
http://www.billy.demon.nl


_________________________________________________________________
Get some great ideas here for your sweetheart on Valentine's Day - and beyond. http://special.msn.com/network/celebrateromance.armx