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

Re: Corrupted database



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hardi Gunawan wrote:
> Hi,
> 
> It seems that my LDAP database is corrupted.  I'm able
> to do a search of (objectclass=*), but not
> (objectclass=posixaccount), even though I'm sure that
> it works previously.
> 
> Looking at the bdb files, it seems that a db_verify of
> objectclass.bdb gives these errors:
> 
> slapd_db_verify objectClass.bdb
> db_verify: Page 1: item 43 of unrecognizable type
> db_verify: Page 1: item 47 of unrecognizable type
> .
> .
> .
> db_verify: Page 1: item 421 of unrecognizable type
> db_verify: Page 1: gap between items at offset 2232
> db_verify: Page 1: item order check unsafe: skipping
> db_verify: DB->verify: objectClass.bdb: DB_VERIFY_BAD:
> Database verification failed
> 
> I've tried to do a db_recover -v and it does not give
> me any error message that the recover is not
> successful.
> 
> What should I do to make the objectclass.bdb works?  I
> guess I can just do a full search (objectclass=*) and
> dump out all the stuff and create a new database.  But
> is there any other way to recover?

Well, since objectclass.bdb doesn't contain any information (only
indexes of the objectclass attribtute) not available in the other
database files, I would try:

1)stopping slapd
2)moving the objectclass.bdb file (in case you want it back later for
some reason)
3)run 'slapindex'
4)check permissions on the database files, to ensure the user slapd runs
as has write access to them
5)start slapd

Regards,
Buchan

- --
Buchan Milne                              Systems Architect
Obsidian Systems                  http://www.obsidian.co.za
B.Eng          RHCE (803004789010797),LPIC-1 (LPI000074592)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDCcEQrJK6UGDSBKcRAuYCAKDFpYTeqwZ4uciUhiboDXDGHehluQCfZrkm
+aYo4ySkF5QR2ZdV41s/6dk=
=2byk
-----END PGP SIGNATURE-----