Hey everyone,
SD card wear is a scare story and overrated in my opinion. Every SD card utilizes a technique called wear leveling, distributing writes to the SD card evenly over the available free memory.
I did a few measurements a while back. Sampled the writes to the SD card on my production openHAB RPi for one week, projected the results up to a year and threw the result at the promised (SanDisk) write cycles of 10β000-100β000. Even when taking the lower end of this promise plus a small 16GB SD card as an example, the SD card will supposedly survive 318 years
The following article suggests, that it is more important to have a reliable and uninterrupted power supply: http://hackaday.com/2016/08/03/single-board-revolution-preventing-flash-memory-corruption
For solutions you can for example have a look at: http://pimodules.com
Iβm not saying SD cards donβt fail. Just as any other hardware, an SD card can suffer from a production problem or random failures, or simply have a bad day. For SD cards this is especially critical because the error comes in silence and the card can become unusable from on second to the other. So despite what I said above, the fear of SD card failure is real, just out of a different reason.
(I started working with RPis in May 2012 and since lost two 4GB SD cards to an write lock error of Transcend cards of that time. However there were reports by many others with less luck.)
You should concentrate on the real issue. Instead of making your home automation system less flexible (adding peripherals to an SBC) and less useful by crippling your base (making root ro or log a tmpfs), you should invest a few minutes of your time to apply some backup strategyβ’, solving the above and many other concerns in the right way.
Jm2c
For everyone who wants to reproduce the mentioned experiment: Here is the command to execute on your system that will generate hourly read/write statistics. Run it the command in a screen
shell for a few days, then analyze the data collected.
iostat -dk 3600 >> iostat_hrly.log
Afterwards use the following table to generate your own statistics: