Rpi sd card reliability

hi ,
we 're using hassio on a rpi3 ( with docker) .
we have 2 ds18b20, an sht35 and a relay board .
with developed some automation with sensors and relays .
Everythings works nice but we 'd experienced 3 sd cards dead/corrupted in a few months and the last one was an industrial grade .
Is that normal for the rpi-hassio system ?
any suggestion to reach an higher level of reliability?
thank’s .

Wooooow thats bad news, im kind of hope that it will not happen to me, but thank you to point out.
I have Industrial grade SLC-lite Apacer 8GB with 5GB empty space, i think the firmware should take care of the bad blocks. Will let you know if any issues, will backup and snapshot regulary.
Please tell me what exact card you used?
Btw, used samsung 8GB for 3days->dead :slight_smile:


SD cards don’t last long when you are logging a lot to the database. I had 2 cards fail in a year before I gave up on them and went to a USB SATA SSD. So far I’ve had that for over a year without issue; hopefully with TRIM enabled it should last a number of years.

People say use high quality SD cards but the second one of mine was Samsung Pro so not cheap, and it lasted like a month or two longer than the cheap one. The SSD was only a few bucks more to buy.


SanDisk Extreme Pro 32GB card here. Been running Home Assistant on an RPi 3 with this card for over 1.5 years now. I have a fairly extensive config and keep a 7 day database with MariaDB. No corruption issues. Be selective with your logging.

I did crap out a couple of cheapo cards way back in the day.


I have exactly the same configuration. 7 days recording, the size of the database is 80MB. Works since 1.5 years now.

1 Like

How are you doint the 7 day limit and where can i set logging levels? Some settings, or configs?

Through the recorder integration.

1 Like

Thx man for info!

There’s a thread on writing log files to a NAS rather than the SD card here. Reduces SD read/write activity significantly and prolongs the life of the card.

you mean all logs, even state history?
Or just system logs in Conf->logs

The file home-assistant.log remains on the SD card in the config folder (but very small - only 119kb on my system at present). The rest goes to a database on the NAS (currently 0.3gb).

So if network is down (router restart), your HA is dead in the water?

Isn’t it anyway? :grin:

i think no :slight_smile:
because the HA is the master all other stuff is slaves.
i might think the HA may go crazy that there is no DB, trying to create etc.
I might be wrong…
Somebody with exp might give some word

No, it will continue to work, you’ll get some error message about recorder, history, etc. not working, and you can of course not look at the history of an entity or similar things related to the DB, but HA runs fine. HA doesn’t need the database to operate, I had a HA instance running for testing for 6 months without any DB at all.

i see , noice! thx for update

So you are saying that all the triggers and automations worked, but without the history? correct?

It depebds, if your automation relies on historical data it won’t work, otherwise they run fine. Why shouldn’t they? When you have an automation that triggers on motion, why should it depend on history? This would be really bad design.

yeah agree

I have the same problem with 2 SD cards giving up. It’s probably due to how frequently home assistant (HA ) writes to the SD. I am not a database person so can someone share how they setup HA to use an external database for recorder integration? I have seen the documentation on it and read up some other links etc but haven’t had much luck. I would like to use mysql database on a Windows machine running on the same network. If possible, try to get HA to write all the logs, and history information to this separate machine and database. Any help would be appreciated