-
Notifications
You must be signed in to change notification settings - Fork 0
Server Out of Disk
what you do next depends on which disk is out of space. df -h
will show you which disk is full (if you did not get that from the alert already`)
This drive is where all the docker images and container data lives. to clean it we need to remove containers and/or old images. The easiest first step is to remove image builder and weave containers
- Ssh into the server
- Remove image builder containers
docker rm `docker ps -a | awk '/image-builder.*Exited/{print $1}'`
- Remove dangling images:
docker rmi $(docker images -f dangling=true -q)
- Check to see if this helped (you want to maintain atleast 10gb free)
df -h | grep docker
- In order to delete them manually try
docker rmi `docker images -aq`
- If there are volumes on the dock, try deleting old unreferenced volumes with
docker volume rm `docker volume ls -f dangling=true | awk '{print $2}'`
- If you are here all is lost for this server. mark as unhealthy using docks-cli
The root disk is also where the os and logs live. here you can safely delete logs and files in the ~/var/log/
path.
-
Check where the space is getting used the usual suspects
du -h -d 0 /var
du -h -d 0 /home
-
If /var/log is using too much space first remove archived logs
rm /var/log/*.gz
-
If that does not help flush out applications logs 1.
echo “” > /var/log/docker-listener.log
1.echo “” > /var/log/charon.log
1.echo “” > /var/log/filibuster.log
1.echo “” > /var/log/krain.log
-
If you are here all is lost for this sever. mark as unhealthy using docks-cli