HA OS destroyed SD cards

Hello all,

Today, after years using Home assistant container, i wanted to switch to HASS OS.

Using HA through docker was fine but it always gave me some hard time to set things up as i’m not used to containers and linux. So i wanted to makes things easier.

BUT, HA OS destroyed TWO sd cards, one of witch was the one who had HA in docker running for several years!
Even worse HA was slower via the OS than via docker.

After turning HA OS off using the frontend button and waiting that my raspberry 4 turned off, I unplugged the sd card and wanted to reformat it to the raspberry pi os using the official raspberry pi imager tool.
By the way i installed HA OS by alos using the imager tool.

But both times, when wanting to reset my sd cards, they showed only 30 mb of remaining memory even tho they are 64gb and 128gb.
And i couldn’t recover the total capacity using windows diskpart or disk manager or other tools.
The disk manager showed only the “allocated” partition of 30 mb. No trace of another unallocated partition whatsoever.

I know it is not recommended to use HA via a SD card but in the beginning i was only testing it with a small setup. I literally have only one light and a temperature/humidity sensor. But because i wanted to expand my setup i did the switch to HA OS.

Because i couldn’t reformat the sd cards anyway (windows showed an error telling me the formatting couldn’t proceed) i wanted to replug them in the rasp Pi4 and launch HA OS thinking it might still be there. But no, definitely gone.

I guess i’ll just have to buy a new SD card to install the raspberry pi OS and return to the docker config while using an external HDD or ssd to write data. But I’m really disappointed (to stay polite) over the HA OS.

Does anyone know why my sd cards remained with 30mb both times? And maybe how I could still try to recover them?

Sincerly

Is this True? I dont believe its recommended but maybe that provide a minimum recommendation.

SSD or HDD are best if you can do it. SD cards cant stand the DB writes i belives. My installs on SD Card i stop recorder to prevent DB writes

You should never use a SD-card. As HA is very data intensive they mention this as well https://www.reddit.com/r/homeassistant/comments/jvwtv1/friendly_reminder_dont_use_a_sd_card_on_a_pi/

The SD card will always fail on you. Hope you had a backup to restore

Your cards aren’t destroyed. They have Linux file system partitions on them that windows can’t read.

3 Likes

Funny, I’m using the same SD card for years with HA, on a pretty large setup. In other words, don’t generalize.

SD cards are fine if you take some precautions. Buy high quality ‘endurance’ type cards with wear leveling, don’t buy them online (fakes), adjust the filesystem parameters to be more SD card friendly (less writes), don’t put the database on the card.

I don’t use HA OS, so I have no experience with that. But people have complained about it being very chatty with fs writes in general and not optimized for SD cards at all. There was a thread on this forum a while ago that detailed some procedures you could follow to make it more SD card friendly. And about the small partition you see, that’s the boot partition, the rest is probably ext4 (or whatever HAOS uses) and can’t be seen by Windows, as Tom noted.

Thanks for the replies.

I used a sd card in the beginning because i wanted to try HA and most tutorials i saw just installed HA on an sd card so I though it was ok. And since one of the cards was used for HA during several years without complaint I just though it was ok to do so.

For the ext4 partition, i didn’t know about it (i’m really not used to linux :sweat_smile:). I’ll try to recover them by installing a linux OS on my computer.

Perhaps it’s not needed… if you have WIN computer sure, it can’t see Linux partitions, but it CAN see card as such. Just insert SD card into PC, go to disk manager and there you should see your card there with “funny” partitions. Just right.-click and delete all partitions, create a new one and you’ll have a working card. Then proceed with HA install as normal.

1 Like

That’s the problem. I can’t via windows. Here’s a snip of what the disk manager of windows see. And i can only reduce or delete the 30mb partition. Nothing else

What’s the problem? delete it…

Then install HA via whatever method you want to use.

I tried to delete it. Didn’t succeed. Ihave the error message which says that the demand couldn’t be taken in charge. Plus i already tried to reinstall either raspberry OS on the sd card via the raspberry pi imager but i can’t because it only sees the 30mb and it’s not sufficient.

I’m sorry if for you it is simple how to resolve my problem but i’m lost here :frowning:

I’m placing this last message for this topic in case someone goes here to seek help in this message.

The cards are indeed dead. I tried to read them using gparted in ubuntu but nothing. Gparted doens’t recognized the disk label. I got the /dev/sdc: unrecognized disk label error and the 64 Gb sd cards still showed one 30 mb partition without another ext4 partition)

It also told me there was a table partition (using all possible partition table available through gparted) missing but when i tried to add one it failed.

I finally tried to relaunch my raspi with the sd cards has I though it should still have HA OS on it (sinds I couldn’t reformat the card) but I got this

So i’m not an expert but i thinks it is clear the cards are dead. even more when i took them out of the raspi, one add a burn mark on it…

Lesson learned i will use an ssd next time. And yes luckily I had made a back-up.