情景再現(xiàn)
在 centos7 中卡乾,當使用 df 命令查看磁盤空間或使用pvs時被 hang 住
捉蟲
df 命令 hanging
strace df,查看系統(tǒng)調用缚够,發(fā)現(xiàn)阻塞在了 stat("/proc/sys/fs/binfmt_misc")
mount | grep binfmt幔妨,查看掛載情況,輸出 systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=31,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
補充知識
-?df: 查看磁盤使用情況
-?pvs: 查看物理卷詳細信息
-?strace: 查看某命令的系統(tǒng)調用
原因
proc-sys-fs-binfmt_misc.automount 與 proc-sys-fs-binfmt_misc.mount 這兩個之間存在競爭條件
解決
systemctl restart proc-sys-fs-binfmt_misc.automount
轉載自:https://renwoxing.blog.csdn.net/article/details/106708236