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

Re: Openldap 2.3.11 cannot autorecover from abnormal shutdown.



Yingbo Qiu wrote:
Thanks for your explaining.

We are a software vendor providing web-mail system solution and
OpenLDAP is a part of the solution. We must be sure that customer's
machine could successful startup(incluing openldap) after a power
failure. Because the OpenLDAP 2.0.27 with back-gdbm have no problem
under this environment, we must keep the newer version's stability.

You are quite mistaken. OpenLDAP 2.0.27 is highly unstable, even moreso with gdbm. You just don't see it because there is no error detection in that code. The fact that it is willing to startup when the database is in a corrupted state is not doing anyone any favors.


I just want to decide add a 'db_recover' in the init script. Now I
have another question: when will slapd write the environment headers?
Farther, can you sure slapd should autorecover correctly after writing
environment?

As the BerkeleyDB documentation clearly states, there are no guarantees when the hardware fails.
2005/12/20, Howard Chu <hyc@symas.com>:
Sounds like you lost power before the disk drive actually wrote the
environment pages to disk.
Again, read the BerkeleyDB documentation.
http://www.sleepycat.com/docs/ref/program/cache.html

There's no magic - if your system loses power before the disks finish
writing the data, the data is lost. If the power fails before the
environment headers are written, then the environment is useless, and
there is nothing to recover.

I believe this email thread has gone as far as it can. Don't be stupid:
no amount of software can correct for catastrophic hardware failures -
invest in an uninterruptible power supply.

Yingbo Qiu wrote:
Read the BerkeleyDB documentation. "db_stat -e" will print the
environment version along with other information.


--
 -- 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/