HA on docker consumes all disk space

I’m still experimenting with the setup. Running HA on Docker. The system became unresponsive. None of the docker commands produce any output. After some debugging I realized that there is no space left on the device. This is what df shows:

Filesystem                        1K-blocks      Used Available Use% Mounted on
tmpfs                               1611308     82232   1529076   6% /run
efivarfs                                192        98        90  53% /sys/firmware/efi/efivars
/dev/mapper/ubuntu--vg-ubuntu--lv 102626232 102609840         0 100% /
tmpfs                               8056532         0   8056532   0% /dev/shm
tmpfs                                  5120         0      5120   0% /run/lock
/dev/nvme0n1p2                      1992552    187036   1684276  10% /boot
/dev/nvme0n1p1                      1098632      6284   1092348   1% /boot/efi
tmpfs                               1611304        12   1611292   1% /run/user/1000

How can I proceed? What is that device that consumes all that space? How to limit the amount of space used?

Have you pruned the old unused images?

edit:
docker system prune --volumes -f will remove them.

Find what is consuming storage space?

Is this new build or you’ve run like this for a while. Do you have others docker or other software installed?

Media or camera storage?

docker images

This command will show all images saved on host PC

You may need to delete a few files before commands will run. If you can’t run OS you can run Ubuntu live and that will allow you to explore the disk if you can’t connect it to another system.

What hardware you using?

In my case that wouldn’t work. There was no space left for the docker commands to even respond. Although afterwards the more aggressive command docker system prune --all reclaimed another 10GB.

In my case the storage was taken by the log files under:

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

They accumulated around 100GB of logs.

Yeah, see the commend above. The log files took the space:


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

Also, another 13GB taken by:
Other large directory:

/var/snap/docker/common/var-lib-docker/overlay2/