CertGrid CertGrid
Hands-on Lab·Red Hat Certified System Administrator

Persistent systemd Journal Configuration

By default the journal lives on tmpfs and is destroyed at every reboot - so the logs explaining why a machine went down are gone by the time you can read them. This configures persistence and then actually reboots the machine to prove it, which is the only honest way to demonstrate the objective.

Operating Running Systems Guide 29 of 67 Intermediate

Storage=auto is the default: use /var/log/journal if that directory exists, otherwise /run/log/journal. So creating the directory is half the configuration, and on many systems it is the *whole* of it. Setting Storage=persistent makes the intent explicit and creates the directory if needed.

Every command on this page runs on RHCSA-A01.
Server NameIP AddressOSRolesCPURAMHDD
RHCSA-A01192.168.0.31RHEL 10.0Practice node (graded) - spare /dev/sda2 Core4 GB50 GB + 15 GB

This guide includes

Use this before you need yesterday's logs. This matters because the journal lives on tmpfs by default and is destroyed at every reboot - and restarting the service is not the same thing as migrating it.

Before you start

  1. Where it is stored, and why that is a problem

  2. Configuring it with a drop-in

  3. Restarting is not migrating

  4. A marker, and then a reboot

  5. After the reboot

  6. Reading a previous boot, and capping the size

Official sources