【发布时间】:2014-06-21 14:45:18
【问题描述】:
我很想知道是否可以显示挂载在网络上的 /proc 虚拟文件系统的内容。所以我导出“/”并通过 NFS 将它安装在另一个系统中。然后我将 cd 放入 proc 目录并执行 ls。它什么也没显示。有人请解释为什么它是空的。
【问题讨论】:
-
/proc不应该以这种方式使用,特别是因为内部的伪文件预计会被顺序读取并且不会给出任何有意义的大小。
我很想知道是否可以显示挂载在网络上的 /proc 虚拟文件系统的内容。所以我导出“/”并通过 NFS 将它安装在另一个系统中。然后我将 cd 放入 proc 目录并执行 ls。它什么也没显示。有人请解释为什么它是空的。
【问题讨论】:
/proc 不应该以这种方式使用,特别是因为内部的伪文件预计会被顺序读取并且不会给出任何有意义的大小。
请阅读man 5 exports:
nohide This option is based on the option of the same name provided in
IRIX NFS. Normally, if a server exports two filesystems one of
which is mounted on the other, then the client will have to
mount both filesystems explicitly to get access to them. If it
just mounts the parent, it will see an empty directory at the
place where the other filesystem is mounted. That filesystem is
"hidden".
默认情况下,客户端看不到嵌套挂载。
【讨论】: