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

shell-sh脚本:如果没有挂载,如何挂载远程文件系统?

发布时间:2020-12-15 18:30:07 所属栏目:安全 来源:网络整理
导读:在bourne shell脚本(#!/ bin / sh)中,如何检查是否已挂载远程NFS共享,如果未挂载,则挂载它?我现在有一套丑陋的猫,greps和ifs使用’mount’的输出,但它似乎没有做可靠的工作. 如果可能,设置automount(autofs)将是执行此操作的标准方法.它可能已经在您的发行
在bourne shell脚本(#!/ bin / sh)中,如何检查是否已挂载远程NFS共享,如果未挂载,则挂载它?我现在有一套丑陋的猫,greps和ifs使用’mount’的输出,但它似乎没有做可靠的工作.
如果可能,设置automount(autofs)将是执行此操作的标准方法.它可能已经在您的发行版中(附带CentOS / Redhat默认安装). Here is a tutorial.

为什么要使用Automount?

Automounting is the process where mounting and unmounting of certain filesystems is done automatically by a daemon. If the filesystem is unmounted,and a user attempts to access it,it will be automatically (re)mounted. This is especially useful in large networked environments and for crossmounting filesystems between a few machines (especially ones which are not always online).

(编辑:李大同)

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

    推荐文章
      热点阅读