Prepare the standard location for journal data that must survive reboot.
Which directory is appropriate?
/var/log/journal is the standard persistent journal directory. /run/log/journal is normally volatile.
Detailed explanation
/run/log/journal/Incorrect. /run is normally cleared on reboot.
/var/run/journal/Incorrect. /var/run is compatibility-linked to /run.
/var/log/journal/Correct. /var/log/journal is the standard persistent location.
/etc/systemd/journal/Incorrect. /etc/systemd/journal is configuration, not journal data storage.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' /run/log/journal/ /var/log/journal/Expected result
volatileとpersistentの2つの候補Key points
- /run is volatile
- /var/log is persistent
- Check Storage configuration
Notes
- Environment: printf / ディレクトリ作成なし
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Syslog facility and priority
Metadata that classifies a message source and its severity.
Journal persistence
Whether systemd journal data survives a reboot and where it is stored.
Log rotation
A process that retains, renames, compresses, or removes log generations.