Comment 3 for bug 1856278

Revision history for this message
Cédric Jeanneret (cjeanner) wrote :

Some more info:
- /var/log/journal should be created by systemd package
- journald is configured with "auto" Storage (the default)
- since we're using VM, I suspect the VM image drops all the log upon creation, and removes /var/log/journal directory in order to provide a clean env (which makes sense)

The "auto" Storage means:
- if /var/log/journal exists, it will switch to "persistent"
- if it doesn't, it will use /run/log/journal, which is volatile (removed upon reboot)

In order to move to persistent, we just need to ensure /var/log/journal exists with correct rights (and setype), journald will switch to it immediately. We can even sync volatile to persistent using "journalctl --flush", but it might take some time.

More to read here:
https://www.golinuxcloud.com/enable-persistent-logging-in-systemd-journald/