之前说Debian8直接升级到Debian9,发现升级完成之后遇到一个问题,就是升级到Debian9之后,在/run/systemd出现可用空间不足问题,连个Nginx都不能启动,于是花了点时间解决了下。
报错详情:
Failed to reload daemon: Refusing to reload, not enough space available on /run/systemd. Currently, 10.5M are free, but a safety buffer of 16.0M is enforced.
Processing triggers for systemd (232-25+deb9u3) ...
Failed to reload daemon: Refusing to reload, not enough space available on /run/systemd. Currently, 10.5M are free, but a safety buffer of 16.0M is enforced.
df -h一下,发现这个目录确实空间不多:
root@elsenow-virmach-128:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 47M 0 47M 0% /dev
tmpfs 12M 880K 11M 8% /run
/dev/vda1 9.7G 1.9G 7.4G 21% /
tmpfs 58M 0 58M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 58M 0 58M 0% /sys/fs/cgroup
tmpfs 12M 0 12M 0% /run/user/0
很明显,是提示/run/systemd空间不足,我们只需要想办法给这个目录增加空间就行,一开始我还以为会很麻烦,没想到最后也就一行配置的事情,不多说,直接上代码:
vim /etc/fstab
tmpfs /run tmpfs nosuid,noexec,size=18M,nr_inodes=4096 0 0
也就是到/etc/fstab增加一行就行了。增加之后,保存,重启,问题就解决了。