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

Re: Write changed immediately to disk



On Thursday 21 February 2008 17:20:41 ml@bortal.de wrote:
>  Hello List,
>
>  i was busy the last few days so i could not investigate in this thread.
>
>  My System:
>  - Ubuntu Dapper 6.06
>  - OpenLdap 2.2.26
>  - Database: dbd
>
>  Problem:
>  ---------
>  I need to restart slapd each time after i make a change. If i do not
> restart slapd and reset my server the changes are not beeing saved.
>
>  Example:
>  -----------
>  - Add Samba user to Database
>  - I Wait 5mins
>  - Execute "sync"
>  - reset the box
>  - The Added user disapears or is not there anymore.
>
>
>  It would be no problem is slapd or my OS need like 10 or 20 secs to write
> to disk. But after 5 mins i would expect the changed to be saved!

This can be solved with a checkpoint statement, and running 
db_checkpoint -h /path/to/database as the user that runs slapd from cron (2.3 
and onwards do checkpoints automatically according to the configuration).

However, you should also ensure that db_recover is called before slapd is 
started.

>  If i run the example with restarting slapd before the reset then my
> database looks fine!

Most likely during shutdown, slapd hasn't exited by the time the shutdown 
script kills all processes.

>  Any idea how i could fix this? Any workarounds or tips?
>  There are no OpenLdap Backports for Dapper and i really need to stay with
> Dapper.

Honestly, bite the bullet and upgrade. You're wasting your time working around 
issues that are now taken care of for you, and then you're still on a release 
not supported by the developers. 

Regards,
Buchan