Full filesystem on HomeAssistant Server

Recently I got warnings from my HomeAssistant Server that the filesystem is getting full:

It took me some time to figure out, how to clean that up.

When I opened the WEB SSH Terminal from the GUI and checked the usage it looked like this:

[core-ssh /]$ df -h
Filesystem                Size      Used Available Use% Mounted on
overlay                  13.9G     12.9G    367.7M  97% /
devtmpfs                  1.6G         0      1.6G   0% /dev
tmpfs                     1.9G         0      1.9G   0% /dev/shm
/dev/mmcblk0p8           13.9G     12.9G    367.7M  97% /data
/dev/mmcblk0p8           13.9G     12.9G    367.7M  97% /ssl
/dev/mmcblk0p8           13.9G     12.9G    367.7M  97% /addons
/dev/mmcblk0p8           13.9G     12.9G    367.7M  97% /share
/dev/mmcblk0p8           13.9G     12.9G    367.7M  97% /media
/dev/mmcblk0p8           13.9G     12.9G    367.7M  97% /config
/dev/mmcblk0p8           13.9G     12.9G    367.7M  97% /backup
/dev/mmcblk0p8           13.9G     12.9G    367.7M  97% /run/audio
tmpfs                   758.5M      1.6M    756.9M   0% /run/dbus
/dev/mmcblk0p8           13.9G     12.9G    367.7M  97% /etc/asound.conf
/dev/mmcblk0p8           13.9G     12.9G    367.7M  97% /etc/resolv.conf
/dev/mmcblk0p8           13.9G     12.9G    367.7M  97% /etc/hostname
/dev/mmcblk0p8           13.9G     12.9G    367.7M  97% /etc/hosts
tmpfs                     1.9G         0      1.9G   0% /dev/shm
/dev/mmcblk0p8           13.9G     12.9G    367.7M  97% /etc/pulse/client.conf
tmpfs                     1.9G         0      1.9G   0% /proc/asound
devtmpfs                  1.6G         0      1.6G   0% /proc/keys
devtmpfs                  1.6G         0      1.6G   0% /proc/latency_stats
devtmpfs                  1.6G         0      1.6G   0% /proc/timer_list
tmpfs                     1.9G         0      1.9G   0% /sys/firmware

I first tried with the recommended steps that you get when you click on the provided link. But this was not really helpful. Not too many backups and no unused extensions.

When I looked into the mounted filesystems I could not find anything that caused the issue. But with the SSH extension of HomeAssistant, you do not have access to the root filesystem of the HomeAssistant Server. Read this Article to get access to the root file system.

After some searching around I figured out, that I had some unused docker images on the server which consumed a lot of space. Here are the running containers:

