A Linux administrator finds that journal logs vanish after every reboot, hindering analysis of issues that occur early in the boot process. The server is using the default journald configuration (Storage=auto). Which action will most effectively ensure that logs are retained across future reboots?
Create the /var/log/journal directory and restart the systemd-journald service.
Change the Storage= setting in /etc/systemd/journald.conf to "volatile" and reboot the server.
Configure logrotate on /run/log/journal to archive the logs before shutdown.
Simply reboot the server to let a new journald instance retain the logs.
Creating the /var/log/journal directory causes systemd-journald-whose default Storage=auto setting checks for this path at boot-to switch from volatile to persistent storage. Restarting (or flushing) the journald service after the directory is created is sufficient; subsequent reboots continue to use persistent files. Setting Storage=volatile explicitly disables persistence, logrotate only manages file size, and merely rebooting does not change the storage location.
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 journald service in Linux?
Open an interactive chat with Bash
What does the Storage=auto setting do in journald?
Open an interactive chat with Bash
How can I make journald logs persistent across reboots?