No space left on half-empty drive?

Heute wollte ich auf meine Vagrant-Maschine nginx neu starten, weil er sich irgendwie komisch verhielt. Der Neustart schlug aber fehlt:

root@vagrant$ systemctl restart nginx
Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.

Im Error-Log steht das:

2019/05/08 11:29:00 [crit] 3056#3056: pwrite() "/var/run/nginx.pid" failed (28: No space left on device)

Ah, Platte ist wohl voll. Mal nachkucken:

root@vagrant$ df -h /var
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       9.2G  4.6G  4.2G  53% /

Hmm….strange. Mal ins das Verzeichnis selber kucken:

root@vagrant$ ls -la /var/run       
lrwxrwxrwx 1 root root 4 Dec 15  2017 /var/run -> /run
root@vagrant$ df -h /var/run        
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           793M  793M     0 100% /run

Also: /var/run ist auf /run gelinkt, und das ist ein temporäres In-Memory-Filesystem mit einer Maximalgröße.

root@vagrant$ du -h -d1 /run | grep M
775M	/run/atop
18M	/run/log
793M	/run
root@vagrant$ ls -la /run/atop
total 793048
drwx------  2 root root        60 May  6 09:31 .
drwxr-xr-x 25 root root      1020 May  8 11:36 ..
-rw-------  1 root root 812081152 May  8 12:46 atop.acct

atop schreibt seine Messdaten hier rein, und die können groß sein.

Wichtig: Die File einfach zu löschen hilft nicht, man muss danach auch den atop-Service neu starten, um den Platz wirklich frei zu geben.

Ich denke, ich werde mal nach atop logrotate googeln…

About the author

People Enabler at CHECK24