How long should a good micro sd card last?


#1

How long should I expect a micro sd card to last in the Hassio / Home Assistant environment? I am using Sandisk Ultra and Extreme cards.


#2

If you are worried, best is to use an external database. History read/write is the greatest wear on the card.


#3

I would like to try that, but my old nas is not that good and no way would I try to do that to a cloud service. I do not have nailed up systems in my house, just an old DNS-321. Can I use a USB hard disk, SSD or thumbdrive for the database?


#4

What I do is that I have 2 SD cards on-hand.
When I am ready for an update of HA, I pull the card that’s in my Pi and make a backup copy using ApplePi Baker (or any other image software that you want to use)
I then take the card that I have on “stand-by” and burn that image on it. Insert it in my Pi, boot up and do my update.

With this I accomplish 2 things, 1) less wear and tear on your SD card. 2) if I mess up with my update or something breaks, I have my last known working configuration ready to insert and boot from, no waiting.
So every update, I just Flip-Flop my cards
Hope that helps


#5

I am a windows house… I did not think a complete card could be backed up…


#6

It can’t with Hassio so far as I am aware.

Just keep a snapshot and if worse comes to worse, setup a new system and restore your latest snapshot. I have an automation to run the snapshot backup everyday at 3am and to run the Dropbox add in at 4am so i have plenty of snapshots which are effectively full backups.

I also don’t think you can move the database to a USB if you are using hassio.

If you are using those sandisk cards you might be in trouble lol!


#7

Have been good to me for many years in photo and video. Suggested cards?


#8

Just a hint: The Raspberry 3 can boot and run from a USB stick. I don‘t have an SD card in use and more …


#9

Indeed. I setup a USB to do this but don’t run it that way because there really seems to be no point. Why do you think a USB stick is more robust than an SD-Card? Both use the same technology I think. I asked this question on the hassio USB thread and didn’t get any real answers.

Regards SD-Card? I use a samsung evo plus 32gb and since I switched to that I have not had one crash of home assistant even though I was using a ‘good’ card - and it tested 100%. All I know is they are not all the same.


#10

I do not think a usb stick is better, but a usb SSD or small hard disk would be better. But, not sure I can install and boot from a usb drive.


#11

My SD card has been running HA on my pi for 18 Months without a problem. I think I pulled it from an old phone.

Some people experience problems with sd cards, but most do not. It is sensible to give the SD a try and only worry about it if you have a problem.

Make sure to check the troubleshooting guide from the Pi website. An adequate power supply and proper shutdown procedures seem to be the most important.


#12

Well you can if you want to. There’s pretty good instructions in the hassio forum and I did a blog post with screenshots here as well filling in some of the gaps in the instructions.


#13

I was originally using a ‘noobs’ preinstalled card from the RPi Foundation and I was finding every couple of days my home assistant would completely lock up and need a hard-reboot as I could not restart it from the frontend or ssh. Also using an RPi power supply. When I changed to the Samsung EVO card, I have not had a single instance of this and have never been unable to restart via frontend or ssh. Weird thing is that the noobs card tested perfectly in the HWTEST program but it was definitely the card causing the faults.

There’s a really good thread on Whirlpool about Xiaomi specifically but also discusses sd-cards.


#14

The biggest threat to the SD Card is the power outage. If you don’t have frequent power outages, and do minimal writes they can last years. I’m replacing an SD card every year or so, because I get very frequent power outages and eventually they destroy the SD Card


#15

Does the underlying os use wear leveling? If so the bigger the SD card the better (you’re not writing to the same bits as often).


#16

It’s just a personal experience that USB sticks are substantially more robust than SD cards. I use SD for photography, so they are formatted, filled up, read out and formatted again. USB sticks seem to be designed for more frequent writes. Besides: Because of their size and the port design they are much easier to handle.

But that’s my very subjective opinion.


#17

I understand however I think you will find the actual chip inside them is the exact same type of flash memory. I acknowledge there is a perception that the USB is more robust but it seems to me to be like trying to nail down jello. Every one thinks/says it but it’s a preference with no real evidence to support it.

Nothing at all wrong with having a personal preference.

The weak point is having a good power supply and a quality SD card IMO. Get that right and you will have very little problems.


#18

If you’re not on Hassio then it’s easy - that’s what I’ve done. A good card should then last at least a couple of years, possibly longer. I’ve killed one SD card on a Pi3, through two years of heavy writes on a Plex server.

Similarly you can use rpi-clone to live image a non-Hassio install.


#19

How would you best use rpi-clone? From a cron job? that looks interesting, if you are running it that way, would you be able to share your cron job entry?


#20

I run rpi-clone manually, just before I upgrade HA. That ensures that I can do a quick recovery if it all goes horribly wrong.

It also means if anything goes wrong with creating that backup, I know about it immediately. That’s rather important when you’re over-writing your existing backup with a fresh one :wink: