Pi Reliability: Reduce writes to your SD card # Chris Dzombak

submited by
Style Pass
2024-04-02 10:00:07

If you aren’t using a read-only filesystem on your Raspberry Pi, you should reduce the amount of stuff that gets written to its SD card. This will help increase the card’s lifespan and keep your Pi running smoothly.

This Stack Exchange post suggests disabling journaling for the Pi’s filesystem. Don’t do this. While this change might reduce SD card wear, it makes your Pi more likely to face filesystem corruption in the event of a crash or power outage.

The changes outlined in this post are not without risk, and you should only use any given intervention if you understand what it will do. (See my Pi Reliability post on risk vs. benefits.)

This Stack Exchange thread notes that /var/tmp shouldn't be discarded on reboots, and I don't see much there on any of my Pis, so I've opted to leave it on the SD card.

Working from a list of the largest logs, reduce or disable logging for the relevant services. This is particularly important if you opt to write logs to disk; less so if you log only to RAM.

Leave a Comment