Running out of space on a 2GB SD

I’ve just come back from a few days away and am checking on the state of my HA. It’s running on a Pi B with a 2GB SD card. I found that it had no space left! The db file is 143M and the log was over 40M. I deleted the log just so I could actually do anything, although it seemed to be running fine. That seems like a big database for a fairly simple setup.

Is 2GB a viable card size? The Pi isn’t doing anything apart from HA. I started with a Hassbian image. Is there anything I can remove from that without affecting functionality?

I did see mention of cleaning up the database on https://home-assistant.io/details/database/ That talks about sqlite3, but I don’t see that as being installed.

Can you set a limit on log size? Is the database accumulating log info? I don’t see a need for logs older than a few days.

I am contemplating moving to a Pi 3 and would have at least an 8GB SD in that, but I’d like to keep running for now.

You should be able to purge on intervals. Recorder - Home Assistant

You can also determine which events should or should not be recorded. Check the logger component and the history component for more info.

There has been discussion about this and it seems some people are running MySQL instead.

Regards

since a bit bigger sd cards are really cheap i would advice a bigger one even if it is possible to run hass on a 2 mb.

i bought some new this week.
to be able to keep up with a growing project i bought 64 gb cards.

i also bought more then 1 so i can backup a stable enviroment and when something goes wrong i can get back my stable enviroment in a few seconds.

@PtP Thanks for the link. I’ll try setting the purge to a few days. I really only need history to check if things are working. Not sure I want to get into changing the database.

@ReneTode I do have some bigger cards and I may look at migrating to one of those.

1 Like