디스크 공간 문제 해결
디스크 공간이 부족하면 SUSE Multi-Linux Manager 데이터베이스 및 파일 구조에 심각한 영향을 미칠 수 있으며, 대부분의 경우 이를 복구할 수 없습니다. SUSE Multi-Linux Manager는 특정 디렉토리의 여유 공간을 모니터링하고 구성 가능한 경고가 있습니다. 공간 관리에 대한 자세한 내용은 디스크 공간 관리에서 확인할 수 있습니다.
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.
사용하지 않는 소프트웨어 채널을 제거하여 디스크 공간을 복구할 수 있습니다.
사용자 정의 채널이 동기화되는 빈도도 확인할 수 있습니다. 사용자 정의 채널 동기화를 처리하는 방법에 대한 지침은 administration:custom-channels.adoc#_custom_channel_synchronization에서 확인할 수 있습니다.
사용하지 않는 활성화 키, 컨텐트 라이프싸이클 프로젝트 및 클라이언트 등록을 정리하여 디스크 공간을 복구할 수도 있습니다. 중복 데이터베이스 항목을 제거할 수도 있습니다.
-
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 디스크 공간 관리.