openhab / openhabian

openHABian - empowering the smart home, for Raspberry Pi and Debian systems
https://community.openhab.org/t/13379
ISC License
822 stars 251 forks source link

Read-only fs to prevent corruption #1564

Closed mueller-ma closed 3 years ago

mueller-ma commented 3 years ago

A read-only filesystem can prevent corruption when the Raspberry is shut down unexpectedly, e.g. on power outage. This doesn't work for fs with logs or cache, but these could be added to zram. This would require to set the fs to rw every time before changing config or making updates, but IMO it's worth it. Most likely this shouldn't be enabled by default.

Is this something you would like to add to openhabian-config?

mstormi commented 3 years ago

Not really TBH. I would consider such an addition if you provided a PR but given the awful lot of things that can go wrong when you start messing with the startup order of mounting and system services (and that we saw go wrong during zram and other development), considering drawbacks such as no permanent logs and that this still will not cover a number of other outage scenarios, no I don't think it's worth it. Easier and less risky to get a UPS.

mueller-ma commented 3 years ago

Ok, I give it a try on my own. Feel free to close this issue. If I get a good result, I'll share it in the forum.

mstormi commented 3 years ago

ok