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

Log sequence error on db_recover



Hi,
    I am having trouble recovering the slapd database after an abrupt
system crash (system power loss). Running db_recover in catastrophic
mode results in errors of the following form although db_recover
returns 0:
db_recover: Log sequence error: page LSN 1 343516; previous LSN 1 448705


Another db_verify after this fails again. Understandably, I am able to start slapd but unable to access it. I am wondering if there is a way to recover from this scenario. Is this log file corrupted? Transcript attached. I am using Berkeley DB ver 4.1.24. On red-hat

My guess is that when system crashed, slapd had these log files open
and hence they got corrupted (there was no ldap activity at the point
of crash). I notice the above errors in log.0000000001. I believe
since this is not the last log, it is not accessed by slapd, and
therefore it should not get corrupted on a power fail. Does slapd (or
db_verify) modify the log files if they have already been checkpointed
and synced with the database?
db_archive also returns this above log file, so I think that this file
should not get corrupted.

Thanks for any help
manoj

[openldap-data]# ls
__db.001 __db.003 __db.005 id2entry.bdb log.0000000002 log.0000000004
__db.002 __db.004 dn2id.bdb log.0000000001 log.0000000003 objectClass.bdb
[root@se-1-100-60-2 openldap-data]# db_verify -o dn2id.bdb
db_verify: Page 9: incorrect prev_pgno 0 found in leaf chain (should be 2)
db_verify: Page 9: incorrect next_pgno 0 found in leaf chain (should be 17)
db_verify: Page 17: incorrect prev_pgno 0 found in leaf chain (should be 9)
db_verify: Page 17: incorrect next_pgno 0 found in leaf chain (should be 14)
db_verify: Page 14: incorrect prev_pgno 0 found in leaf chain (should be 17)
db_verify: Page 14: incorrect next_pgno 0 found in leaf chain (should be 3)
db_verify: Page 3: incorrect prev_pgno 0 found in leaf chain (should be 14)
db_verify: Page 3: incorrect next_pgno 0 found in leaf chain (should be 15)
db_verify: Page 15: incorrect prev_pgno 0 found in leaf chain (should be 3)
db_verify: Page 15: incorrect next_pgno 0 found in leaf chain (should be 6)
db_verify: Page 6: incorrect prev_pgno 0 found in leaf chain (should be 15)
db_verify: DB->verify: dn2id.bdb: DB_VERIFY_BAD: Database verification failed
[openldap-data]# rm __db.00*
[openldap-data]# rm *bdb
[openldap-data]# ls
log.0000000001 log.0000000002 log.0000000003 log.0000000004
[openldap-data]# db_recover -c -v
db_recover: Finding last valid log LSN: file: 4 offset 159499
db_recover: Recovery starting from [1][28]
db_recover: Log sequence error: page LSN 1 343516; previous LSN 1 448705
db_recover: Log sequence error: page LSN 1 430687; previous LSN 1 448850
db_recover: Log sequence error: page LSN 1 448058; previous LSN 1 449692
db_recover: Log sequence error: page LSN 1 343516; previous LSN 1 448782
db_recover: Log sequence error: page LSN 1 343516; previous LSN 1 450048
db_recover: Log sequence error: page LSN 1 343516; previous LSN 1 450138
db_recover: Log sequence error: page LSN 1 343516; previous LSN 1 450206
db_recover: Log sequence error: page LSN 1 343516; previous LSN 1 450296
db_recover: Log sequence error: page LSN 1 343516; previous LSN 1 450364
db_recover: Log sequence error: page LSN 1 430687; previous LSN 1 448918
db_recover: Log sequence error: page LSN 1 430687; previous LSN 1 450509
db_recover: Log sequence error: page LSN 1 448058; previous LSN 1 449760
db_recover: Log sequence error: page LSN 1 448058; previous LSN 1 451146
db_recover: Log sequence error: page LSN 1 343516; previous LSN 1 450441
...
[openldap-data]# db_archive
log.0000000001
log.0000000002
log.0000000003
[openldap-data]#


_________________________________________________________________
Let the advanced features & services of MSN Internet Software maximize your online time. http://click.atdmt.com/AVE/go/onm00200363ave/direct/01/