我的服务器(运行 Centos Stream 版本 8)昨天晚上停止响应 http。我今天早上尝试通过 SSH 进入它,但没有成功,只剩下一个空的挂起的 PuTTy 屏幕。我通过我的网络主机的控制面板(Hetzner)进行了自动重置,几分钟后它就恢复了,一切似乎都正常工作。
我以为是空间不够了,结果确实df
显示 /dev/md2 已满 100%(尽管它显示其大小为 9.8G,但实际空间为 9.5G)。我删除了一些东西,将空间减少到 50%。不过,里面没有新文件,我觉得它已经满了一个月或更长时间了……
然后我查看了/var/log/messages
最新的报告,发现了以下内容:
Apr 16 18:47:57 originals systemd[1]: Starting dnf makecache...
Apr 16 18:48:28 originals dnf[87659]: CentOS Stream 8 - AppStream 20 kB/s | 4.4 kB 00:00
Apr 16 18:48:28 originals dnf[87659]: CentOS Stream 8 - BaseOS 38 kB/s | 3.9 kB 00:00
Apr 16 18:48:28 originals dnf[87659]: CentOS Stream 8 - Extras 35 kB/s | 2.9 kB 00:00
Apr 16 18:48:28 originals dnf[87659]: CentOS Stream 8 - Extras common packages 19 kB/s | 3.0 kB 00:00
Apr 16 18:48:29 originals dnf[87659]: Extra Packages for Enterprise Linux 8 - x86_64 33 kB/s | 23 kB 00:00
Apr 16 18:48:30 originals dnf[87659]: Extra Packages for Enterprise Linux 8 - Next - 57 kB/s | 25 kB 00:00
Apr 16 18:48:30 originals dnf[87659]: Google Cloud SDK 3.8 kB/s | 1.4 kB 00:00
Apr 16 18:48:31 originals dnf[87659]: nginx mainline repo 160 kB/s | 2.9 kB 00:00
Apr 16 18:48:32 originals dnf[87659]: Metadata cache created.
Apr 16 18:48:32 originals systemd[1]: dnf-makecache.service: Succeeded.
Apr 16 18:48:32 originals systemd[1]: Started dnf makecache.
Apr 16 18:49:28 originals systemd[1]: dev-disk-by\x2duuid.device: Job dev-disk-by\x2duuid.device/start timed out.
Apr 16 18:49:28 originals systemd[1]: Timed out waiting for device dev-disk-by\x2duuid.device.
Apr 16 18:49:28 originals systemd[1]: Dependency failed for /dev/disk/by-uuid.
Apr 16 18:49:28 originals systemd[1]: dev-disk-by\x2duuid.swap: Job dev-disk-by\x2duuid.swap/start failed with result 'dependency'.
Apr 16 18:49:28 originals systemd[1]: dev-disk-by\x2duuid.device: Job dev-disk-by\x2duuid.device/start failed with result 'timeout'.
Apr 16 18:49:28 originals systemd[1]: Timed out waiting for device dev-disk-by\x2duuid.device.
Apr 16 18:49:28 originals systemd[1]: Dependency failed for /dev/disk/by-uuid.
Apr 16 18:49:28 originals systemd[1]: dev-disk-by\x2duuid.swap: Job dev-disk-by\x2duuid.swap/start failed with result 'dependency'.
Apr 16 18:49:28 originals systemd[1]: dev-disk-by\x2duuid.device: Job dev-disk-by\x2duuid.device/start failed with result 'timeout'.
有人能告诉我我可能需要担心什么吗?还是只是因为内存/dev/md2
满了,即使内存已经满了一段时间了?还是上面的情况表明我即将出现硬件故障?
编辑:
再次查看messages
我发现这些 x2uuid 错误在重启之前和之后都相对频繁地发生,并且可能完全不相关。
答案1
这听起来像是您的 /etc/fstab 中有一个尝试挂载的条目/dev/disk/by-uuid
(而不是预期的/dev/disk/by-uuid/SOMETHING
)。可能是前缀和粘贴的 UUID 之间有一个空格,或者 fstab 文件中完全缺少 UUID。
运行systemctl status 'dev-disk-by\x2duuid.swap'
并记下“Loaded:”行。如果它显示:
Loaded: loaded (/etc/fstab; generated)
那么它肯定来自 /etc/fstab 条目。编辑该文件并修复错误条目。