admin管理员组

文章数量:1794759

linux命令df卡住怎么办,df

linux命令df卡住怎么办,df

首先用strace命令跟踪,查看df命令执行到哪一步开始卡死。

root@jzbx_web1 ~]# strace df

中间省略输出内容

stat("/sys/kernel/config", {st_mode=S_IFDIR|0755, st_size=0, ...})

= 0

stat("/", {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0

stat("/sys/fs/selinux", {st_mode=S_IFDIR|0755, st_size=0, ...}) =

0

stat("/proc/sys/fs/binfmt_misc", 从这里就可以看到了,命令执行到/proc/sys/fs/binfmt_misc这个目录时,就开始停止不动了

[root@jzbx_web1 ~]# mount -l /dev/mapper/centos-root on / type xfs

(rw,relatime,seclabel,attr2,inode64,noquota)

selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)

systemd-1 on /proc/sys/fs/binfmt_misc type autofs

(rw,relatime,fd=32,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)

debugfs on /sys/kernel/debug type debugfs (rw,relatime)

mqueue on /dev/mqueue type mqueue (rw,relatime,seclabel)

可以看到的确有对这个目录的有系统方式做的挂载操作。

然后发现ls也是卡死的

fuser -m /卡死的挂载目录,可以的话删除相关进程。

umount 后重新mount 可以恢复。如果卡着就等待一段时间。

本文标签: linux命令df卡住怎么办DF