2 ms·
Thanks for sharing, didn't know that. Similar PSA: a common Pi complaint is that SD cards wear out quickly under 24/7 use. Routing most logs to memory rather t
by lukifer 5y ago
Thanks for sharing, didn't know that.
Similar PSA: a common Pi complaint is that SD cards wear out quickly under 24/7 use. Routing most logs to memory rather than disk vastly reduces the wear on the SD: https://github.com/azlux/log2ram https://github.com/azlux/log2ram
- ars 5y agoRunning backblocks -n will often fix them (non-destructive read/write - it causes a rewrite of every block on the device). Don't do it often or you'll cause extra wear, but if you find yourself getting random errors from the SD card, give it a try.
- dundarious 5y agoMany services log via journald, so to move those off the SD card, you can just add /etc/systemd/journald.conf.d/volatile.conf with contents below and `systemctl force-reload systemd-journald.service`: [Journal] Storage=volatile Check what your full config is with `systemd-analyze cat-config systemd/journald.conf`. The split file approach is very handy for Pi-s. I have a set of configs I install on any new Pi I get (resolved, locale, timesync, etc.). You can do a very similar thing with services in e.g., /etc/systemd/system/example.service.d/override.conf, which I like to do to constrain their sandbox more than the system package does (ProtectSystem=strict, SystemCallArchitecture=native, SystemCallFilter=@system-service, ~@resources @privileged, etc.)