ディスク容量のトラブルシューティング

ディスク容量が不足すると、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を参照してください。

未使用のアクティベーションキー、コンテンツライフサイクルプロジェクト、およびクライアント登録をクリーンアップすることで、ディスク容量を回復することもできます。 また、冗長なデータベースエントリを削除することもできます。

プロシージャ: 冗長なデータベースエントリの解決
  1. Use the spacewalk-data-fsck command to list any redundant database entries.

  2. Use the spacewalk-data-fsck --remove command 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_dirs parameter in /etc/rhn/rhn.conf is still read, but is overridden by the DISKCHECKDIRS environment variable if set

  • If DISKCHECKDIRS is not set, the system falls back to spacecheck_dirs from 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.

Procedure: Removing Obsolete Directory References
  1. Check if you have a systemd override file with custom directory configuration:

    cat /etc/systemd/system/uyuni-server.service.d/diskcheck.conf
  2. If the file contains /var/lib/pgsql or 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
  3. Apply the configuration by restarting SUSE Multi-Linux Manager:

    mgradm restart

1.3. 結果

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 ディスク容量管理.