# docker ps
CONTAINER ID   IMAGE                                                            COMMAND               CREATED        STATUS                 PORTS                                                                                                                          NAMES
94c4664e25e6   ghcr.io/home-assistant/raspberrypi4-64-homeassistant:2023.11.1   "/init"               3 days ago     Up 13 hours                                                                                                                                           homeassistant
c2eb096088c3   homeassistant/aarch64-addon-matter-server:4.10.2                 "/init"               3 days ago     Up 3 days                                                                                                                                             addon_core_matter_server
9be7ac3c588d   ghcr.io/esphome/esphome-hassio:2023.10.6                         "/init"               5 days ago     Up 5 days                                                                                                                                             addon_5c53de3b_esphome
b2221e8777d1   ghcr.io/hassio-addons/vscode/aarch64:5.13.0                      "/init"               6 days ago     Up 6 days (healthy)                                                                                                                                   addon_a0d7b954_vscode
3ae1e0901888   sabeechen/hassio-google-drive-backup-aarch64:0.111.1             "python3 -m backup"   12 days ago    Up 12 days             0.0.0.0:1627->1627/tcp, :::1627->1627/tcp, 8099/tcp                                                                            addon_cebe7a76_hassio_google_drive_backup
244c9977489b   ghcr.io/brenner-tobias/cloudflared/aarch64:4.2.9                 "/init"               12 days ago    Up 12 days                                                                                                                                            addon_9074a9fa_cloudflared
0e773344907c   homeassistant/aarch64-addon-nginx_proxy:3.5.0                    "/init"               12 days ago    Up 12 days             0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp                                                       addon_core_nginx_proxy
55c6f3e6fdc8   ghcr.io/hassio-addons/grocy/aarch64:0.20.1                       "/init"               12 days ago    Up 12 days                                                                                                                                            addon_a0d7b954_grocy
b4447cd44e1b   homeassistant/aarch64-addon-configurator:5.6.0                   "/init"               12 days ago    Up 12 days (healthy)                                                                                                                                  addon_core_configurator
b0a011180489   homeassistant/aarch64-addon-zwave_js:0.2.1                       "/init"               12 days ago    Up 12 days             0.0.0.0:3000->3000/tcp, :::3000->3000/tcp                                                                                      addon_core_zwave_js
4c64b6a0029e   homeassistant/aarch64-addon-ssh:9.7.1                            "/init"               12 days ago    Up 12 days             0.0.0.0:2022->22/tcp, :::2022->22/tcp                                                                                          addon_core_ssh
114b635a9d46   homeassistant/aarch64-addon-mosquitto:6.3.1                      "/init"               12 days ago    Up 12 days             0.0.0.0:1883-1884->1883-1884/tcp, :::1883-1884->1883-1884/tcp, 0.0.0.0:8883-8884->8883-8884/tcp, :::8883-8884->8883-8884/tcp   addon_core_mosquitto
39703d93038e   ghcr.io/home-assistant/aarch64-hassio-multicast:2023.06.2        "/init"               12 days ago    Up 12 days                                                                                                                                            hassio_multicast
06fb896ca3e7   ghcr.io/home-assistant/aarch64-hassio-audio:2023.06.0            "/init"               12 days ago    Up 12 days                                                                                                                                            hassio_audio
3e6b19707736   ghcr.io/home-assistant/aarch64-hassio-dns:2023.06.2              "/init"               12 days ago    Up 12 days                                                                                                                                            hassio_dns
7181b75ba34e   ghcr.io/home-assistant/aarch64-hassio-cli:2023.06.0              "/init"               12 days ago    Up 12 days                                                                                                                                            hassio_cli
a486edbb36ac   ghcr.io/home-assistant/aarch64-hassio-supervisor:latest          "/init"               12 days ago    Up 12 days                                                                                                                                            hassio_supervisor
18579d551716   ghcr.io/home-assistant/aarch64-hassio-observer:2023.06.0         "/usr/bin/observer"   4 months ago   Up 12 days             0.0.0.0:4357->80/tcp, :::4357->80/tcp                                                                                          hassio_observer

And here are the images on the system

# docker image ls
REPOSITORY                                             TAG         IMAGE ID       CREATED         SIZE
homeassistant/aarch64-addon-matter-server              4.10.2      9c89d30d55dd   4 days ago      436MB
ghcr.io/home-assistant/raspberrypi4-64-homeassistant   2023.11.1   f8431981309f   4 days ago      1.89GB
ghcr.io/esphome/esphome-hassio                         2023.10.6   6e831f568ef5   6 days ago      350MB
ghcr.io/home-assistant/raspberrypi4-64-homeassistant   2023.11.0   f03d27fc37a8   7 days ago      1.89GB
homeassistant/aarch64-addon-zwave_js                   0.2.1       b3e394f56f5b   2 weeks ago     283MB
ghcr.io/home-assistant/aarch64-hassio-supervisor       2023.10.1   4cb4e7ffbdfb   2 weeks ago     396MB
ghcr.io/home-assistant/aarch64-hassio-supervisor       latest      4cb4e7ffbdfb   2 weeks ago     396MB
ghcr.io/home-assistant/raspberrypi4-64-homeassistant   2023.10.5   32d08634b8f5   2 weeks ago     1.82GB
ghcr.io/hassio-addons/vscode/aarch64                   5.13.0      9e1197be4e57   2 weeks ago     952MB
ghcr.io/hassio-addons/grocy/aarch64                    0.20.1      7e7c875404b1   3 weeks ago     205MB
ghcr.io/brenner-tobias/cloudflared/aarch64             4.2.9       fe75e72db189   3 weeks ago     72.6MB
homeassistant/aarch64-addon-mosquitto                  6.3.1       874c30a91c70   2 months ago    210MB
ghcr.io/home-assistant/aarch64-hassio-dns              2023.06.2   9dd40b04adb7   4 months ago    140MB
ghcr.io/home-assistant/aarch64-hassio-multicast        2023.06.2   b06077afe00c   4 months ago    125MB
ghcr.io/home-assistant/aarch64-hassio-cli              2023.06.0   545b7db7865f   4 months ago    134MB
ghcr.io/home-assistant/aarch64-hassio-observer         2023.06.0   1b4771b44876   4 months ago    7.49MB
ghcr.io/home-assistant/aarch64-hassio-audio            2023.06.0   0f0740770fe4   4 months ago    163MB
sabeechen/hassio-google-drive-backup-aarch64           0.111.1     504a9a5a6647   4 months ago    348MB
homeassistant/aarch64-addon-ssh                        9.7.1       99c7ef964961   5 months ago    213MB
homeassistant/aarch64-addon-nginx_proxy                3.5.0       75bbc2b8bac2   5 months ago    130MB
homeassistant/aarch64-addon-configurator               5.6.0       12c2f367dd19   6 months ago    212MB
homeassistant/aarch64-addon-duckdns                    1.15.0      08f2ca3a84aa   17 months ago   120MB

