[K12OSN] Recovery of ldap db failed

James P. Kinney III jkinney at localnetsolutions.com
Thu Aug 31 14:09:41 UTC 2006


On Thu, 2006-08-31 at 08:29 -0500, Paul Lemke wrote:
> By taking the "autostart" out, what do you mean? Turn off the start at boot
> up? I can't do that... I have services that depend on the LDAP Service to be
> up and running during boot up. 

The service that depend on ldap will have to be launched after the ldap
is up by the same script that launches ldap. The command "chkconfig ldap
off" will stop the system from autostarting ldap during the boot
sequence. Then you can write the launch script that can handle the
correct sequencing.
> 
> > A cron job to run every 2 minutes to "sync"
> > the disks will help with boot-up by flushing disk writes often. Turn off
> > the cron once the power issue is resolved.
> 
> What do you mean by flushing the disk writes often? 

Linux (and all *NIX systems) will not write data to the hard drives
until absolutely the last second. It's a performance boost by keeping
disk writes cached in RAM in case they get written again. Once the write
_does_ ocur, the file(s) is(are) marked as closed and if a sudden power
loss occurs, those files will be intact. Files that are not closed will
need to be checked for consistency and can cause system hangs during
boot up.
> 
> > Since ldap is a 99.9% read database, the startup may be hanging only
> > because of a found PID file. You can add a rm to the start up that finds
> > the stale PID file and deletes it.
> 
> This is a good idea. I'll go ahead and write that in. 
> 
> Any other thoughts? 
> Paul 
> 
> -----Original Message-----
> From: k12osn-bounces at redhat.com [mailto:k12osn-bounces at redhat.com] On Behalf
> Of James P. Kinney III
> Sent: Wednesday, August 30, 2006 7:05 PM
> To: Support list for open source software in schools.
> Subject: Re: [K12OSN] Recovery of ldap db failed
> 
> On Wed, 2006-08-30 at 17:28 -0500, Paul Lemke wrote:
> > So our school server is on a flaky UPS/power outlet or something like that
> > (we are fixing this...) so it's rebooting every couple of days by itself.
> > But the weird thing is when the server reboots itself back up and the LDAP
> > service tries to start... this shows up:
> > 
> > bdb_db_open: unclean shutdown detected; attempting recovery.
> > bdb_db_open: Recovery skipped in read-only mode. Run manual recovery if
> > errors
> > are encountered.
> > 
> > And then the server hangs and wont boot any farther. So basically the
> server
> > is stuck until I go into single user mode and do a:
> > "service ldap start", it then recovers itself and the ldap service is fine
> > then. 
> > 
> > Is there a way I can make the database recovery actually work at the boot
> up
> > sequence? Any help is appreciated! (especially before school starts next
> > week...) 
> 
> Take the autostart out! Then hack a shell script that runs from rc.local
> that starts the ldap service. Be sure to add explicit paths to the parts
> as it may hang otherwise. A cron job to run every 2 minutes to "sync"
> the disks will help with boot-up by flushing disk writes often. Turn off
> the cron once the power issue is resolved.
> 
> Since ldap is a 99.9% read database, the startup may be hanging only
> because of a found PID file. You can add a rm to the start up that finds
> the stale PID file and deletes it.
> > 
> > Thanks!!!
> > Paul 
> > 
> > _______________________________________________
> > K12OSN mailing list
> > K12OSN at redhat.com
> > https://www.redhat.com/mailman/listinfo/k12osn
> > For more info see <http://www.k12os.org>
-- 
James P. Kinney III          \Changing the mobile computing world/
CEO & Director of Engineering \          one Linux user         /
Local Net Solutions,LLC        \           at a time.          /
770-493-8244                    \.___________________________./
http://www.localnetsolutions.com

GPG ID: 829C6CA7 James P. Kinney III (M.S. Physics)
<jkinney at localnetsolutions.com>
Fingerprint = 3C9E 6366 54FC A3FE BA4D 0659 6190 ADC3 829C 6CA7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/k12osn/attachments/20060831/12025424/attachment.sig>


More information about the K12OSN mailing list