Used Space approaching 100%

Hi All,

I have a bit of an issue, I am running HA on a RPI 4b with a 32Gb MicroSD card. The storage is approaching 100%, currently 97.2%:
image

I have 2 issues.

  1. I don’t know what is taking up so much space, how can i find out?
    The System information says: “Estimated database size (MiB) 436.76 MiB”
    I have Influx DB set-up for longer term data storage, could this be taking up so much space?
  2. With so little space available at the moment, I can’t install a Terminal Add-on to investigate further, how can I clear some space or move data to an external disk temporarily?

Thanks for the help in advance

Do you have lots of backups on the SD card?

If so, move them off the card automatically using one of the methods listed in option 5 here: https://www.home-assistant.io/common-tasks/os#copying-your-backups-to-another-location

Also use includes/excludes to only store data in influxdb that you are interested in long term.

Yes, very much so.

Clear some space (good shout Tom to check for old backups), or worst case, get another uSD card, install Rasbpian and use that as a base to recover/ export/ delete data from the original install.

HA manages data summarisation on the supported SQLite database engine, but less so on others:

N.B. InfluxDB runs in parallel with a main DB engine for HA, so you may well have TWO copies of historical sensor data (SQLite + InfluxDB, both with different data summarisation).

InfluxDB is not something I’ve ever been a DBA for so…

I have deleted them all. Could they be left lingering?

Ok so I had a look, the recorder is definitely only recording 7 days worth of data. There are no back-ups on the SD card, I have 2 back-ups on a NAS and when I made that change I deleted the old back-ups on the SD card, could they have lingered? Is there a way to find out?

Influx is only reporting to be about 500MB worth of data which feels about right.

I have just done another back-up onto the NAS, the back-up size is 900Mb, ~700 of which is the influxdb.tar.gz, which again is close enough with what Influx reports to be the size of the DB, assuming that includes the influx configs and add-on files. The homeassistant.tar.gz is 200Mb.

Thoughts? Could I just wipe the SD card completely and install HA fresh and then restore this new back-up?

Is there another way of finding what is filling up the storage?

Doubt it, that’s not how filesystems work, but as you’ve not mentioned how you deleted them… :man_shrugging:

Start searching for basic Linux command line sysadmin tutorials.

Here’s two to start looking:

$ df -h      # results are complicated by the container mounting many things
$ du -h /homeassistant
  • HA backup files are just nested tar archives, so it’s simple (with Linux tools) to unpack, and see the individual parts and their backup sizes (tar tvf backup.tar).
  • Install something like the SQLite Web interface and explore your database tables.
  • Get another uSD card, install Rasbpian and use that as a base to recover/ export/ delete data from the original install.

Possible, but not a good idea.
Get ANOTHER 32Gb U0 uSD card and start from a fresh installand restore - that way you have a way back (and remove the chance of a hardware failure / need to FSTRIM).

1 Like

Fixed / Update:
I downloaded a back-up and loaded it on another SD card. Total storage used was only 10.9GB, so clearly something up from a reporting point of view.
I then deleted Influx DB and its entire database and that dropped the storage down to 9GB, so as I suspected Influx was not to blame, although I will optimise the data I am storing soon.

I found this article: Disk space being eaten up - #9 by mjvanderveen

Although my scenario is not exactly the same, I suspect the cause is the same. I have not tried to clear it with this method yet, but I installed a fresh version of HAOS on the SD card in question + loaded the back-up onto it. Bingo, the complete used space is now 10.9GB.

All back to normal, thanks for everyone’s suggestions.