自动挂载autofs命令
涉及服务haldaemon和messagebus两个服务有关,保证两个服务是开启。
***现在想在客户端10.10.10.10自动挂载服务器10.10.10.254上的/share/soft和/share/iso两个目录,该如何配置?
******10.10.10.254服务器上已经配置好了共享share目录,如果不会配置可以参考上一篇nfs配置****
在客户端10计算机上配置
1.mkdir /share
2.vim /etc/auto.master
/share
/etc/auto.share --后面的auto.share文件不存在,名字自定义。
3.# vim/etc/auto.share --创建之前自定义的文件。
soft - 172.16.2.35:/share/soft
iso - 172.16.2.35:/share/iso
4./etc/init.d/autofs restart --服务只要是开启状态就可以,不用重启(如果不行,再重启尝试一下)
chkconfig autofs on
--挂载的目录默认在/share目录下用ls命令看不到,但可以 cd /share/iso进去,这时会帮你自动挂载
大概五分钟后,没有使用的话,会自动umount掉
相关阅读:
autofs+NFS+NIS实现智能挂载 http://www.linuxidc.com//Linux/2012-10/73012.htm
CIFS通过autofs自动挂载 http://www.linuxidc.com//Linux/2012-10/71794.htm
在Ubuntu中使用autofs自动加载Virtual Box数据空间 http://www.linuxidc.com//Linux/2011-12/48832.htm
RHCE认证辅导:RHEL 6 简易搭建autofs服务 http://www.linuxidc.com//Linux/2011-10/45581.htm
RHCE认证辅导:RH133-2 nis+autofs http://www.linuxidc.com//Linux/2011-04/35248.htm
RHCE专题学习之nis+nfs+autofs实现 http://www.linuxidc.com//Linux/2010-07/27246.htm
更多RedHat相关信息见RedHat 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=10
