Skip to content

warn about low disk space #8787

@garrett

Description

@garrett

Origin story

When talking with a friend who was using Cockpit on a test machine, he noticed things weren't working correctly. After poking around, he discovered that there was no free space left on the system (at least in /). Once that was fixed, things worked as expected.

Details

When storage is completely full, all sorts of problems start happening. Files can't be saved, processes stop working reliably, etc.

Even when space is "low", there are issues — filesystems slow down, heavy fragmentation occurs (even on fragmentation-resistant filesystems), and some file save actions do not work (if the size exceeds the space).

There are several reasons why space can be an issue:

  • PackageKit not cleaning up after itself
  • ever-growing logs (especially when there's a flood of entries)
  • old, small disks
  • not enough enough space allocated (either on bare metal's partitions, or in a VM's config)

While Cockpit isn't a janitor, it should report something as important as emergency levels of free space as a warning.

Open questions

So, now the questions are:

  • How little is too little? How do we determine when to warn?
  • How would this work with VMs? and Containers?
    • (Read-only disk images and partitions should be exempt)
  • Can we provide suggestions?
  • What actions can we perform?
    • Vacuum journal
    • Remove old logs
    • Clean system caches
    • Provide suggestions (mainly based on which filesystems are full)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions