Why doesn't systemd journald honor `SystemKeepFree` option?

Solution In Progress - Updated -

Issue

  • I have configured systemd-journald to avoid growing the journal files if the amount of free disk space in the filesystem is less than a specific amount:

    # grep -i systemkeepfree /etc/systemd/journald.conf 
    SystemKeepFree=1850M
    
  • Despite the amount of free disk space being higher than the threshold:

    # df 
    Filesystem            1K-blocks   Used Available Use% Mounted on
    /dev/mapper/rhel-var    2037760 142760   1895000   8% /var
    #
    # journalctl --disk-usage
    Archived and active journals take up 50.0M on disk.
    
  • The journal files eventually grow beyond the free space threshold:

    # df
    Filesystem            1K-blocks   Used Available Use% Mounted on
    /dev/mapper/rhel-var    2037760 333008   1704752  17% /var
    #
    # journalctl --disk-usage
    Archived and active journals take up 200.0M on disk.
    

Environment

  • Red Hat Enterprise Linux 7.
  • systemd-journald with persistent journal.
  • SystemKeepFree free disk space limit option.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.