加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

如何解释NFS crossmnt参数?

发布时间:2020-12-13 19:52:01 所属栏目:Linux 来源:网络整理
导读:我的一个客户发现他需要包含’crossmnt’以及他的NFS导出选项.我将把选项写入我们的软件中,这样他就不必进行黑客攻击并且可以使用crossmnt作为一个真正的选项. 这是我可以在我们的文档中使用的crossmnt的正确解释吗? Crossmnt allows the NFS client to tra
我的一个客户发现他需要包含’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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读