This, this I learned the hard way.
I have a number of Raspberry Pi devices around the house performing various functions, from retro game emulation to radio monitoring, but the one that sees the most use is the one running Domoticz – the home automation software. Like most of my Pi builds it runs on top of Raspbian Jessie Lite a Unix-like OS based on Debian and optimised for the Pi.
The logging for Domoticz and some of the associated home automation services can be pretty heavy. And SD cards really don’t like it when you write – and overwrite – lots of data. My first two builds of Domoticz were on 8GB SD Cards. Both survived about 90 days before suffering IO errors. Turns out that the volume of logs being written had beaten the wear-leveling on the card and it was struggling to write anything.
So, how do you run a Unix-like system on a Pi as a headless, long-term server, without periodically killing and replacing the card? Continue reading