Cockpit could/should have a system "Janitor" that ties in with the health card.
The main idea is to show an persistent overview of upcoming issues before they hit a critical enough level to display in the health card and to provide a means to address these issues.
It could be a new page, linked from the health card, that would show the amount of available storage — among other things — for critical, growing filesystem points, including:
/
/var/log/
/var/cache/
/tmp/
/home/
(In many systems, these are the same. In some, they're not. Where they're the same, they'd collapse down to /.)
Critically, there should be a way to vacuum logs and set policies to automatically trim the log size.
For manual compacting, it would be the eqivalent of:
journalctl --vacuum-time=20d
journalctl --vacuum-size=500M
For automatic compacting, we could have an interface that adjusts /etc/systemd/journald.conf with flags like SystemMaxUse=, SystemKeepFree=, SystemMaxFileSize=, SystemMaxFiles=, RuntimeMaxUse=, RuntimeKeepFree=, RuntimeMaxFileSize=, RuntimeMaxFiles=
In addition to logs, a janitor could show the size of and clean various caches, /tmp/, and so on.
It should be arranged in a human logical format instead of a filesystem format, so it could have groups on the page that say: "Log storage", "Cache", "Quota" (for users, including implied quotas) and mechanisms to free up space for each.
A lot is kind of storage related, but this is more about the data (and mainly the metadata) than the drives.
All of this already exists in system services, in the form of systemd and journalctl; I'm suggesting that Cockpit provides a friendly interface for these little-known things.
Currently, a lot of people put /var/ and /tmp/ on a separate filesystem to make sure their space do not overflow the root / partition. They shouldn't _have_ to, unless they want to. But they're trying to make sure their disks aren't completely full, as that will cause a lot of very bad things to happen (such as apps not opening properly, files not being written, logs not being added, and other corruption issues.)
It would be ideal if they could set a policy (and share this policy — so perhaps a bit of Ansible and a shell script exporting is desired here too, much like SELinux) and have the system handle it for them.
It's also good if they could clear these items much like cleaning the cache and cookies in a browser.
Most helpful comment
All of this already exists in system services, in the form of
systemdandjournalctl; I'm suggesting that Cockpit provides a friendly interface for these little-known things.Currently, a lot of people put
/var/and/tmp/on a separate filesystem to make sure their space do not overflow the root/partition. They shouldn't _have_ to, unless they want to. But they're trying to make sure their disks aren't completely full, as that will cause a lot of very bad things to happen (such as apps not opening properly, files not being written, logs not being added, and other corruption issues.)It would be ideal if they could set a policy (and share this policy — so perhaps a bit of Ansible and a shell script exporting is desired here too, much like SELinux) and have the system handle it for them.
It's also good if they could clear these items much like cleaning the cache and cookies in a browser.