搜索

17.5. 防止挂载点重复

download PDF

这个流程将挂载点标记为 unbindable,因此不能在另一个挂载点中复制它。

流程

  • 要将挂载点的类型改为 unbindable 挂载,请使用:

    # mount --bind mount-point mount-point
    # mount --make-unbindable mount-point

    或者,要更改所选挂载点和其下的所有挂载点的挂载类型,请使用 --make-runbindable 选项,而不是 --make-unbindable 选项。

    重复此挂载的任何后续尝试都会失败,并显示以下错误:

    # mount --bind mount-point duplicate-dir
    
    mount: wrong fs type, bad option, bad superblock on mount-point,
    missing codepage or helper program, or other error
    In some cases useful info is found in syslog - try
    dmesg | tail  or so

例 17.4. 防止 /media 被复制

  • 要防止 /media 目录被共享,请使用:

    # mount --bind /media /media
    # mount --make-unbindable /media

其它资源

  • mount(8) 手册页
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.