Study guide
10.2 Preserve System Journals
Red Hat Certified System Administrator RHCSA
Track your progress as you read
Finished sections get a check mark.
1 Introduction & Exam Overview
1.1 Current Exam Facts 1.2 Lab Setup & Performance-Based Study Strategy
2 Essential Tools: Shell, Redirection & Text Analysis
2.1 Shell Prompt and Command Syntax 2.2 Input-Output Redirection and Pipes 2.3 grep and Regular Expressions for Text Analysis
3 Essential Tools: Remote Access, Users & Text Editing
3.1 Access Remote Systems Using SSH 3.2 Log In and Switch Users in Multiuser Targets 3.3 Create and Edit Text Files
4 Essential Tools: Files, Links & Archives
4.1 Create, Delete, Copy, and Move Files and Directories 4.2 Hard and Soft Links 4.3 Archive and Compress with tar, gzip, and bzip2
5 Essential Tools: Permissions & System Documentation
5.1 List, Set, and Change Standard ugo/rwx Permissions 5.2 System Documentation: man, info, and /usr/share/doc
6 Manage Software: RPM and Flatpak
6.1 Configure Access to RPM Repositories 6.2 Install and Remove RPM Software Packages 6.3 Configure Access to Flatpak Repositories 6.4 Install and Remove Flatpak Software Packages
7 Create Simple Shell Scripts
7.1 Conditional Execution: if, test, and [] 7.2 Looping Constructs for Files and Input 7.3 Process Script Inputs ($1, $2, and Beyond) 7.4 Process Shell Command Output in Scripts
8 Operate Running Systems: Boot and Recovery
8.1 Boot, Reboot, and Shut Down a System Normally 8.2 Boot Systems into Different Targets Manually 8.3 Interrupt the Boot Process to Gain Access
9 Operate Running Systems: Processes and Tuning
9.1 Identify and Kill CPU/Memory Intensive Processes 9.2 Adjust Process Scheduling 9.3 Manage Tuning Profiles
10 Operate Running Systems: Logs, Services & File Transfer
10.1 Locate and Interpret System Log Files and Journals 10.2 Preserve System Journals 10.3 Start, Stop, and Check Status of Network Services 10.4 Securely Transfer Files Between Systems
11 Configure Local Storage: Partitions and LVM
11.1 List, Create, and Delete Partitions on GPT Disks 11.2 Create and Remove Physical Volumes 11.3 Assign Physical Volumes to Volume Groups 11.4 Create and Delete Logical Volumes
12 Configure Local Storage: Mounting and Expansion
12.1 Mount File Systems at Boot by UUID or Label 12.2 Add Partitions, Logical Volumes, and Swap Non-Destructively
13 Create and Configure File Systems: Local FS and Permissions
13.1 Create, Mount, and Use VFAT, ext4, and XFS File Systems 13.2 Extend Existing Logical Volumes 13.3 Diagnose and Correct File Permission Problems
14 Create and Configure File Systems: NFS and autofs
14.1 Mount and Unmount Network File Systems Using NFS 14.2 Configure autofs
15 Deploy and Maintain: Scheduling, Services & Targets
15.1 Schedule Tasks with at, cron, and systemd Timers 15.2 Start, Stop, and Enable Services at Boot 15.3 Configure Systems to Boot into a Specific Target
16 Deploy and Maintain: Time, Software Updates & Bootloader
16.1 Configure Time Service Clients 16.2 Install and Update Software from CDN, Remote Repos, and Local Files 16.3 Modify the System Bootloader
17 Manage Basic Networking
17.1 Configure IPv4 and IPv6 Addresses 17.2 Configure Hostname Resolution 17.3 Configure Network Services to Start Automatically at Boot 17.4 Restrict Network Access Using firewalld and firewall-cmd
18 Manage Users and Groups
18.1 Create, Delete, and Modify Local User Accounts 18.2 Change Passwords and Adjust Password Aging 18.3 Create, Delete, and Modify Local Groups and Memberships 18.4 Configure Privileged Access
19 Manage Security: Firewall, umask & SSH Keys
19.1 Configure Firewall Settings with firewall-cmd and firewalld 19.2 Manage Default File Permissions 19.3 Configure Key-Based Authentication for SSH
20 Manage Security: SELinux Modes and Contexts
20.1 Set Enforcing and Permissive Modes for SELinux 20.2 List and Identify SELinux File and Process Contexts 20.3 Restore Default File Contexts
21 Manage Security: SELinux Ports and Booleans
21.1 Manage SELinux Port Labels 21.2 Use Boolean Settings to Modify SELinux Settings
10.2 Preserve System Journals
Key Takeaways Explain This Topic AI
By default journals may live only in volatile storage under /run/log/journal and are lost on reboot—EX200 expects you to make journals persistent when asked.
Persistence is achieved by creating /var/log/journal (and correct ownership/context) and/or setting Storage=persistent in journald.conf, then restarting systemd-journald.
Verify with ls /var/log/journal, journalctl --sync, and the ability to read previous boots via journalctl -b -1 after a reboot.
Storage=volatile, auto, persistent, and none in /etc/systemd/journald.conf control journald behavior—know persistent vs volatile for the exam.
Preserving journals is configuration that must survive reboot; confirm journald is running and disk space under /var is adequate.
Last updated: August 2026
10.2 Preserve System Journals
Quick Answer: Make journals survive reboot by enabling persistent storage : create /var/log/journal and/or set Storage=persistent in /etc/systemd/journald.conf , then systemctl restart systemd-journald . Confirm journals appear under /var/log/journal and that journalctl -b -1 works after a reboot.
Why “preserve journals” is its own objective
Section 10.1 taught you to read logs. This objective teaches you to ensure journal data is kept on disk across reboots. On many RHEL installs, journald defaults to a mode where if /var/log/journal does not exist, journals stay in /run (tmpfs) and vanish on reboot . That breaks post-mortem analysis of the previous boot—exactly what you need after a failed change.
Typical EX200 wording:
- “Configure the system so that systemd journals are persistent.”
- “Ensure journal logs are preserved across reboots.”
- “Store journals under /var permanently.”
Success criteria: journals written under /var/log/journal , journald running with persistent storage, and previous boots still queryable after restart.
Volatile vs persistent storage
Mode Location Survives reboot?
- Volatile /run/log/journal No (tmpfs cleared)
- Persistent /var/log/journal Yes (on the root or /var filesystem) ls -la /run/log/journal
- ls -la /var/log/journal
If only /run/log/journal/<machine-id>/ exists and /var/log/journal is missing, you are almost certainly not preserving journals yet.
- Also check: systemd-detect-virt # optional context
- df -h /var /run
- hostnamectl # machine identity; journal dirs often named by machine-id
- cat /etc/machine-id
Journal files live in a subdirectory named after the machine-id .
- Configuration file: journald.conf
- Primary config: sudo grep -E '^[#[:space:]]*Storage' /etc/systemd/journald.conf
- sudo less /etc/systemd/journald.conf
- Key setting: [Journal]
- Storage=persistent
- Storage= value Behavior (summary)
- volatile Only /run/log/journal ; lost on reboot
persistent Prefer /var/log/journal ; create if needed (per man page behavior); fall back to volatile if /var unavailable early
- auto Use persistent if /var/log/journal exists; otherwise volatile (common default philosophy)
- none No journal storage (forwarding only)—avoid unless a task explicitly wants this
Exam-safe approach used widely in Red Hat training:
Set Storage=persistent or ensure the directory exists for auto .
Create /var/log/journal explicitly.
Restart systemd-journald .
Reboot and verify previous boot still readable.
- Drop-in snippets are also valid: sudo mkdir -p /etc/systemd/journald.conf.d
- sudo tee /etc/systemd/journald.conf.d/persistent.conf <<'EOF'
- [Journal]
- Storage=persistent
- EOF
Prefer either editing the main file carefully (uncomment/change Storage= ) or a drop-in—do not leave conflicting unknown customizations. On the exam, the simplest clear change that matches man page guidance is best. # Example: uncomment/set in main file with your editor
- sudo vim /etc/systemd/journald.conf
- # Storage=persistent
- Creating /var/log/journal (directory method)
Even with Storage=auto , creating the directory is a classic persistent-journal enablement: sudo mkdir -p /var/log/journal
sudo systemd-tmpfiles --create --prefix /var/log/journal
# or ensure ownership aligns with journald expectations:
sudo ls -ld /var/log/journal
After restarting journald, you should see a machine-id directory and *.journal files: sudo systemctl restart systemd-journald
- sudo ls -la /var/log/journal
- sudo ls -la /var/log/journal/$(cat /etc/machine-id)
SELinux note: On enforcing systems, label issues are rare if you use mkdir on /var/log and let journald/tmpfiles set up, but if journals fail oddly, check context: ls -ldZ /var/log/journal
- # restorecon if you copied trees oddly
- sudo restorecon -Rv /var/log/journal
- Restart and flush sudo systemctl restart systemd-journald
- systemctl is-active systemd-journald
- sudo journalctl --flush # ask journald to flush to persistent storage when applicable
- sudo journalctl --sync # sync
systemctl restart systemd-journald is the usual post-config step. Avoid killing journald with kill -9 as a “fix.”
Verification that actually proves the objective
Live checks (before reboot) # Persistent directory populated?
sudo find /var/log/journal -type f | head
# Config effective?
- systemd-analyze cat-config systemd/journald.conf 2>/dev/null || true
- grep -R Storage /etc/systemd/journald.conf /etc/systemd/journald.conf.d 2>/dev/null
- After reboot (gold standard) sudo systemctl reboot
- # log back in
- journalctl --list-boots
- journalctl -b -1 -n 20 --no-pager
If -b -1 shows historical messages, persistence works. If --list-boots only shows the current boot and /var/log/journal is empty, recheck Storage= and directory creation.
- Runtime storage indication sudo journalctl -n 1 -o verbose | egrep '_BOOT_ID|_MACHINE_ID|SYSTEMD_IN_INITRD'
- ls /run/log/journal /var/log/journal
Seeing active journal files under /var/log/journal is the practical proof used in labs.
- Size limits and vacuum (supporting skills)
- Persistent journals consume disk . journald enforces limits via settings such as: SystemMaxUse=
- SystemKeepFree=
- SystemMaxFileSize=
- RuntimeMaxUse=
- Manage growth: journalctl --disk-usage
- sudo journalctl --vacuum-size=200M
- sudo journalctl --vacuum-time=2weeks
- sudo journalctl --vacuum-files=5
EX200 may not demand vacuum, but if /var fills, services fail—know that preserving journals does not mean unlimited growth. Do not vacuum away evidence mid-debug unless space is the problem.
Interaction with rsyslog and /var/log/messages
Persistent journal is independent of whether rsyslog writes /var/log/messages . You can have:
- Persistent journal + rsyslog files
- Volatile journal + rsyslog files (text history exists, journal previous boots do not)
- Persistent journal only
Tasks that say preserve system journals mean journald persistent storage , not “install a new syslog server.” Do not confuse copying /var/log/messages with fulfilling Storage=persistent .
- Full exam procedure (recommended sequence)
- Task: Ensure systemd journals persist across reboots. # 1) Inspect current state
- ls /var/log/journal 2>/dev/null || echo "no persistent dir"
- ls /run/log/journal 2>/dev/null || true
- grep -E '^#?Storage=' /etc/systemd/journald.conf
- # 2) Configure
- sudo mkdir -p /var/log/journal
- sudo sed -i 's/^#\?Storage=.*/Storage=persistent/' /etc/systemd/journald.conf
- # If sed is risky on exotic formatting, use vim and set Storage=persistent under [Journal]
- # 3) Apply
- sudo systemctl restart systemd-journald
- sudo journalctl --flush
- # 4) Confirm files on disk
- sudo ls -la /var/log/journal/$(cat /etc/machine-id)
- # 5) Reboot and re-check previous boot
- sudo systemctl reboot
# after login:
- journalctl --list-boots
- journalctl -b -1 -n 5 --no-pager
Use an editor if you are not 100% confident in sed against commented lines— wrong Storage=none would be catastrophic for logging. Visual confirmation in vim is acceptable under exam conditions.
Permissions and ACLs (awareness)
Journal files are root-managed. Group systemd-journal (or adm on some distros) may read journals. For EX200 you operate as root via sudo; do not chmod 777 the journal directory. Keep standard ownership so journald can write. sudo ls -la /var/log/journal
- id
- Common traps
Creating /var/log/journal but never restarting journald — old volatile runtime continues until restart/flush.
Setting Storage=persistent but /var is full — journald may fail to keep history; check df -h /var .
Assuming rsyslog files equal preserved journals — different subsystem.
Testing only with journalctl -b (current boot) — you must prove previous boot retention.
Deleting /var/log/journal to “free space” during the exam after enabling persistence — undoes the task.
Editing the wrong file under /usr/lib/systemd/ instead of /etc/systemd/ — vendor copies can be overwritten; use /etc .
Forgetting machine-id subdirectory and thinking persistence failed when files exist one level deeper.
Relationship to other operate-running-systems skills
10.1 Logs: Persistence makes multi-boot journalctl investigation possible.
Boot/reboot: You often reboot to prove this objective.
Disk space / storage chapters: Journals live on the filesystem that holds /var .
Services: systemd-journald.service must stay active; do not mask it.
- Optional: Forwarding and compress (do not over-scope) Compress=yes
- Seal=yes
- ForwardToSyslog=yes
These appear in journald.conf but are not substitutes for Storage=persistent . Only change them if a task asks. Default exam focus is persistent storage on .
Section checkpoint
You should explain volatile /run vs persistent /var/log/journal , set Storage=persistent and/or create /var/log/journal , restart systemd-journald , verify journal files on disk, and prove with journalctl -b -1 / --list-boots after reboot that system journals are preserved. That meets the EX200 “preserve system journals” study point.