Home Assistant OS storage accounting appears inconsistent after recorder purge. Backup estimates 6.8 GB despite /config being only 1 GB

I'm running Home Assistant OS on a Raspberry Pi 4 Model B with a 32 GB microSD card.

I initially received the "Data disk is running low" warning. At that point:

  • Storage page reported approximately:
    • System: 14.9 GB
    • Home Assistant: 11.3 GB
    • Backups: 1.0 GB
  • Free space was approximately 0.5 GB.

Investigation showed:

home-assistant_v2.db = 10.5 GB

I successfully ran:

Developer Tools -> Actions -> recorder.purge

with:

  • keep_days = 14
  • repack = true

Afterwards:

home-assistant_v2.db is now 663.5 MB

Terminal confirms:

du -sh /config

returns:

1.0G /config

There is only one backup:

319 MB

and:

du -sh /share /media /ssl /addon_configs /backup

returns:

12K /share
8K /media
52K /ssl
8K /addon_configs
320M /backup

Despite this:

Storage page still reports:

Home Assistant: 11.3 GB

and

df -h still reports:

25.4 GB used
1.2 GB free

I also rebooted the entire host (not just Home Assistant). The figures did not change.

Another symptom:

Creating a backup estimates approximately 6.8 GB even when:

  • History = OFF
  • Media = OFF
  • Share = OFF
  • Apps = None

Selecting or deselecting add-ons makes no difference to the estimated backup size.

This appears inconsistent because /config is only approximately 1 GB and the recorder database is only 663 MB.

Questions:

  1. Is there another Supervisor/Home Assistant OS storage location that is included in the storage accounting but not visible from the restricted shell?

  2. Is there a known issue where the Storage page or backup size estimate does not refresh after a recorder repack?

  3. Is there a supported method to identify what is consuming the remaining space on the Home Assistant data partition without installing additional add-ons (I currently don't have enough free space to install Advanced SSH)?

Any guidance would be appreciated.

As for 3, see here. You can use the way via du from the OS' CLI if you really need to. Is there ANY SSH app installed already?

I have an update after doing a lot more investigation. I managed to free enough space to install Advanced SSH & Web Terminal by temporarily uninstalling a couple of non-essential add-ons. I then disabled Protection Mode and investigated the filesystem directly.

Originally I had the "Data disk is running low" warning with approximately 0.5 GB free. The Storage page showed approximately:

  • System: 14.9 GB
  • Home Assistant: 11.3 GB
  • Backups: 1 GB

The first thing I found was that the recorder database had grown very large:

/config/home-assistant_v2.db = 10.5 GB

I ran:

Developer Tools → Actions → recorder.purge

with:

  • keep_days = 14
  • repack = true

This completed successfully.

Afterwards:

/config/home-assistant_v2.db = 663 MB

I also checked:

du -sh /config

which now reports:

1.0G

I only have one backup:

319 MB

I also checked:

/share/media/ssl

and these are essentially empty.

Current filesystem usage is now:

df -hFilesystem      Size   Used  Avail/dev/mmcblk0p8 27.8G  24.2G  2.4G

Using Advanced SSH I investigated Docker.

docker system df

reports approximately:

Images      9.8 GBContainers  184 MBVolumes     0Build cache 88 MB

Docker Root Dir is:

/mnt/data/docker

Using an Alpine container to inspect the data partition:

24.2G  /mnt11.7G  /mnt/supervisor11.0G  /mnt/docker497M   /mnt/logs

Breaking Docker down further:

11.0G  /mnt/docker/overlay244.7M  /mnt/docker/image

Breaking Supervisor down further:

11.3G  /mnt/supervisor/homeassistant319M   /mnt/supervisor/backup

However, when I inspect /mnt/supervisor/homeassistant recursively, I only find approximately:

60 MB   zigbee2mqtt58 MB   custom_components52 MB   custom_components/hacs12 MB   .cache11 MB   www10 MB   .storage

Nothing remotely close to 11.3 GB.

Similarly:

du -sh /config

still reports only:

1.0G

which also doesn't reconcile with /mnt/supervisor/homeassistant being reported as 11.3 GB.

I also inspected Docker further.

The largest overlay2 directories are:

2992 MB1571 MB1557 MB1554 MB

I mapped the running containers to their UpperDir values using:

docker ps -aq | while read id; do  echo "===== $(docker inspect -f '{{.Name}}' "$id") ====="  docker inspect -f '{{.GraphDriver.Data.UpperDir}}' "$id"done

None of the running containers correspond to those four largest overlay directories.

I also tried:

docker image prune

which returned:

Total reclaimed space: 0 B

so Docker does not believe there are any dangling images available for cleanup.

At this point I think the recorder issue has been resolved, but I still cannot explain the remaining storage.

The main contradictions I now have are:

  • /config is approximately 1 GB
  • /mnt/supervisor/homeassistant reports 11.3 GB
  • recursive du inside /mnt/supervisor/homeassistant only accounts for a few hundred MB
  • Docker reports 11 GB in overlay2
  • docker image prune finds nothing reclaimable

My questions are:

  1. Is this expected behaviour on Home Assistant OS because of overlay/bind mounts?
  2. Is there another supported way to determine what is actually consuming the remaining space?
  3. Is it normal that the largest overlay2 directories do not appear to belong to any currently running container?
  4. Am I looking in the wrong place, or does this suggest some form of stale overlay storage?

I'm trying to avoid reinstalling Home Assistant if possible, as the system is otherwise working correctly. Any guidance would be greatly appreciated.

I'd see if this changes anything first.

ha supervisor repair
ha host reboot

If a prune doesn't clear anything there's not that much else you can do.
Your text is formatted badly. New lines are missing for example.

thanks for offering input. I've freed up space conventionally. I'm not sure if there is a slow 'drip' of the system realising that the recorder space is free... we'll see

The repack process of the recorder database can take a while and happens asynchronous in the background. You can monitor it with something like this (via SSH app)

watch -n1 ls -lh /homeassistant

You should see a temporary file being created, growing and then replacing the database.
I'm not sure how often the Storage stats in the GUI are updated.