BEWARE! If you're using a MicroSD, switch to a HDD NOW!

Why??? Why do you care about storing all these states in the database? How long is your retention time? I exclude pretty much everything and use 2 days…

3 Likes

@Petrica’s post is sensible.

@Valentino_Stillhardt’s experience is legitimate, his SSD died. But it is doesn’t translate without more evidence to a general tendency for HA to to fry SSD drives.

We all know that SD cards are prone to failure. And there are some precautions to take:

  • buy a good one
  • reduce recorder writes
  • don’t pull the power pin out
4 Likes

Where’s the fun in not doing that?! :wink:

Honestly, this is something I CONSTANTLY remind people about: sudo shutdown -h now BEFORE pulling out the power (unless the system is hosed up, obviously).

1 Like

Hi, I can (to some degree) support @Valentino_Stillhardt’s claim.

I’ve killed over the years at least two SD cards before moving to a NUC SSD setup.
That SSD gave up after about 3 years (although I don’t know how old the drive really was).

What I’ve done since (after obviously replacing the drive) is to move the database to the RAM.
I’ve added further 4gig and reduced the recorder to something like 2d … which adds up to ~3gig database size … yes it’s gone after a reboot, but that happens only once every year or so …

JKW

2 Likes

Well, I suppose it’s good practice to limit things anyhow.

So, a bit more pragmatic; What/where are some good documentation/settings on limiting the factors for unnecessary retention/wear/“insert synonyms in the vicinity of said subject”?

Thanks!

1 Like

Had in past 1 SDCard that died. My SSD is running now almost for 2 years without any problem (ohh cheap one from bang good… :slight_smile:

@Valentino_Stillhardt what database engine were you using on the SSD?

And was the database on a separate partition?

What does dmesg tell you about the drive?

What does smarttools tell you?

:joy:

Please read this report. SSDs can survive Petabytes of writes. Your HA instance isn’t likely to achieve that any time soon, even with your “5 pages” of entities (I have about 1K, writing to an SSD for the last 18 months, and that SSD has many other chatty things writing to it - no issues).

1 Like

I’d have a closer look at your power supply. More likely that the lack of sufficient amperage is causing this strange behaviour.

Also I don’t subscribe to the notion of locking posts or shutting down discussion purely on the basis of a post’s title. The mods will pick up on spam quite quickly.

Everyone is entitled to express their experience with HA be it good or bad

1 Like

I’m not sure these statements are consistent?

1 Like

MicroSD cards known issue, SSD nope something else at play here

1 Like

My experience with MicroSD&HA: was only using the official accessories for Rpi 3 running HA, which was then plugged into an UPS. Between 2016 and 2018 I was able to run Home Assistant without any issues whatsoever. Then, suddenly in 2018 the initial MicroSD card died and two others in a single month (I make regular backups so it wasn’t an issue of lost data but of inconvenience).

Went for entry level NUC with Celeron J4005, 8 GB or RAM and the cheapest 120 GB SSD I found at that time and (except for some stupid network configuration stuff that I do from time to time) it is perfect. By the way, I’m nearing 2,500 entities in HA, with 12 GB in SQL database so it is not idling by any means. Having general purpose addons such as MariaDB, InfluxDB or Grafana on the same machine with Home Assistant is useful.

I then use multiple Raspberry Pi 2 (probably even v 1 would have worked fine for most of these tasks) for more than 4, even 5 years, with daily usage and reboots only to install latest SO upgrades, without any MicroSD corruption issues but these are not huge on the I/O side:

  • LibreELEC;
  • MotionEye camera;
  • Phlips Hue Sync clone on Raspbian with Hyperion;
  • NUT server on Raspbian (for NUT I initially went with HA addon but found that the UPS was not recognized).

Kodi runs on hundreds of thousands, maybe even millions, of pi’s. SD card corruption doesn’t seem to be a significant problem. And they use sqlite by default.

2 Likes

I’ve setup mine with MySQL :slight_smile:

me too. Have forever :slight_smile: But there are many many kodi users with a default sqlite database on SD card running kodi, and kodi does write to the database constantly (when playing anyway). I’m not saying it is as heavy as a home assistant with a few hundred entities.

I have gone through 3 new SD cards in a little under a year :frowning: A couple of weeks ago after the last SD card died I changed to a SSD, when I started my install I experienced strange behaviour (wouldn’t connect to the LAN network etc) it turns out it was down to a poor power supply.

Regards

3 Likes

While the recommended manufacturers power supply is used by many this recommendation is based upon using an SD card for operations.

My advice to users operating their RPI with an SSD on the same power rail is to obtain a power supply with a higher rated amperage to cover the additional overhead drawn down by an SSD or consider an SSD with its own external power supply

This article might give a better insight into the powering of an SSD and possible problems that might be encountered. https://burstforum.net/topic/9533/ssd-disks-beware-of-the-amps

1 Like

The default one which ships with HA (sqlite?)

It ran on the same docker container as HA.

Didn’t try dmesg

I did a short check, SMART tells the drive is totally OK
I did a long test, disk unmounts itself after some time and that’s it. All commands fail and I need to recycle power.

That sounds like a power problem more than anything else

1 Like