1. 程式人生 > >centos7 df 命令卡死

centos7 df 命令卡死

登入伺服器想檢視磁碟使用情況,使用了df,但卡住半天沒有響應。
執行strace df,發現最後卡在了 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 操作;

我用的第一種方式,親測好使。