Extend the life of your Rasberry Pi SD card.

This is a simple one.  Continuously writing logs to a Pi SD card will reduce it’s life span.

Simply add these lines to your /etc/fstab file to move them to the tmpfs (memory disk).

tmpfs /tmp tmpfs defaults,noatime,nosuid,size=100m 0 0
tmpfs /var/tmp tmpfs defaults,noatime,nosuid,size=30m 0 0
tmpfs /var/log tmpfs defaults,noatime,nosuid,mode=0755,size=100m 0 0

The downside is you lose your logs every reboot.  This however is not an issue, if your pi is crashing and you need the logs, simply comment out the lines until you resolve the issue.

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.