I inherited an OpenLDAP server that is in production use and it suffers from a lack of knowledge and I am slowly trying to remedy that.
One of the things I noticed was that it complained at startup about the lack of a DB_Config and a caution about it being slow - which it definitely seems to be.
As this server is in production use, I am not allowed to do anything to impact it without thorough testing - which I think I have done.
Does anyone see any problems if I just drop the following DB_Config file in a data directory so the next time the server is restarted, it takes effect? (Yes, it's a DBD configuration)
# cat DB_CONFIG set_cachesize 0 10485760 1 set_lg_regionmax 1048576 set_lg_max 10485760 set_lg_bsize 2097152 set_lg_dir /var/tmp/bdb-log set_flags DB_LOG_AUTOREMOVE
Seems safe and I do back it up regularly but if I drop the file in the data directory, I may not be watching when the server is patched/restarted.
Comments?
Thanks Craig
--On Monday, December 22, 2014 7:03 PM +0000 Craig White CWhite@skytouchtechnology.com wrote:
Does anyone see any problems if I just drop the following DB_Config file in a data directory so the next time the server is restarted, it takes effect? (Yes, it's a DBD configuration)
The DB_CONFIG file directives sometimes change names across BDB release. Without knowing what BDB release your OpenLDAP is linked to, no one can be certain your DB_CONFIG file is valid.
My personal suggestion would be to slapcat your server, and then import that DB into a testing server, and validate your changes before deploying them on production.
You may also want to read over my old notes for BDB at:
I would note that the MDB backend is recommended for modern OpenLDAP deployments.
--Quanah
--
Quanah Gibson-Mount Platform Architect Zimbra, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration
Craig White wrote:
I inherited an OpenLDAP server that is in production use and it suffers from a lack of knowledge and I am slowly trying to remedy that.
One of the things I noticed was that it complained at startup about the lack of a DB_Config and a caution about it being slow which it definitely seems to be.
As this server is in production use, I am not allowed to do anything to impact it without thorough testing which I think I have done.
Does anyone see any problems if I just drop the following DB_Config file in a data directory so the next time the server is restarted, it takes effect? (Yes, its a DBD configuration)
# cat DB_CONFIG
set_cachesize 0 10485760 1
set_lg_regionmax 1048576
set_lg_max 10485760
set_lg_bsize 2097152
set_lg_dir /var/tmp/bdb-log
You cannot change the log directory of an already existing DB installation, unless you also move all of the logfiles to the new location before starting up.
set_flags DB_LOG_AUTOREMOVE
Seems safe and I do back it up regularly but if I drop the file in the data directory, I may not be watching when the server is patched/restarted.
If you simply drop this in and restart the server, it will die on startup due to the logdir change.
Comments?
In 2.4 you can use the dbconfig directive in slapd.conf to keep all of the BDB directives in one place. That simplifies things a bit, particularly if you're in the habit of rm'ing the entire data directory to start over, you don't lose your BDB tunings.
Meanwhile, BDB is deprecated. You should migrate to LMDB at your earliest opportunity. The BDB-based code will still be present, but disabled by default in 2.5, and will be deleted in OpenLDAP 2.6.
Thanks Craig
openldap-technical@openldap.org