[systemd-devel] making journald logs persistent on raspberry pi
Dave Howorth
systemd at howorth.org.uk
Fri Jan 24 15:32:32 UTC 2020
It's quite common on the Raspberry Pi to make /var/log a tmpfs, in
order to reduce the number of writes to the SD card that is the pi's
main storage. That's quite acceptable for most logs but I'd like to
make journald's logs persistent so I'll be able to investigate any
problems that occur whilst booting or shutting down more easily.
My first thought was to configure journald to write the log somewhere
else, but it seems there's no possibility to do that? (why not?)
So I think I will need to create /var/log/journal as a symlink to a
directory in a permanent filesystem. The symlink needs to be created
after the tmpfs is created but before journald starts (or else journald
will need to be told to notice the change).
My systemd foo isn't up to that and a web search hasn't found an answer.
What's the best way to do it please?
TIA, Dave
More information about the systemd-devel
mailing list