As you can see: There are three images ghcr.io/home-assistant/raspberrypi4-64-homeassistant with different tags. But in the output of docker ps you can see, that only one of them is used. So I deleted the unused images

# docker image rm 32d08634b8f5
Untagged: ghcr.io/home-assistant/raspberrypi4-64-homeassistant:2023.10.5
Untagged: ghcr.io/home-assistant/raspberrypi4-64-homeassistant@sha256:30c3945f06997192d900a5a303c75b70fe0a8dbcb49241a31d5595b9275e7dde
Deleted: sha256:32d08634b8f520345488dff7dd7498b11d61b991c0d2f0a0ead86f24131f8620
Deleted: sha256:1822f4ef9eae08971b575277a89798c9c4997b9e42adda27a6a14216360df865
Deleted: sha256:f336e8260852ab72485984a9d5d916ce1eeac87fe717b32aee7d26bcbc69953f
Deleted: sha256:a5103cb61d39cb49bd448ed24c08bd50c27d4bd19fe10ad9cc97dd196de55406
Deleted: sha256:9863d6471052e38bf6825db18025cd3eedfe093b21d0891647625e68cdd21c5f
Deleted: sha256:a04047f35584011b297b47bdc5c5c8eac83f68628bfbc5334f7e141366ed8ade
Deleted: sha256:5046784a1cd9d0bdd1f58f9ac7aecf2f6896cbf560e89e1b2ac2718c1ad996e1
Deleted: sha256:06206c1b1803445c45066d796401dd21b28a1562e9c8f76578a45c25df6675f1
Deleted: sha256:42008e393948a717537706fb8f5882031d6c6f695d7d4544644e3d3ca2c0e9a6
Deleted: sha256:04937cbf1a0c21af680a4477e3b5f4ae6f7555973c95b4c85a158b8c0af4e1ed
Deleted: sha256:11bfbf950bdd1c4b6bfaadff9e641ee82e7cc5e99c33c862284c6e943361f532
Deleted: sha256:c3ef4b5f4266e6fb261ecadf23dd7407ea8d4abd3c0d5f62f3f482efcf34066a
Deleted: sha256:45815c0d0e52c602a6e6057ae4eee8ee07f799f99fdab3068ad1d83e3ff701a4
Deleted: sha256:115599195ddc797d764ebe10569ff44b7d151bc0411991a22f5328c333da89b7
Deleted: sha256:5a5f9afa6b9e09dcd2c854ce2d2aaa79ca3164bd4865e4bff6a4d6ef5ada3144
Deleted: sha256:2b4022d380ee61d55a4959b40827187711849cee1d171d65deb9e568f44c3a6a
Deleted: sha256:88b6bbb4c1d33e742cb539fc11ca437b1bf83272976920d6b1086b662b189322
Deleted: sha256:750cfc86a96aabec4d54cec6328afb5b6ed2194341ff5ee07e9585e8a90fef3b
Deleted: sha256:1a64671c263cde44aff9483eb78a00de3c5307790dfd371b2b6fca24a0334686
Deleted: sha256:e4956b69571276ec727f98cded0707620202a9ccfe830906e299a23c31d321f7
Deleted: sha256:56b94dbcfa264a5332f667839da06020fd863c90bb7d3fcb28bcbd2d2e687dcc
Deleted: sha256:2717ff7bb7393fd5975bb3e49bd220215c847f9d293ef1b5b96c1eaf422d77b4
Deleted: sha256:99456aec9f7e4352e3c89d6f6ba0f5e3a94c8a7abf646029f31d6eef1016f371
Deleted: sha256:5e9028c3d694ca57ffddfe94926f946fde0bf03e273c82f3a61494e4168fa06e
Deleted: sha256:93ec203ae11ac4f73dd57507a7ad5025235f6a868c7093867517832d021dcf45
Deleted: sha256:900144d319dd819ffee5f477cef447bdc24d65d2078024b9547024203c470f81
Deleted: sha256:43e269c0ec068715989874037b1cf94eea3b7fc71ac30f95faf21c512b585530
Deleted: sha256:01c5da92a4412955dc7769e7c50df805a7cf84af31dc4bbf6553e529934dca6d
Deleted: sha256:4565aa96be097f99dade2ad6cf2517398a2d1b88dfc85373d2b0ec54adb8183e
Deleted: sha256:fe56462e298d2794abd88b42e6dea7d7e30179ab697d7a5af12b929909ba30e0
Deleted: sha256:139c488215ddf1c5fdf01e60ba0f1beaa44ec3076741c6847c8b286322e2f4d9
Deleted: sha256:b2191e2be29d816fa6fbde954316d54e10df9a882c7ca38e3e087d9cbca49fe6
# docker image rm f03d27fc37a8
Untagged: ghcr.io/home-assistant/raspberrypi4-64-homeassistant:2023.11.0
Untagged: ghcr.io/home-assistant/raspberrypi4-64-homeassistant@sha256:d4999ee454a1c1cbbfb34f6e77eb0470723bc2abe6497f6333dac0ade78fa4ea
Deleted: sha256:f03d27fc37a8276f88c8853a00e76dc203d05c99d4656e9809503c1ffb93f534
Deleted: sha256:db1d4f9f80c8e7684c323ba48ea0e7e35eb7ac8a4ab7ebaba9cab9ef762bce35
Deleted: sha256:35076d3fe61758bdd97f338c0dbfc69dcd78e335d95a30475d7e201c753a7b55
Deleted: sha256:e84e5866f16123ea648b10d3e88ae96adc950ad90cacb846501d73d86b6b677e
Deleted: sha256:b616e244920dd99bd1816c2d728672113843aaed4a52332d722cf7f2e3202b0b
Deleted: sha256:7211100d55a75d9867f145fcf438b183f5d3e49bc07af8b60704ec827b12b80c
Deleted: sha256:b6de78289cb6567faf610588ce7712ec6f37ce6ddf70b66b1a51e05e4e10f8d6
Deleted: sha256:96786b11be9c3f31072ddcc270c9c82edad42b49709c93c2fcf948e62a0e0b93
Deleted: sha256:1b63602bf3cc576d9ccaa820d5aa7e0bff53f0ec0d564f619da72bf072d3ebae
Deleted: sha256:e13af3912d97059af80ed5bf487f76abaf487c916530b321f6de3d52aa8bc647
Deleted: sha256:a60df221263037484b4ecb846b385f21b66d942095c5f1501c292699d329a73c
Deleted: sha256:f3b7259b9030f89033f5617d2c7a2f0a9f5389bfcbfba306d4d3a2ab7f18f483

