Removing 300G Docker Logs

in #steem5 days ago

Received hourly low disk space alerts for 2.5 months — finally tracked it down and fixed it.

Turned out to be ~300GB of Docker logs. I used ncdu to inspect disk usage and quickly spotted the issue under:

/var/snap/docker/common/var-lib-docker/containers/<container-id>/

One container log alone had grown to over 300GB.
It was generating roughly ~1GB every 2 days.

Resolved it by truncating the log file (safe for running containers):

sudo truncate -s 0 <log-file>

Next step is to enable Docker log rotation to prevent this from happening again 👍

image.png

image.png

image.png

f5bf0847691da53f595ce3abe7a7b076.png

e077aa444fb0bec4c6edeea0ee559293.png

812523fe898b091b66860f81b0cefbb7.png

40db2eedee925351758d1ca6c948ef54.png

Steem to the Moon🚀!

Support me, thank you!

Why you should vote me? My contributions
Please vote me as a witness or set me as a proxy via https://steemitwallet.com/~witnesses

image.png