guysoft / OctoPi

Scripts to build OctoPi, a Raspberry PI distro for controlling 3D printers over the web
GNU General Public License v3.0
2.49k stars 369 forks source link

TMPFS for /var/log folder - 24/7 operation #835

Open NilsRo opened 2 months ago

NilsRo commented 2 months ago

What were you doing?

SD Card broken because of too many writes. It's a common problem so perhaps putting the Log in tmpfs would be helpful. It common for 24/7 builds and embedded devices for e.g. OpenWRT.

FSTAB example: none /var/log tmpfs size=5M,noatime 00

What did you expect to happen?

Less writes to SD Card. Can change this on my own but for common users it could be helpful to enhance live of the SD Card.

What happened instead?

Death of the SD Card

Did the same happen when running OctoPrint in safe mode?

Not related to OctoPrint itself but logging could be optimized there as well.

Version of OctoPi

1.0.0

Printer model & used firmware incl. version

Not related

Screenshot(s)/video(s) showing the problem:

SD Card read errors. ;-)

guysoft commented 1 month ago

Do you have any practical PR to fix this?