Red Hat Certified System Administrator RHCSA · Free Practice Question Easy
Question 10
On test.server.com, configure journald to retain log data between reboots.
-
A
Pass
-
B
Fail
Reveal correct answer
Correct answer: A
Explanation
Answer Steps:
Edit the Journald Configuration File
Open thejournald.confconfiguration file in an editor:- # vim /etc/systemd/journald.conf
The
journald.conffile allows you to set parameters for the journal service, such as storage limits, retention policies, and storage location.
Set Persistent Storage
Locate the line with#Storage=autoand modify it to:- Storage=persistent
Setting
Storage=persistentensures that journal logs are saved on disk and remain available across system reboots.
Save and Exit the Editor
PressEscto switch to command mode in Vim, then type:wqfollowed byEnterto save the changes and exit.Restart the Journald Service
To apply the changes immediately, restart thesystemd-journaldservice:- # systemctl restart systemd-journald.service
Explanation:
By configuring
journaldwithStorage=persistent, logs are retained between reboots, ensuring continuity in log access for post-reboot analysis and debugging.If you do not restart the service, the new configuration will only take effect after the next reboot.
This setup ensures logs are consistently saved to disk, which is crucial for maintaining a continuous logging history on the system.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
