On Fri, Jan 24, 2020 at 5:32 PM Dave Howorth <syst...@howorth.org.uk> wrote:
> 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? > Mount --bind a persistent directory on top of /var/log/journal, using the same method that you currently use for mounting the tmpfs. -- Mantas Mikulėnas
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel