Disk Space Management
Running out of disk space can have a severe impact on the Uyuni database and file structure which, in some cases, is not recoverable.
Uyuni monitors some directories for free disk space.
You can modify which directories are monitored, and the warnings that are created.
All settings are configured in the /etc/rhn/rhn.conf
configuration file.
When the available space in one of the monitored directories falls below a warning threshold, a message is sent to the configured email address and a notification is shown at the top of the sign-in page.
1. Monitored Directories
By default, Uyuni monitors these directories:
-
/var/lib/pgsql
-
/var/spacewalk
-
/var/cache
-
/srv
You can change which directories are monitored with the spacecheck_dirs
parameter.
You can specify multiple directories by separating them with a space.
For example:
spacecheck_dirs = /var/lib/pgsql /var/spacewalk /var/cache /srv
For more information about volumes, see https://documentation.suse.com/suma/5.0/en/suse-manager/installation-and-upgrade/container-management/persistent-container-volumes.html.
2. Thresholds
By default, Uyuni creates a warning when a monitored directory has less than 10% of total space available. A critical alert is created when a monitored directory falls below 5% space available.
You can change these alert thresholds with the spacecheck_free_alert
and spacecheck_free_critical
parameters.
For example:
spacecheck_free_alert = 10 spacecheck_free_critical = 5
3. Shut Down Services
By default, Uyuni shuts down the spacewalk services when the critical alert threshold is reached.
You can change this behavior with the spacecheck_shutdown
parameter.
A value of true
enables the shut down feature.
Any other value disables it.
For example:
spacecheck_shutdown = true
4. Disable Space Checking
The space checking tool is enabled by default. You can disable it entirely with these commands:
systemctl stop spacewalk-diskcheck.timer systemctl disable spacewalk-diskcheck.timer
Disabling the spacewalk-diskcheck.timer
will stop periodic email alerts if the alert threshold is reached, but the warning notification will still appear at the top of the sign-in page.