After that, I checked again the disk use in the SSH WEB terminal.

[core-ssh /]$ df -h
Filesystem                Size      Used Available Use% Mounted on
overlay                  13.9G      9.2G      4.1G  69% /
devtmpfs                  1.6G         0      1.6G   0% /dev
tmpfs                     1.9G         0      1.9G   0% /dev/shm
/dev/mmcblk0p8           13.9G      9.2G      4.1G  69% /data
/dev/mmcblk0p8           13.9G      9.2G      4.1G  69% /ssl
/dev/mmcblk0p8           13.9G      9.2G      4.1G  69% /addons
/dev/mmcblk0p8           13.9G      9.2G      4.1G  69% /share
/dev/mmcblk0p8           13.9G      9.2G      4.1G  69% /media
/dev/mmcblk0p8           13.9G      9.2G      4.1G  69% /config
/dev/mmcblk0p8           13.9G      9.2G      4.1G  69% /backup
/dev/mmcblk0p8           13.9G      9.2G      4.1G  69% /run/audio
tmpfs                   758.5M      1.6M    756.9M   0% /run/dbus
/dev/mmcblk0p8           13.9G      9.2G      4.1G  69% /etc/asound.conf
/dev/mmcblk0p8           13.9G      9.2G      4.1G  69% /etc/resolv.conf
/dev/mmcblk0p8           13.9G      9.2G      4.1G  69% /etc/hostname
/dev/mmcblk0p8           13.9G      9.2G      4.1G  69% /etc/hosts
tmpfs                     1.9G         0      1.9G   0% /dev/shm
/dev/mmcblk0p8           13.9G      9.2G      4.1G  69% /etc/pulse/client.conf
tmpfs                     1.9G         0      1.9G   0% /proc/asound
devtmpfs                  1.6G         0      1.6G   0% /proc/keys
devtmpfs                  1.6G         0      1.6G   0% /proc/latency_stats
devtmpfs                  1.6G         0      1.6G   0% /proc/timer_list
tmpfs                     1.9G         0      1.9G   0% /sys/firmware
[core-ssh /]$

Problem solved.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert