Bug#801906: /etc/systemd/journald.conf: Journal defaults to non-persistent across boots.
Mikhail Morfikov
mmorfikov at gmail.com
Fri Oct 16 10:57:31 BST 2015
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
On 2015-10-15 22:48, Ben Longbons wrote:
> Package: systemd
> Version: 227-2
> Severity: normal
> File: /etc/systemd/journald.conf
>
> Dear Maintainer,
>
> The default configuration of journald loses logs whenever the system is
> rebooted. This is both a regression compared to non-systemd systems as
> well as breaking most systemd-specific debugging tutorials.
>
> The trivial fix is to set Storage=persistent in /etc/systemd/journald.conf
>
> Interestingly, after the next boot, Storage=auto does the same thing
> once /var/log/journal exists. This is mainly of interest to avoid the
> "config file changed" problem when running `aptitude upgrade`, since
> a config option that silently fails to work depending on not-in-/etc
> files is kind of scary.
>
> Note that when journald creates /var/log/journal, it has
> permissions drwxr-sr-x and owner:group root:systemd-journal,
> which is not what users would probably create it with manually.
>
> -- Package-specific info:
>
> -- System Information:
> Debian Release: stretch/sid
> APT prefers testing
> APT policy: (600, 'testing'), (500, 'unstable'), (1, 'experimental')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
>
> Kernel: Linux 4.2.0-1-amd64 (SMP w/4 CPU cores)
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
>
> Versions of packages systemd depends on:
> ii adduser 3.113+nmu3
> ii libacl1 2.2.52-2
> ii libapparmor1 2.10-2+b1
> ii libaudit1 1:2.4.4-4
> ii libblkid1 2.27-3
> ii libc6 2.19-22
> ii libcap2 1:2.24-12
> ii libcap2-bin 1:2.24-12
> ii libcryptsetup4 2:1.6.6-5
> ii libgcrypt20 1.6.3-2
> ii libkmod2 21-1
> ii liblzma5 5.1.1alpha+20120614-2.1
> ii libmount1 2.27-3
> ii libpam0g 1.1.8-3.1
> ii libseccomp2 2.2.3-2
> ii libselinux1 2.3-2+b1
> ii libsystemd0 227-2
> ii mount 2.27-3
> ii sysv-rc 2.88dsf-59.2
> ii udev 227-2
> ii util-linux 2.27-3
>
> Versions of packages systemd recommends:
> ii dbus 1.10.0-3
> ii libpam-systemd 227-2
>
> Versions of packages systemd suggests:
> ii systemd-container 227-2
> pn systemd-ui <none>
>
> -- no debconf information
>
In the manual (http://www.freedesktop.org/software/systemd/man/journald.conf.html),
there's explicitly said that:
Storage=
Controls where to store journal data. One of "volatile",
"persistent", "auto" and "none". If "volatile", journal log data
will be stored only in memory, i.e. below the /run/log/journal
hierarchy (which is created if needed). If "persistent", data will
be stored preferably on disk, i.e. below the /var/log/journal
hierarchy (which is created if needed), with a fallback to
/run/log/journal (which is created if needed), during early boot
and if the disk is not writable. "auto" is similar to "persistent"
but the directory /var/log/journal is not created if needed, so
that its existence controls where log data goes. "none" turns off
all storage, all log data received will be dropped. Forwarding to
other targets, such as the console, the kernel log buffer, or a
syslog socket will still work however. Defaults to "auto".
So if you have "auto", the logs go to the /var/log/journal/ directory only
when the directory already exists. So, in your case, when you've set
"persistent", the system created the directories for you, and when you
switched to "auto" again, the journal was using the directory because it
exists.
-----BEGIN PGP SIGNATURE-----
iQIcBAEBCgAGBQJWIMoAAAoJEM0EaBB3G2UgpisP/RZN9ekregScGTsnrF63sP0d
IuIz/Pc7dEUOFeteQZsNAFpt55mdbchXmWsm5c4NRU54aU2XJIngTJ0Lu8WvLj18
WZ+m/6Q9nbL9PL6rS/wabftHT47UklChtNI2Gm2Zx/8PGz+uD8mI3zehdHZMRYe6
Fgq87yEM/q7Ezuwv/1Y49vMWOgXpQkH1DQyPyI/366CqL45/1QuYyRh9lkaipORD
uq0G/XT52+7kq40y0elLDaflSV9lWAYgs8j0gMq2gCzbCMIqJ/GK73jBWeUZ0rMI
uoVQ2jV8ZkA0Lm2tOWr2VxuMBTnzomC7C1MVUgWaYSoPT6ig1eaguF1DEn4hWxcy
Ptl21xpYZPJTdQqXh9Aq9EwpGSsI/7yLEb09Vp5dpMkbj293myT4J7EfVHx610J5
Z4ZqX9z+KiR9uFzdleyN023LC3+onPah8aHOoHBw1m0nySDvng7g2dtrpxrggB7K
QyM/1YXH5uwA2Or3U84mAaJhIa9DIAr5FKCJbN2HyP9MNhGm6v3FtcBrrkeb7U1j
9FSH2I/4Wpvwtz4T3jsSHDEe0NdFQ4foOzmkWi05BC6UPQ7mbRCIMDvfU0vCarHC
GpbjZKJvjtBMCd2dNYI6xK2F5un31J0ZvZnTtW25nU1FSk38EoRvH5JoPC5mv0EX
nb7fR1VFELCFMkbMZJtd
=E7eV
-----END PGP SIGNATURE-----
More information about the Pkg-systemd-maintainers
mailing list