Chapter 8. Monitoring the local disk to shut down Directory Server on low disk space 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 losing data. To prevent this problem, you can configure Directory Server to monitor the free disk space on the file systems that contain the configuration, transaction log, and database directories. If the free space reaches the configured threshold, Directory Server shuts down the instance. 8.1. Behavior of Directory Server depending on the amount of free disk space How Directory Server behaves when when you configure monitoring depends on the amount of remaining free space: 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. 8.2. Configuring local disk monitoring using the command line Directory Server can monitor the free disk space on the file systems that contain the configuration, transaction log, and database directories. Depending on the remaining free space, Directory Server disables certain logging features or shuts down. Procedure 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= 3221225472 nsslapd-disk-monitoring-grace-period= 60 This command sets the threshold of free disk space to 3 GB (3,221,225,472 bytes) and the grace period to 60 seconds. Optional: Configure Directory Server not to disable access logging or delete archived logs: # dsconf -D " cn=Directory Manager " ldap://server.example.com config replace nsslapd-disk-monitoring-logging-critical= on Restart the instance: # dsctl instance_name restart 8.3. Configuring local disk monitoring using the web console Directory Server can monitor the free disk space on the file systems that contain the configuration, transaction log, and database directories. Depending on the remaining free space, Directory Server disables certain logging features or shuts down. Prerequisites You are logged in to the instance in the web console. Procedure Navigate to Server Server Settings Disk Monitoring . Select Enable Disk Space Monitoring . 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. Optional: Select Preserve Logs Even If Disk Space Gets Low Click Save Settings . Click Actions in the top right corner, and select Restart Instance .

Commands:
dsconf -D " cn=Directory Manager " ldap://server.example.com config replace nsslapd-disk-monitoring= on nsslapd-disk-monitoring-threshold= 3221225472 nsslapd-disk-monitoring-grace-period= 60
dsconf -D " cn=Directory Manager " ldap://server.example.com config replace nsslapd-disk-monitoring-logging-critical= on
dsctl instance_name restart