如何解释NFS crossmnt参数?

时间:2013-12-02 02:56:10

标签: nfs

我的一位客户发现他需要包含'crossmnt'以及他的NFS导出选项。我将把选项写入我们的软件中,这样他就不必进行黑客攻击,并且可以使用crossmnt作为一个真正的选项。

这是我可以在我们的文档中使用的十字架的正确解释吗?

  

Crossmnt允许NFS客户端遍历导出根目录下的目录。例如:   等/出口:

/exports      *(fsid=0,ro,root_squash,sync)
/exports/doc  *(ro,root_squash,bind=/usr/share/doc)
  

使用crossmnt,客户端可以看到/ exports / doc的内容作为/ exports的子文件夹,而没有crossmnt,doc似乎是一个空文件夹。

此视频用于举例: https://www.youtube.com/watch?v=-9cJciX8dB8

这听起来不错吗?谢谢。

1 个答案:

答案 0 :(得分:12)

我相信这个解释中缺少一些东西..我从crossmount知道的是它允许你在导出目录中看到一个安装点。如果导出的目录没有在其子文​​件夹上安装任何分区,则它们应该在NFS的客户端可见。

例如,如果您的导出目录超过“/ mnt / testing_dir”,则包含以下内容:

/mnt/testing_dir/
                 dir1/
                           text1.txt
                           executable.bin
                 dir2/ (mount point for /dev/sda6)
                           doc1
                           doc2

即使没有“crossmnt”选项,“dir1”也会可见。但是,“dir2”,因为它是一个安装点,将在“crossmnt”选项中显示,并且在没有它的情况下将为空(除非您使用其他选项,如“nohide”)。

参考:

crossmnt - This option is similar to nohide but it makes it possible for clients to move from the filesystem marked with crossmnt to exported filesystems mounted on it. Thus when a child filesystem "B" is mounted on a parent "A", setting crossmnt on "A" has the same effect as setting "nohide" on B.

相关问题