Troubleshooting Disk Space
Running out of disk space can have a severe impact on the SUSE Multi-Linux Manager database and file structure which, in most cases, is not recoverable. SUSE Multi-Linux Manager monitors free space in specific directories, and has configurable alerts. For more on space management, see Disk Space Management.
Generally, container volumes share space with the host filesystem.
When the btrfs filesystem becomes full, it can prevent you from deleting files.
To resolve this, you can add a small amount of storage temporarily to the filesystem using the btrfs device add command.
This will allow you to delete files to gain space for further filesystem maintenance.
When done with the maintenance, you can remove the temporary storage with btrfs device delete.
For more information about this topic, see https://www.suse.com/support/kb/doc/?id=000018779.
You can recover disk space by removing unused software channels.
-
For instructions on how to delete vendor channels, see Channel Management.
-
For instructions on how to delete custom channels, see Custom Channels.
You can also check how often your custom channels are synchronized. For instructions on how deal with custom channel synchronization, see administration:custom-channels.adoc#_custom_channel_synchronization.
You can also recover disk space by cleaning up unused activation keys, content lifecycle projects, and client registrations. You can also remove redundant database entries:
-
Use the
spacewalk-data-fsckcommand to list any redundant database entries. -
Use the
spacewalk-data-fsck --removecommand to delete them.
1. Disk Check Warnings for Missing Directories
After migrating to containerized deployments from 5.0 or when using custom disk check configurations, you might see warnings for directories that no longer exist.
This commonly occurs when the DISKCHECKDIRS environment variable references /var/lib/pgsql or its subdirectories.
In containerized deployments, the PostgreSQL database runs in its own container, and the /var/lib/pgsql directory no longer exists in the server container.
The database files are stored in a separate database container volume.
If you see warnings like these in the logs or notifications:
DISKCHECK: Directory /var/lib/pgsql does not exist DISKCHECK: Directory /var/lib/pgsql/data does not exist
This indicates that the disk check configuration includes directories that are no longer valid in containerized deployments.
1.1. Cause
Prior to containerization, customers could configure custom directories to monitor by setting the spacecheck_dirs parameter in /etc/rhn/rhn.conf.
A common configuration included /var/lib/pgsql to monitor database disk space.
In containerized deployments:
-
The
spacecheck_dirsparameter in/etc/rhn/rhn.confis still read, but is overridden by theDISKCHECKDIRSenvironment variable if set -
If
DISKCHECKDIRSis not set, the system falls back tospacecheck_dirsfrom the configuration file -
The database runs in a separate container and has its own dedicated disk check
1.2. Fix
Remove the obsolete directory references from the DISKCHECKDIRS environment variable.
-
Check if you have a systemd override file with custom directory configuration:
cat /etc/systemd/system/uyuni-server.service.d/diskcheck.conf
-
If the file contains
/var/lib/pgsqlor other non-existent directories, update it to use only valid directories:cat > /etc/systemd/system/uyuni-server.service.d/diskcheck.conf << 'EOF' [Service] Environment="DISKCHECKDIRS=/var/spacewalk /var/cache /srv" EOF
-
Apply the configuration by restarting SUSE Multi-Linux Manager:
mgradm restart
1.3. Result
The disk check warnings for missing directories will no longer appear. The server container will only monitor the directories that exist within the container.
The database container has its own separate disk check that monitors the PostgreSQL data directory (/var/lib/pgsql/data) within the database container.
This check is automatically configured and does not require manual intervention.
For more information about disk space management in containerized deployments, see Disk Space Management.