A Linux system administrator notices that the journal logs on a production server are not persistent across reboots, which is necessary for troubleshooting ongoing issues that occur after system restarts. What's the BEST step the administrator should take to ensure journal logs are retained after a reboot?
You selected this option
Create the /var/log/journal directory and restart the systemd-journald service.
You selected this option
Modify the 'Storage=' setting in '/etc/systemd/journald.conf' to 'persistent' and reboot the server.
You selected this option
Reboot the server to trigger a new instance of systemd-journald, which will then keep the logs.
You selected this option
Implement logrotate on /run/log/journal to ensure the logs are preserved after reboots.
The correct answer is to create the /var/log/journal directory. The systemd journal will store its logs persistently if this directory exists. Without it, logs are stored in /run/log/journal and are volatile. Changing the storage setting in 'journald.conf' without creating the directory, or just rebooting the server, will not have the desired effect of making logs persistent. Implementing log rotation is good practice for managing log size but does not affect whether logs are retained across reboots.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the purpose of the journal logs in Linux systems?
Open an interactive chat with Bash
What does it mean for journal logs to be persistent?
Open an interactive chat with Bash
What is the role of the 'Storage=' setting in '/etc/systemd/journald.conf'?