How Can I Troubleshoot High Disk Usage on a Node?
Symptom
The disk usage on a node is high. After the execution of df -h, the command output shows that the disk usage exceeds 90%.

Possible Cause
The disk usage on a node may be high due to the following causes:
- There are large files on the disk.
- A large amount of pod data is written to the host node because the pods have the hostPath or emptyDir volumes mounted.
- The pods continuously generate logs, but without a configured log retention period, the logs accumulate over time and grow excessively large.
Fault Locating
- Cause 1: Check whether there are any large files on the disk. Run find to search for large files. For example, to search for all files larger than 1 GiB, run the following command:
find / -type f -size +1G
This command searches for all files (including hidden files) whose size exceeds 1 GiB from the root directory (/).
Some examples are shown below.
- Cause 2: Obtain the pod mount path.
Obtain the mounting mode of a pod volume.
kubectl describe pods | grep -Pz Volumes
Information similar to that shown in the figure below is displayed.

If a pod has a hostPath or emptyDir volume mounted, check the file size in the mount path folder.
- Cause 3: Check the log storage settings.
Suggestions
- Delete unnecessary files.
- Use cloud storage for pods where a large amount of data needs to be written. For details, see Storage Overview.
- Configure maxSize and maxFile for Docker or containerd log files.
Docker or kubelet needs to be restarted after the configuration is updated. Exercise caution when performing this operation.
- Periodically delete unnecessary images from the node.
- containerd nodes
- Obtain local images on the node.
crictl images -v
- Delete the unnecessary images by image ID.
crictl rmi {Image ID}
- Obtain local images on the node.
- Docker nodes
- Obtain local images on the node.
docker images
- Delete the unnecessary images by image ID.
docker rmi {image-ID}
- Obtain local images on the node.
- containerd nodes
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot



