Persistent journal is missing on fresh install of Gentoo Linux. This is related to the Bug #678758 This commit https://gitweb.gentoo.org/repo/gentoo.git/commit/sys-apps/systemd?id=2d3ac449e2125b58ca0d946ad21b8173054b446e replaced "keepdir /var/log/journal/remote" with "rm -rf "${ED}"/var/log || die". The result is the missing /var/log/journal/ directory. It is not autocreated by systemd and only runtime journal is used: systemd-journald[1805]: Runtime journal (/run/log/journal/efacc5fc0559c31034aa3bb25d30743f) is 8.0M, max 97.2M, 89.2M free.
# emerge -pqv systemd [ebuild R ] sys-apps/systemd-242-r6 USE="acl elfutils gcrypt idn kmod libidn2 lz4 lzma pam pcre seccomp (split-usr) sysv-utils -apparmor -audit -build -cryptsetup -curl -dns-over-tls -gnuefi -http -importd -nat -policykit -qrcode -resolvconf (-selinux) -test -vanilla -xkb" ABI_X86="(64) -32 (-x32)"
I've made some tests. It seems that /var/log/journal just should exist on system boot. systemd automatically sets correct permissions and creates necessary subdirectories, but doesn't automatically create the directory itself. "keepdir /var/log/journal" should fix the issue.
This change was made intentionally. If the sysadmin wants persistent logs, they should create the directory as part of the system setup process. This is documented in the manpage for systemd-journald. Maybe we should document it somewhere more visible to the average user?
This is a major distribution-specific policy change, this shouldn't go without any notice. Another distributions either 1) enable persistent journal by default 2) use rsyslog by default and disable persistent journal to avoid duplication of logs Enabling it seems to be a safer default than not having persistent logs at all.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa3fae8d768c871af0574da9ea81d7282e83036d commit aa3fae8d768c871af0574da9ea81d7282e83036d Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2019-07-31 23:51:03 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2019-07-31 23:52:09 +0000 sys-apps/systemd: keepdir /var/log/journal Closes: https://bugs.gentoo.org/691116 Package-Manager: Portage-2.3.69_p9_p14210, Repoman-2.3.16_p18_p14210 Signed-off-by: Mike Gilbert <floppym@gentoo.org> sys-apps/systemd/systemd-242-r6.ebuild | 5 ++--- sys-apps/systemd/systemd-243_rc1.ebuild | 5 ++--- sys-apps/systemd/systemd-9999.ebuild | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-)