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

Re: reset BDB environement



Fortin, John {PBG} wrote:

For DB_LOG_AUTOREMOVE to work, you must be checkpointing the database,
either with db_checkpoint running in oneshot mode, as a daemin process or by
setting up checkpointing in you slapd.conf file.  Once you are
checkpointing, bdb will autoremove the log files.

--John

John Fortin
PBG Middleware and Web Services
(914) 767-7844



It still doesn't remove  log files :-(

[root@babylone /var/lib/ldap/int]
$ /usr/sbin/slapd_db_checkpoint -1
$ /etc/init.d/ldap stop
Arrêt de slapd : [ OK ]
[root@babylone /var/lib/ldap/int]
$ /etc/init.d/ldap start
Démarrage de slapd : [ OK ]
[root@babylone /var/lib/ldap/int]
$ ls log.* | wc -l
461
I've even run db_recover to be sure that BDB env is reset .
by the way, that production server where I test is running openldap 2.1.30-1 which uses libslapd_db-4.2.so, perhaps that feature was not available for these releases ?
can I start db_checkpoint -1 while slapd is running ?




-----Original Message-----
From: owner-openldap-software@OpenLDAP.org [mailto:owner-openldap-software@OpenLDAP.org] On Behalf Of jehan.procaccia
Sent: Monday, December 06, 2004 10:25 AM
To: luca.scamoni@sys-net.it
Cc: openldap-software@OpenLDAP.org
Subject: Re: reset BDB environement



Luca Scamoni wrote:



I would:
- modify the DB_CONFIG;
- stop slapd;
- run db_recover;
- run db_archive and remove unused transaction logs;
- start slapd;

maybe db_archive is not needed, but just to be sure...

Oh, this is just of my mind, never tested





OK thanks, but apparently I need to run db_archive, which doesn't prove me the interest of using

DB_LOG_AUTOREMOVE :-(


$ grep DB_LOG_AUTOREMOVE DB_CONFIG
set_flags DB_LOG_AUTOREMOVE
[root@babylone /var/lib/ldap/int]
$ ls -al __d*
-rw-r----- 1 ldap ldap 16384 sep 21 18:29 __db.001
-rw-r----- 1 ldap ldap 10248192 sep 21 18:29 __db.002
-rw-r----- 1 ldap ldap 270336 sep 21 18:29 __db.003
-rw-r----- 1 ldap ldap 450560 sep 21 18:29 __db.004
-rw-r----- 1 ldap ldap 16384 sep 21 18:29 __db.005
[root@babylone /var/lib/ldap/int]
$ /etc/init.d/ldap stop
Arrêt de slapd : [ OK ]
[root@babylone /var/lib/ldap/int]
$ /usr/sbin/slapd_db_recover -e -v
db_recover: Finding last valid log LSN: file: 461 offset 6894802
db_recover: Recovery starting from [461][6894661]
db_recover: Recovery complete at Mon Dec 6 16:02:56 2004
db_recover: Maximum transaction ID 8003e04b Recovery checkpoint [461][6894802]
[root@babylone /var/lib/ldap/int]
$ ls -al __db*
-rw-r----- 1 root root 16384 déc 6 16:02 __db.001
-rw-r----- 1 root root 10248192 déc 6 16:02 __db.002
-rw-r----- 1 root root 270336 déc 6 16:02 __db.003
-rw-r----- 1 root root 450560 déc 6 16:02 __db.004
-rw-r----- 1 root root 16384 déc 6 16:02 __db.005
[root@babylone /var/lib/ldap/int]
$ chown ldap:ldap *
$ ls log.* | wc -l
461
[root@babylone /var/lib/ldap/int]
$ /etc/init.d/ldap start
Démarrage de slapd : [ OK ]
[root@babylone /var/lib/ldap/int]
$ ls log.* | wc -l
461


logs still here :-(

If I run db_archive, logs will be removed, but can I check that DB_LOG_AUTOREMOVE does work !.

Thanks.



jehan.procaccia disse:




Hello,

I want to remove bdb log files. Scripts using db_archive can do that,
but I recently discovered on this list the set_flags


DB_LOG_AUTOREMOVE


to place in DB_CONFIG, this solution seems cleaner to me !.
However, how can I tell my slapd to reread DB_CONFIG and


hence take into


account that new setting. I heard again from this list that

__db* files


contains the BDB environement, should I just start and stop slapd or
should I remove __db* file or something else ?
Is there a way to "see" what is the current BDB evironement


setting ?


Thanks.