Site icon New Generation Enterprise Linux

Stop letting your logs blow up your disk

Logging & Journald

Stop letting your logs blow up your disk

🧩 The Challenge

You wake up to a server that is completely unresponsive because journald decided to eat every single byte of free disk space. I’ve spent way too many mornings clearing /var/log/journal by hand like a caveman.

💡 The Fix

Just set a hard limit on the journal size in the config file. It saves your sanity and keeps the filesystem from hitting that zero-byte wall.

sed -i 's/#SystemMaxUse=/SystemMaxUse=500M/' /etc/systemd/journald.conf && systemctl restart systemd-journald

⚙️ Why It Works

By editing the config, you force the daemon to purge older entries automatically once it hits your specified threshold. Most people don’t realize this file is commented out by default, which is just begging for trouble.

🚀 Pro-Tip: Use VacuumSize=200M if you need to shrink an existing bloated log folder immediately without waiting for a rotation.

Linux Tips & Tricks | © ngelinux.com | 11/6/2026

0 0 votes
Article Rating
Exit mobile version