Univention Bugzilla – Bug 35859
Free space on root file system less than 10 %
Last modified: 2017-09-20 15:03:34 CEST
We should add a system diagnostic plugin which checks free space on /. If less than 10 % are free, the module should add some possibilities: - Uninstall unused software (link to App Center) - Check /var/log and recommend to move them to another server / storage - If an local repository is installed recommend to move it to a different server - change the hard drive
(In reply to Stefan Gohmann from comment #0) > If less than 10 % are free, the module should add some possibilities: - Lower Debug levels (if /var/log is on the root filesystem)
A check for /boot could also be done as this might prohibit an update due to too many installed kernels (cf. Bug 35947 as an example).
Created attachment 8902 [details] 35859-diagnostic-disk-space-420.patch A new diagnostic check `disk_usage.py`. This checks every mounted device and warns if less than 10% space is available. If the root partition has less than 10% space left, a critical warning is issued. All solutions as described in comment 0 are implemented. Additionally, if /var/log is on the root fs or its own partition and no space is left, UCR variables for logging are inspected and a proposal to reset them via the UCR-module is shown, if high debug/logging levels are configured.
Committed in r81600 - r81601 (advisory r81649).
> Einige Festplatten sind beinahe voll: > - Festplatte für Moint Point / ist 96.0% voll. > - Festplatte für Moint Point /var/lib/docker/overlay ist 96.0% voll. > Sie können per Modul "App Center" Software entfernen. > Sie können /var/log auf eine andere Festplatte oder Speicher verschieben. > Sie können die Festplatte austauschen. Why /var/lib/docker/overlay? > Sie können die Festplatte austauschen. I don't like this. Just replacing the disk is not all, you have to copy the data, align the partitions and filesystems ... people who know all this stuff already know what to do when disk space is running out
(In reply to Felix Botner from comment #5) > Why /var/lib/docker/overlay? Because it is a mount point as recognized by `psutil.disk_partitions()` [1]. We could filter for the same device, but that could mean, that `/` is removed instead of `/var/lib/docker/overlay`. > > Sie können die Festplatte austauschen. > I don't like this. Just replacing the disk is not all, you have to copy the > data, align the partitions and filesystems ... people who know all this > stuff already know what to do when disk space is running out Of course. This is as proposed in comment c0. I can remove that if you want. [1]: https://pythonhosted.org/psutil/#psutil.disk_partitions
(In reply to Lukas Oyen from comment #6) > (In reply to Felix Botner from comment #5) > > Why /var/lib/docker/overlay? > > Because it is a mount point as recognized by `psutil.disk_partitions()` [1]. > > We could filter for the same device, but that could mean, that `/` is > removed instead of `/var/lib/docker/overlay`. filter out docker/overlay > > > > > Sie können die Festplatte austauschen. > > I don't like this. Just replacing the disk is not all, you have to copy the > > data, align the partitions and filesystems ... people who know all this > > stuff already know what to do when disk space is running out > > Of course. This is as proposed in comment c0. I can remove that if you want. yes
(In reply to Felix Botner from comment #7) > (In reply to Lukas Oyen from comment #6) > > (In reply to Felix Botner from comment #5) > > > Why /var/lib/docker/overlay? > > > > Because it is a mount point as recognized by `psutil.disk_partitions()` [1]. > > > > We could filter for the same device, but that could mean, that `/` is > > removed instead of `/var/lib/docker/overlay`. > > filter out docker/overlay # df -T Dateisystem Typ 1K-Blöcke Benutzt Verfügbar Verw% Eingehängt auf udev devtmpfs 10240 0 10240 0% /dev tmpfs tmpfs 204100 20892 183208 11% /run /dev/dm-0 ext4 48135984 2188764 43439444 5% / tmpfs tmpfs 510248 0 510248 0% /dev/shm tmpfs tmpfs 5120 0 5120 0% /run/lock tmpfs tmpfs 510248 0 510248 0% /sys/fs/cgroup /dev/vda1 ext2 482922 99077 358911 22% /boot overlay overlay 48135984 2188764 43439444 5% /var/lib/docker/overlay/b5aefe33e468c98ec76f489470b77f6b79280b4c35f124a95376f99733185ee6/merged shm tmpfs 65536 0 65536 0% /var/lib/docker/containers/e839c86942b2784bc2a5111c80be385dfd8c48f0573ad74f9d2914f5d2294621/shm # man 1 df -x, --exclude-type=TYPE limit listing to file systems not of type TYPE
(In reply to Felix Botner from comment #7) > filter out docker/overlay Done in r81893. > > Of course. This is as proposed in comment c0. I can remove that if you want. > yes Done in r81894.
OK
<http://errata.software-univention.de/ucs/4.2/166.html>