HASSIO Docker Overlay2 folder consuming all disk space

Tags: #<Tag:0x00007f73931ebf28>

I recently ran out of disk space causing my virtualbox to have some difficulties running. I finally tracked it down to a bunch of files in my “/var/lib/docker/overlay2”. This directory was >30GB. Has other people had this happen and how do I properly resolve this and more importantly prevent it from occurring again?

1 Like

Also I have noticed that there is a json.log file in: /var/lib/docker/containers/ has expanded to ~33GB. I am using HASSIO, is there no automated mechanism to keep this log file to a reasonable size?

1 Like

You could try a ha su repair in the custom cli console as it is basically a docker purge. Either of the ssh add-ons will let you run this, as well as the terminal in the vsc add-on.

What you are experiencing isn’t normal.

thanks @cogneato I will try this. For now I just manually deleted the json.log file which was so huge. My virtual machine ran out of space and was not starting so I had to get into recovery mode and manually delete some big files to get it to start.

I have the same issuedisk
I did a docker system purge -a and it cleared up space only to be used in the overlay2 folder

@cbuxton but what is the long term solution? I only noticed this issue when my HA install stopped working right because it ran out of space. Won’t this just happen to us again if left unchecked?

Same here Overlay2 folder size is 9GB , eating too much space

Mine just did it again, with the log file filling up ~16GB. I suppose I need to actually look at the log file to see what is logging so much.

Mine just continues to grow as well, but I am not making progress on figuring out what is taking the disk space.

Same Problem here Overlay2 is consuming all disk space.

Some Overlays consume up to 2GB and there are plenty of them. For me it is not the Log-File as mentioned. Seems to be the libs of python that consume that much space.

Working with version 108.6 and trying to update to 108.9

Can i just delete those overlay folders? What will i break then?

Just as an update, I fixed a few errors that were showing up on a regular basis in the HA log file and it seems to have largely resolved this issue. My files are not filling up as fast as they used to.

same issue here.
I’m trying to get support everywhere, but still don’t have a solution. overlay2 folder inscreases daily until ssd is left out of space. I have a VM only with HA and deepstack on docker. I know that these are logs, but is there any way just to stop them?

sudo du -h /var/lib/docker | sort -h

Hi Everyone,

same problem here,
trying to find a solution but so far nothing

Running
Server: Docker Engine - Community
Engine:
Version: 19.03.5
Hassio 0.108.6

The output from du -h /var/lib/docker | sort -h

I also have this exact same problem… Noticed on 0.109.0 version

Disk has filled up twice to me now. Killing the containers restores the disk space.

I’ll check if it’s the json.log next time.

Have you tried ha su repair?

For me, no. That (ha su repair) is not available.

I’m working my way through space issues at the moment also… there doesn’t appear to be a single cause. I managed to access the “ha su repair” option by installing:
[Supervisor] - [Add-on store] - [Terminal & SSH]

This cleared up a little disk space

Same problem here. 20+ folders of up to 1GB. In each one it always seems that the python files take up basically all the space per folder.

This is my contribute to limit the used space.

On running HASSIO host machine:

Remove images not used by containers

docker image prune -a

Remove containers not used on last 24hours

docker container prune --filter "until=24h"

Remove volumes not used by containers

docker volume prune

Check space used by logs

journalctl --disk-usage

Remove journald log files

journalctl --rotate
journalctl --vacuum-time=1m

Free +10Gb on my PI3 with this configuration:

arch armv7l
chassis embedded
dev false
docker true
hassio true
host_os HassOS 4.10
installation_type Home Assistant
os_name Linux
os_version 4.19.126-v7
python_version 3.7.7
supervisor 227
timezone Europe/Rome
version 0.110.6
virtualenv false
1 Like