Systemd-journald is not respecting the limits set for persistent journal logs for SystemMaxUse parameter

Solution Verified - Updated -

Issue

  • systemd-journald not respecting the limits set for persistent journal logs for SystemMaxUse.
  • Even with vaccum-time option in journalctl, the files from /var/log/journal/ are not being deleted. Due to which disk space is filling up.
  • systemd-journald logs taking more than configured disk space

    # grep -v ^# /etc/systemd/journald.conf 
    [Journal]
    Storage=persistent
    Compress=yes
    SystemMaxUse=330M
    ForwardToSyslog=yes
    
  • Journal usage on disk:

    # journalctl --disk-usage  
    Archived and active journals take up 2.8G on disk.
    
    # df -h /var
    Filesystem               Size  Used Avail Use% Mounted on
    /dev/mapper/vg-lv_var   20G   11G  8.0G  58% /var
    

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9
  • rsyslog
  • systemd

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content