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.
Incorrect. /run is normally cleared on reboot.
/var/run/journal/Incorrect. /var/run is compatibility-linked to /run.
Incorrect. /var/run is compatibility-linked to /run.
/var/log/journal/Correct. /var/log/journal is the standard persistent location.
Correct. /var/log/journal is the standard persistent location.
/etc/systemd/journal/Incorrect. /etc/systemd/journal is configuration, not journal data storage.
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
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.