centos7 df 命令卡死

登录服务器想查看磁盘使用情况,使用了df,但卡住半天没有响应。 
运行strace df -h,发现最后卡在了 stat("/proc/sys/fs/binfmt_misc", 无法进入这个路径“/proc/sys/fs/binfmt_misc”,想到”/proc/sys/fs/”下ls看下这个文件夹,也会卡住

运行mount输出,正常有“binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc(rw,relatime)”,发现这个服务器没有挂载,想尝试挂载mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc ,也会卡在“readlink(“/proc/sys/fs/binfmt_misc””

解决方式1. systemctl restart proc-sys-fs-binfmt_misc.automount;

2. 升级到最新 systemd-219-57 版本; 

3. 按照红帽知识库的步骤对 proc-sys-fs-binfmt_misc.automount 进行 mask 操作, 只进行静态的 mount 操作;

我用的第一种方式,亲测好使。
原文地址:https://www.cnblogs.com/lvcisco/p/11382372.html