您的位置 首页 Linux

如何解释NFS crossmnt参数?

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

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

Crossmnt allows the NFS client to traverse the directories below the exported root. For example:
etc/exports:

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

With crossmnt,the client can see the contents of /exports/doc as the subfolder of /exports,while without crossmnt,doc would appear to be an empty folder.

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

听起来不错吗?谢谢.

解决方法

我相信这个解释中缺少一些东西..我从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.

关于作者: dawei

【声明】:金华站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。

热门文章