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

Re: Removing Berkeley DB Log Files



Douglas Duckworth wrote:
Hi

I am running openldap-servers-2.4.40-16.el6.x86_64 cluster on Centos 6.9. My /var/lib/ldap directory contains many 10MB log files. /var partition rather small...

I've read they can be removed either by running "sudo db_archive -d -h /var/lib/ldap/domain" or by defining "DB_LOG_AUTOREMOVE" within the file "DB_CONFIG." That file does not presently exist whereas the db_archive command does not actually remove any of the log files.

If the db_archive command doesn't remove anything, that means it thinks all of the log files are still in active use.

Read the docs more carefully.
http://docs.oracle.com/cd/E17076_05/html/programmer_reference/transapp_logfile.html


Can I remove the old log files manually using rm?

Not if the above is true, you will corrupt the logs and the DB will fail to open on a subsequent restart.

If not should I create /var/lib/ldap/DB_CONFIG then restart slapd to make this removal automatic?

Do you have any idea why db_archive does not work or produce any helpful error to stdout?

There's no error message because there's no error, everything is working as designed.

You need to do periodic checkpoints to allow log files to be closed, and then db_archive will be able to remove some of them.

--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/