After troubleshooting a production server, you discover that every reboot clears the historical journal, and journalctl --list-boots shows only the current boot. The file /etc/systemd/journald.conf is unchanged from its default and still contains Storage=auto. You need systemd-journald to begin retaining logs across reboots immediately, without editing the configuration file or restarting services. Which single action will accomplish this goal?
Append ForwardToSyslog=no to /etc/systemd/journald.conf.
Run systemctl restart systemd-journald after every boot.
Create the directory /var/log/journal with the appropriate permissions.
Add Storage=volatile to /etc/systemd/journald.conf and reload systemd.
With the default Storage=auto setting, systemd-journald writes logs to the volatile directory /run/log/journal unless the persistent directory /var/log/journal already exists at boot time. Simply creating that directory (and ensuring correct ownership and permissions) causes journald to switch to on-disk storage automatically and keeps logs after subsequent reboots.
Restarting the service after each boot does not change where data are stored, adding Storage=volatile forces the opposite of what is required, and ForwardToSyslog=no only controls message forwarding and has no effect on persistence.
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.
Why does creating `/var/log/journal` enable log persistence?
Open an interactive chat with Bash
What permissions and ownership are required for `/var/log/journal`?
Open an interactive chat with Bash
What is the difference between `Storage=auto` and `Storage=volatile` in journald?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Security
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access