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.
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? 2005/12/20, Howard Chu <[EMAIL PROTECTED]>: > 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. > >> > > > > But It just print > > ''' > > db_stat: Program version 4.3 doesn't match environment version > > db_stat: DB_ENV->open: DB_VERSION_MISMATCH: Database environment > > version mismatch > > ''' > > > > I have to modify the env/env_region.c, and get next output: > > ''' > > db_stat: Program version 4.3 doesn't match environment version > > db_stat: Environment version 0.0 doesn't match program version > > db_stat: DB_ENV->open: DB_VERSION_MISMATCH: Database environment > > version mismatch > > ''' > > > > refer: > > /* Make sure the region matches our build. */ > > if (renv->majver != DB_VERSION_MAJOR || > > renv->minver != DB_VERSION_MINOR) { > > __db_err(dbenv, > > "Program version %d.%d doesn't match environment version", > > DB_VERSION_MAJOR, DB_VERSION_MINOR); > > + __db_err(dbenv, > > + "Environment version %d.%d doesn't match program version", > > + renv->majver, renv->minver); > > ret = DB_VERSION_MISMATCH; > > goto err; > > } > > > > > > > > > -- > -- 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/ > >
