Pi SD + USB vs USB Boot only?

In my parents and my house I am using a Raspberry Pi zero 2 w and 3B+ respectively.

On the Zero 2 W we are currently using an SD card, pending an adaptor for USB booting (issues with corrupt SDs).

However I had a thought - is it more sensible to boot off the SD and use the USB as the data disk? Thereby separating the stressed write data disk and the OS disk? Or will the SD still wear from reads/OS writes anyway?

The SD will wear out. Period. It’s a fact of the matter of the technology. You may delay it. But.

Personally, Id put the effort into figuring out how to get onto something that supports an SSD.

Probably, as when your USB Stick dies because the flash cells are quickly worn out (thank’s write amplification! :fast_forward:) at least HaOS can still boot from SD (obviously all your individual data will be gone at this point).

A better approach would be to use a (good/brand) SSD or even a good old spinning drive :minidisc:

A SSD will also wear out :grimacing:

Because they use the same (not) secret sauce as SD cards and USB sticks (flash cells). But if you choose a good SSD it can cope better with the small sequential writes HA is hammering in the database :hammer:. That’s because SSD controllers use any available trick as wear leveling, garbage collection, error detection & correction beside read & write caching - often with a extra long lasting SLC.

I expect the old good hard disk to last longer actually than a SSD for the type of writes HA is producing - maybe you got a old one laying around you could connect via the USBs to the raspi and call it a day :walking_man:

It’s also possible to tweak a supervised HA system to avoid this small writes but “cluster” them to bigger junks and - for example - just flush the real writes only every 10 minutes to your flash storage. My first HA install was actually something like this and the sd card was going strong for over 2 years before I switched the device (the sd card is still working as of today :tada:).

How do you do this?

Many thanks for your reply.

Well, back in the day armbian just did this for me by default :white_check_mark:

  • commit=600 to flush data to the disk every 10 minutes (/etc/fstab)

But meanwhile the situation also improved a bit for HaOS. :+1:

Now the commit interval is not the default (from the hard disk stone age) of 5 seconds but 30 instead. :bar_chart:

If you really want your cheap flash cells to last long just install supervised and set the commit interval at the OS level to an insane high value Or probably not anymore :slightly_frowning_face: :point_down:

that was different back in the days (no long term statistics at all :joy:) when I had HA running on a $10 SBC

I am also wondering about whether I should move my whole HA OS over to my SSD from the SD card, or just move the data disk.
It seems like the data disk is responsible for most of the SD card writes that will lead to the card wearing out, but I am sure the OS contributes a bit as well. In terms of speed improvements, though, it seems like the best case for performance would be for the entire OS + data to be on the SSD. Is there a consensus on this?

I was reading this guide for moving the data disk, and it says the following:

This hybrid scenario is fully supported by Home Assistant and some say it is even more reliable than booting the Home Assistant from USB entirely. Of course, it can be much faster than staying with SD card only. In other words you are getting the best of both worlds and everything is official and supported.

However, I am not really sure what evidence backs up the claim that it is more reliable to only have the data on the SSD, and keep the OS on the SD. Open to thoughts on this, thanks!

From my perspective the complexity of the install says no. I can get a reasonably priced M.2 that’s both faster and orders of magnitude larger than a SD card. It’s not worth the effort of a nonstandard configure (read more potential for issues) just to save a couple dollars to keep an SD card that WILL eventually fail.

Id just move and cut from thw SD entirely.