SD Card Storage increases daily

Hi,

I am a new Home Assistant user running the latest Home Assistant Operating System on my freshly setup Raspberry Pi 3b+ with a 128GB SD Card.

I only installed Glances and Visual Studio Code so far - not much setup. But I noticed that my SD card storage expands / grows daily.

Has this something to do with the logs / history that is writen all the time … is this normal?

Glances has quite a few chatty sensors

If it does not level out after 10 days (the default recorder database keep days) you may have an issue.

Keep an eye on it.

… how long is the standard history backlog? Were can I change for how many days the logging is stored?

The recorder integration. This option in particular: https://www.home-assistant.io/integrations/recorder/#purge_keep_days

Can you confirm that it’s the recorder database (by default, home-assistant_v2.db) which is growing?

I’ve been working on some simple instructions for identifying and excluding unneeded recorder entries to get and keep the database a reasonable size. If it’ll help I can share what I’ve got so far.

1 Like

how do I check that?

The database is in the Config folder, same place as you’ll find configuration.yaml. Use whatever file manager you use to open and edit that. Sort by file size. Unless you manage what gets stored in the recorder database, it can grow to be a monster. On the other hand, it could be something else filling up your file system. You want to figure that out first.

According to the dashboard 7% of the SD Storage (128GB Card) are used. This is what I see in File Editor:

… the two biggest files are together less than 1 GB … the rest is minimal MB size. Yet around 9GB are already written on SD Card by today.

Agreed that it’s not the database. That’s good; you’ve eliminated one possibility.

The log files seem kind of large compared to mine. Your home-assistant.log is 1.8M, and the home-assistant.log.1 is 362M. I think that the .1 is the previous log. For comparison, my .1 is 320K, and was created three days since the prior restart. I just restarted a few minutes ago so the active log file is only 7K.

When you open the log files, does anything jump out at you as excessive?

Today the Disk use seems to level off … so maybe just the initial write?