[systemd-devel] Journal Log Persistence without restart of service

Mantas Mikulėnas grawity at gmail.com
Mon Apr 25 04:53:31 UTC 2016


On Mon, Apr 25, 2016 at 7:49 AM, Umut Tezduyar <umut at tezduyar.com> wrote:

>
> > On Apr 25, 2016, at 5:43 AM, Andrei Borzenkov <arvidjaar at gmail.com>
> wrote:
> >
> > 24.04.2016 19:24, Renjith Vijayan пишет:
> >> Hi All,
> >>
> >> I am trying to make journal logs persistent across reboots in my
> platform.
> >> Currently /var/log is mounted on volatile partition in the platform.
> >> I have a non-volatile partition mounted at /var/diagnostics.
> >> So i made the following change in tmpfile.d service config
> >> file(volatile.conf) to create a symlink.
> >>
> >> L+ /var/log/journal 0666 root root - /var/diagnostics/logs
> >>
> >> Also, the following changes to make logs persistent is done in
> >> journald.conf file.
> >> Storage=persistent
> >>
> >> But still when the system boots up it takes the run time journal path &
> no
> >> files are present in /var/log/journal directory..
> >> *systemd-journal[114]: Runtime journal is using 8.0M (max allowed
> 392.4M,
> >> trying to leave 588.6M free of 3.8G available â current limit 392.4M).*
> >> *Jan 09 05:18:58 ops-as5712 systemd-journal[114]: Runtime journal is
> using
> >> 8.0M (max allowed 392.4M, trying to leave 588.6M free of 3.8G available
> â
> >> current limit 392.4M).*
> >> *Jan 09 05:18:58 ops-as5712 systemd-journal[114]: Journal started*
> >> *Jan 09 05:18:58 ops-as5712 systemd-journal[114]: Runtime journal is
> using
> >> 8.0M*
> >>
> >> After i restart the systemd-journald service, the logs are becoming
> >> persistent & getting stored in the permanent partition.
> >>
> >> Could somebody point out what needs to be done to make it persistent
> >> without the restart of systemd-journald service?
> >
> > Send SIGUSR1 to journald.
> There is a service to do that and it is enabled by default. It must have
> been disabled for you. It is systemd-journal-flush.service.


Actually I'm guessing that it's enabled but runs too soon, since it does
not know about the symlinking that's about to happen.

It might need to be extended with:

[Unit]
After=systemd-tmpfiles-setup.service
RequiresMountsFor=/var/diagnostics/logs

-- 
Mantas Mikulėnas <grawity at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160425/a0951921/attachment-0001.html>


More information about the systemd-devel mailing list