此问题一般都是因为mount对端服务失效,本地目录卡死造成的。
首先使用strace ls命令跟踪查看执行到哪一步卡死
# strace ls /..
lgetxattr("/MegaSAS.log", "system.posix_acl_default", 0x0, 0) = -1 ENODATA (No data available) lstat("/net", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
lgetxattr("/net", "security.selinux", 0x258f850, 255) = -1 EOPNOTSUPP (Operation not supported) lstat("/net", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
lgetxattr("/net", "system.posix_acl_access", 0x0, 0) = -1 EOPNOTSUPP (Operation not supported) lstat("/chaichuan_test", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lgetxattr("/chaichuan_test", "security.selinux", 0x258f850, 255) = -1 ENODATA (No data available) lstat("/chaichuan_test", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lgetxattr("/chaichuan_test", "system.posix_acl_access", 0x0, 0) = -1 ENODATA (No data available)
lgetxattr("/chaichuan_test", "system.posix_acl_default", 0x0, 0) = -1 ENODATA (No data available) lstat("/mnt", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
lgetxattr("/mnt",
可以看到,命令执行到 /mnt这个目录时,停止不动了
也可以使用cat /proc/mounts 查看当前mount状态,发现确实有对mnt目录的记录
# cat /proc/mounts 192.168.10.150:/opt/ /mnt nfs4 ....