monitoring

GuestFilesystemAlmostOutOfSpace

Meaning

This alert triggers when a file system in a virtual machine (VM) is running out of available disk space.

The alert has the following severity levels:

The alert provides details about the specific file system (disk_name), its mount point (mount_point), the VMI name, and namespace.

Impact

When a guest file system runs out of space, the VM may experience:

Critical space exhaustion (>95%) significantly increases the risk of immediate application or system failure.

Diagnosis

Mitigation

Immediate Actions

  1. Free up space in the guest file system:

    • Remove temporary files, logs, or caches
    • Clean up old application data or archives
    • Remove unnecessary packages or applications
  2. Expand the disk size if the underlying PVC supports volume expansion:

    a. Check if the storage class supports volume expansion:

       $ kubectl get storageclass <storage-class-name> -o yaml | grep allowVolumeExpansion
    

    b. Modify the PVC to request a larger size:

       $ kubectl edit pvc <pvc-name> -n <namespace>
       # Update the spec.resources.requests.storage value to a larger size
    

    c. Restart the VM to apply the changes:

       $ virtctl restart <vm-name> -n <namespace>
    

    This step resizes the disk.img to match the new PVC size. While this is primarily needed for file system volumes, restarting to apply changes is generally recommended.

Long-term Solutions

If the issue persists or the file system continues to fill up rapidly after cleanup, investigate the root cause such as application bugs, excessive logging, or unexpected data growth.

If you cannot resolve the issue, see the following resources: