One day, we discovered that our website couldn’t be logged into because the server didn’t have enough space. And the following error was displayed:
Unknown: write failed: No space left on device (28)
Error response from daemon: write /var/lib/docker/image/overlay2/.tmp-repositories.json080576339: no space left on device
ChatGpt give us some solution, as follows:
First, we need to check server’s disk space:
df -h
We found that the disk space was already 100% used.
Next, please check the server log.
du -h /var/log/
We discovered that the journal log was too large, exceeding 2.6GB in size.
Therefore, we should either clear the server logs or delete temporary files.
sudo rm -rf /tmp/*
sudo rm -rf /var/log/*
We noticed that the log has been successfully cleared.
We can set the journal vacuum size to 1GB.
sudo journalctl --vacuum-size=1G
發表留言