2.4. Monitoring the Local Disk for Graceful Shutdown

When the disk space available on a system becomes too small, the Directory Server process terminates. As a consequence, there is a risk of corrupting the database or loosing data.
To prevent this problem, you can configure Directory Server to monitor the free disk space. The monitoring thread checks the free space on the file systems that contain the configuration, transaction log, and database directories.
Depending on the remaining free disk space, Directory Server behaves different:
  • If the free disk space reaches the defined threshold, Directory Server:
    • Disables verbose logging
    • Disables access access logging
    • Deletes archived log files

    Note

    Directory Server always continues writing error logs, even if the threshold is reached.
  • If the free disk space is lower than the half of the configured threshold, Directory Server shuts down within a defined grace period.
  • If the available disk space is ever lower than 4 KB, Directory Server shuts down immediately.
If disk space is freed up, then Directory Server aborts the shutdown process and re-enables all of the previously disabled log settings.

2.4.1. Configuring Local Disk Monitoring Using the Command Line

To configure local disk monitoring using the command line:
  1. Enable the disk monitoring feature, set a threshold value, and a grace period:
    # dsconf -D "cn=Directory Manager" ldap://server.example.com config replace nsslapd-disk-monitoring=on nsslapd-disk-monitoring-threshold=3000000000 nsslapd-disk-monitoring-grace-period=60
    This command sets the threshold of free disk space to 3 GB and the grace period to 60 seconds.
  2. Optionally, configure that Directory Server neither disables access logging nor deletes archived logs, by enabling the nsslapd-disk-monitoring-logging-critical parameter:
    # dsconf -D "cn=Directory Manager" ldap://server.example.com config replace nsslapd-disk-monitoring-logging-critical=on
  3. Restart the Directory Server instance:
    # dsctl instance_name restart

2.4.2. Configuring Local Disk Monitoring Using the Web Console

To configure local disk monitoring using the Web Console:
  1. Open the Directory Server user interface in the web console. For details, see Logging Into Directory Server Using the Web Console section in the Red Hat Directory Server Administration Guide.
  2. Select the instance.
  3. Open the Server Settings menu, and select Server Configuration.
  4. Enable Enable Disk Space Monitoring, and set the threshold in bytes and the grace period in minutes.
    This example sets the monitoring threshold to 3 GB (3,221,225,472 bytes) and the time before Directory Server shuts down the instance after reaching the threshold to 60 minutes.
  5. Optionally, configure that Directory Server neither disables access logging nor deletes archived logs by selecting Preserve Logs.
  6. Click Save Configuration.
  7. Click the Actions button, and select Restart Instance.