<div dir="ltr"><div dir="ltr">On Fri, Jan 24, 2020 at 5:32 PM Dave Howorth <<a href="mailto:systemd@howorth.org.uk">systemd@howorth.org.uk</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">It's quite common on the Raspberry Pi to make /var/log a tmpfs, in<br>
order to reduce the number of writes to the SD card that is the pi's<br>
main storage. That's quite acceptable for most logs but I'd like to<br>
make journald's logs persistent so I'll be able to investigate any<br>
problems that occur whilst booting or shutting down more easily.<br>
<br>
My first thought was to configure journald to write the log somewhere<br>
else, but it seems there's no possibility to do that? (why not?)<br>
<br>
So I think I will need to create /var/log/journal as a symlink to a<br>
directory in a permanent filesystem. The symlink needs to be created<br>
after the tmpfs is created but before journald starts (or else journald<br>
will need to be told to notice the change).<br>
<br>
My systemd foo isn't up to that and a web search hasn't found an answer.<br>
What's the best way to do it please?<br></blockquote><div><br></div><div>Mount --bind a persistent directory on top of /var/log/journal, using the same method that you currently use for mounting the tmpfs.</div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Mantas Mikulėnas</div></div></div>