디스크 공간 관리
디스크 공간이 부족하면 복구가 불가능한 SUSE Multi-Linux Manager 데이터베이스 및 파일 구조에 심각한 영향을 미칠 수 있습니다.
SUSE Multi-Linux Manager monitors some directories for free disk space. You can modify which directories are monitored, and the warnings that are created using environment variables in systemd service override files.
모니터링되는 디렉토리 중 하나의 사용 가능 공간이 경고 임계값 미만으로 감소하면, 구성된 이메일 주소로 메시지가 전송되고 로그인 페이지 상단에 알림이 표시됩니다.
1. 모니터링되는 디렉토리
By default, the SUSE Multi-Linux Manager Server container monitors these directories:
-
/var/spacewalk -
/var/cache -
/srv
You can change which directories are monitored by setting the DISKCHECKDIRS environment variable in the server container systemd service. You can specify multiple directories by separating them with a space.
|
The |
-
Create a systemd override directory for the server service:
mkdir -p /etc/systemd/system/uyuni-server.service.d/
-
Create a configuration file with the custom 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
For more information about container volumes, see Persistent Container Volumes.
2. 임계값
By default, SUSE Multi-Linux Manager creates a warning when a monitored directory reaches 90% disk usage. A critical alert is created when a monitored directory reaches 95% disk usage, and the container health check will fail.
You can change these alert thresholds by setting the DISKCHECKALERT and DISKTHRESHOLD environment variables.
-
Create systemd override directories:
mkdir -p /etc/systemd/system/uyuni-server.service.d/ mkdir -p /etc/systemd/system/uyuni-db.service.d/
-
Create configuration files for both server and database services:
cat > /etc/systemd/system/uyuni-server.service.d/diskcheck.conf << 'EOF' [Service] Environment="DISKCHECKALERT=90" Environment="DISKTHRESHOLD=95" EOF cat > /etc/systemd/system/uyuni-db.service.d/diskcheck.conf << 'EOF' [Service] Environment="DISKCHECKALERT=90" Environment="DISKTHRESHOLD=95" EOF
-
Apply the configuration by restarting SUSE Multi-Linux Manager:
mgradm restart
|
For large deployments with multi-terabyte storage volumes, you may want to use higher thresholds to make more efficient use of disk space. For example, on a 10 TB volume, keeping 5% free means 500 GB unused. For tuning recommendations for large deployments, see specialized-guides:large-deployments/tuning.adoc#diskcheck-thresholds. |
3. Database Disk Check
The database container has its own disk check that monitors only the PostgreSQL data directory (/var/lib/pgsql/data). This directory is always monitored and cannot be changed or overridden with the DISKCHECKDIRS environment variable.
The database disk check uses the DISKCHECKALERT and DISKTHRESHOLD environment variables configured for the uyuni-db service.
The database disk check runs as a PostgreSQL function and is invoked during container health checks. When the threshold is exceeded, the health check will fail and the container will be automatically stopped to prevent data corruption.
|
The database container only monitors |
4. 공간 검사 비활성화
The space checking tool is enabled by default and runs hourly via a Taskomatic scheduled task. Notification can be disabled by disabling diskcheck-task-queue-default Taskomatic job. To effectively disable disk space monitoring, set the threshold values to 99 (percent).
-
Edit the systemd override files to set very high thresholds:
cat > /etc/systemd/system/uyuni-server.service.d/diskcheck.conf << 'EOF' [Service] Environment="DISKCHECKALERT=99" Environment="DISKTHRESHOLD=99" EOF cat > /etc/systemd/system/uyuni-db.service.d/diskcheck.conf << 'EOF' [Service] Environment="DISKCHECKALERT=99" Environment="DISKTHRESHOLD=99" EOF
-
Apply the configuration by restarting SUSE Multi-Linux Manager:
mgradm restart
|
Disabling disk space monitoring is not recommended in production environments, as running out of disk space can cause severe and potentially unrecoverable damage to the database. |