Power Cycle question

Hi all!

I’ve lost household power several times (so far no issue other than an IP address change) but would like to know if a loss of power/power cycle will corrupt the SD card/render Rhasspy unusable?

Currently, the headless RPi 4 is only used for Rhasspy (Docker + Node-RED) and I was reading the below as a possible solution if able?

Power cycling RPi - Product support / balenaOS - balenaForums

Alternatively, I’ve looked into a few UPS’ but would prefer to avoid if no risk/risk can be mitigated of sporadic power cycles .

Thanks!

Well, in general, cutting power to a machine like a Pi or laptop is potentially dangerous.
So yes, a power outage could corrupt the sd card.
That said, I often just pull the plug an a Pi instead of reboot/shutdown and never had any issues.

1 Like

Using a SSD instead of the SD card is another popular approach. Fortunately there are a number of options (especially given that a RasPi 4 is fairly low power). It all comes down to the impact and risk of a failure vs the cost and complexity of a solution.

Personally I make sure I have a backup and a copy of the microSD card. Easy and cheap - but i expect it will take a while before I notice the outage and swap SD cards.

1 Like

Thank you for the responses! I’ve backed up the SD card in the meantime as well.

What are you thoughts on the linked/below option @romkabouter @donburch ?

"
Hi @koyaanisqatsi,

You’re correct that a sudden power-cycle can invalidate data in the SD card. We’ve actually designed balenaOS to mount root partition as read-only, to ensure the host OS is stateless. More information about the architecture here .

Moreover, balenaEngine syncs directly to disk as it pulls any image (as opposed to docker/moby, which pulls to memory first), and unless the whole of the image arrived it won’t be used.

The above means that the devices are protected against power-cycle/loss. This doesn’t include application data though. If your application does write to disk, you’ll need to make sure such cases are taken care of.

Hope this helps!

Cheers,
Nico.
"

Rhasspy writes to disk (the profile).
But my previous statements still stand. Yes, potentially damage but I have never had any issues.

Okay great, thanks again!