Enable and tune persistent systemd journals so logs survive reboots and disk pressure. 11.12.2025 | reading time: 2 min Logs vanish after a reboot; this guide shows how to keep systemd journals persistent and how to verify and tune retention so investigations are possible even after reboots. Enable persistence quickly Follow these commands to enable persistent journals on a systemd host and verify the result: ```bash sudo mkdir -p /var/log/journal sudo chown root:systemd-journal /var/log/journal sudo chmod 2755 /var/log/journal # If SELinux is enabled, restore the context sudo restorecon -Rv /var/log/journal || true sudo tee /etc/systemd/journald.conf.d/99-persistent.conf > /dev/null <<'EOF' [Journal] Storage=persistent EOF sudo systemctl restart systemd-journald ``` Then check with: ```bash $ ls -ld /var/log/journal drwxr-sr-x 2 root systemd-journal 4096 Jun 1 12:00 /var/log/journal $ journalctl --disk-usage Archived and active journals take up 12.0M in the file system. ``` Tune retention and free space Persistent journals are controlled in the same config or in drop-in files; useful knobs include `SystemMaxUse`, `SystemKeepFree` and `SystemMaxFileSize` for disk limits and `RuntimeMaxUse` for volatile storage, and you can reclaim space with `journalctl --vacuum-size=100M` or `journalctl --vacuum-time=2weeks`; trigger rotation with `journalctl --rotate` and verify integrity with `journalctl --verify`. Integrations and pitfalls Remember that persistent journals are binary files that coexist with syslog; if you forward logs to classic syslog daemons set `ForwardToSyslog=yes` in journald config, and on systems with SELinux or restrictive mount options adjust context and permissions; also consider `systemd-journal-remote` for central collection or `rsyslog`/`syslog-ng` when legacy tooling is required. Next steps Once persistence is enabled, practice retention tuning and recovery exercises: run `journalctl --since` queries, simulate disk pressure and vacuum logs, and build a routine for centralized archiving; if you want structured exam preparation, consider deepening your LINUX skills and pursuing CompTIA Linux+ or LPIC-1 with intensive training at bitsandbytes.academy. Join Bits & Bytes Academy First class LINUX exam preparation. setup storage boot-process troubleshooting utilities