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

Re: BDB corruption on windows port of 2.2.19



Safdar Kureishy wrote:
Thanks for the information Matthew.

I had a follow-up question. I obtained a windows version of db_recover
online (since it did not come packaged with the windows OpenLDAP
installation). There is a var\openldap-data folder under OpenLDAP
under which I have these db files:

In general you cannot mix and match BDB utilities, you must use the exact same version that was used to compile OpenLDAP. If you're using a Symas CDS build then all of the proper utilities are included in the package. If you're using a package created by someone else then you should get the utility from them. (Personally, I wouldn't trust a package from someone else if they were too negligent to provide all the needed utilities in the first place.)


07/21/2005  06:50 PM            81,920 dn2id.bdb
07/21/2005  06:50 PM         1,015,808 id2entry.bdb
07/21/2005  06:50 PM        10,485,760 log.0000000001
07/21/2005  06:50 PM            32,768 objectClass.bdb
07/21/2005  06:49 PM            16,384 __db.001
07/21/2005  06:49 PM           270,336 __db.002
07/21/2005  06:49 PM            98,304 __db.003
07/21/2005  06:49 PM           376,832 __db.004
07/21/2005  06:49 PM            24,576 __db.005
               9 File(s)     12,402,688 bytes
               2 Dir(s)  24,146,268,160 bytes free]

I ran the db_recover utility as below:

C:\Program Files\OpenLDAP>db_recover -v -h var\openldap-data
db_recover: unable to join the environment
db_recover: unlink: var\openldap-data\__db.005: Permission denied
db_recover: unlink: var\openldap-data\__db.004: Permission denied
db_recover: unlink: var\openldap-data\__db.003: Permission denied
db_recover: unlink: var\openldap-data\__db.002: Permission denied
db_recover: unlink: var\openldap-data\__db.001: Permission denied
db_recover: Ignoring log file: var\openldap-data\log.0000000001:
unsupported log version 10
You are clearly using the wrong version.

The "Permission denied" errors probably indicate that you tried to run db_recover while slapd was running. You have to stop slapd and insure that no programs have any of the database files open before you can run db_recover. After you get hold of the right version of the utility and make sure that no programs are using the database these problems should go away.
db_recover: Invalid log file: log.0000000001: Invalid argument
db_recover: PANIC: Invalid argument
db_recover: PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
db_recover: fatal region error detected; run recovery
db_recover: unable to join the environment
db_recover: unlink: var\openldap-data\__db.005: Permission denied
db_recover: unlink: var\openldap-data\__db.004: Permission denied
db_recover: unlink: var\openldap-data\__db.003: Permission denied
db_recover: unlink: var\openldap-data\__db.002: Permission denied
db_recover: unlink: var\openldap-data\__db.001: Permission denied
db_recover: DB_ENV->open: DB_RUNRECOVERY: Fatal error, run database recovery

Would you know why I'm getting all these errors? Am I using the wrong
version of db_recover? Or is the home directory supposed to be
different when running db_recover under the OpenLDAP folder?
--
 -- Howard Chu
 Chief Architect, Symas Corp.  http://www.symas.com
 Director, Highland Sun        http://highlandsun.com/hyc
 OpenLDAP Core Team            http://www.openldap.org/project/