我经历过 NFS“聚会”和相关的事情。但今天我看到了一些不同的东西,我很困惑:挂载目录本身不可见(/foo,从 / 不可见),直到我再次卸载/挂载“/foo”(NFS 共享)。这是在 AIX 6.1 上
## grep -p '^/foo' /etc/filesystems
/foo:
dev = "/foo_for_client"
vfs = nfs
nodename = fooserver
mount = true
options = rw,bg,hard,intr,sec=sys
account = false
#df
(...)
fooserver:/foo_for_client - - - - - /foo
# shows that "fooserver:foo_for_client" is mounted on /foo mount-point
# BUT each field instead of showing size, %, etc, shows "-" instead
(...)
## cd /
## ls -ld /foo
ls: 0653-341 The file /foo does not exist.
# ??
## ls -l /
(...)
fmm
fnn
#and here, NO 'foo' at all. No mount-point (nor mounted) .
#And there is also no "stalling" of the display while it fetches '/foo' infos
# (ie, the rest of the '/' dir content appears quickly)
# ??? this '/foo' mount-dir seems to be somehow "hidden" (NFS pb?) (see it reappear below)
fpp
fqq
(...)
## umount /foo
# no errors.
## cd /
## ls -ld /foo
drwxrwxrwx 2 user user 256 Jan 01 1970 /foo
# ?? the mount-point is there and does exist? (even though its date is suspicious)
# why was it 'hidden' from '/' standpoint while the nfs was mounted?
## mount /foo
# no errors, and everything is ok again...
#df
(...)
fooserver:/foo_for_client 220200960 69811632 69% 1122 1% /foo
# Now each field appears as well
(...)
我理解为“/foo/.”一旦挂载了 nfs 文件系统,dir 就会取代“/foo”挂载目录。当 NFS 出现问题时,它可能会导致“内部”内容不可用。
但我无法理解的是,如何从父目录中也看不到这个“/foo”? (从“/”,它应该知道有一个“/foo”子目录条目,然后通过 ls 显示它(当安装 NFS 时使用 NFS 信息,或者当安装 NFS 时使用“/”分区信息)。这里:我根本看不到“/foo”(也看不到挂载目录,也看不到挂载的目录)。
我猜这在某种程度上是由于当“ls”查询有关“/foo”目录的信息时 NFS 未能返回信息?但在这种情况下,为什么“/”中的“ls -l”会默默失败,并且该子目录没有任何超时? (我忘了“束缚”我的 ls -l 尝试......)