Posts: 8

Topic: How to change Openldap database directory

We are using iRedMail 0.6.0 with Openldap backend and iRedAdmin 1.2.0. As a part of disaster recovery strategy, we want to change the openldap database location.

1) We want to change the daabase directory of Openldap from /var/lib/ldap to /var/vmail/ldap. Could someone please let me know the settings I need to make to achieve this?

2) I tried to creae /var/lib/ldap as a linked folder (actual database located under /var/vmail/ldap). Permissions to the files and folders under this were set exactly the same. when I start ldap service, i get the following error: backend_startup_one: bi_db_open failed! (-1)slap_startup failed (test would succeed using the -u switch) [FAILED]stale lock files may be present in /var/lib/ldap/dbname [WARNING]If I remove the linked folder and copy the contents to /var/lib/ldap, everything works perfectly fine. Is linked folder not going to work for ldap? or am I missing something here? (Please note that the folder /var/vmail folder is a separate LUN in the SAN).

I would like to achieve any one of the scinario mentioned above. I tried to get some help from Openldap forum and tech support, but did not get any reply back. Any help on this would be highly appreciated.

Re: How to change Openldap database directory

Increased the logging as you sugested, but it did not log anything in openldap.log file. Tried to set the logging level and 128 and -1 as well, still nothing logged in the log file.Also there is no .lock file under ldap or database directory. There was a file by name "alock". Tried to remove this file, but did not make any difference.If I remove the database from ldap folder, service starts fine.