ITPub博客

首页 > Linux操作系统 > Linux操作系统 > centos nfs(三)

centos nfs(三)

原创 Linux操作系统 作者:wisdomone1 时间:2010-04-15 22:16:40 0 删除 编辑
   学习贵在坚持,已作过centos nfs的相关测试,链接如下:
centos nfs(二)


  本节主要讲autofs如何配置

autofs Configuration
 autofs的配置


1,automounter的主要默认配置文件为/etc/auto.master,当然这个文件可以根据上节讲的相关内容进行调整.
  master map列出系统上面autofs进程控制的加载点;
2,master group的配置格式示例如下:
       
     注:第一列很简单,就是比如/home的加载点
         第二列不好理解,包含所有加载点列表的一个map source,加载点应该加载在这些文件系统之上.具体语法见下
         第三列如提供,应用于没有提供options的所有特定map的记录。这个行为不同于autofs v4,它是一个累积的过程。修正后主要适用于混合环境

3,示例
         cat /etc/auto.master
            /home  /etc/auto.misc
       $ cat /etc/auto.misc payroll -fstype=nfs personnel:/dev/hda3 sales -fstype=ext3 :/dev/hda4

The first column in a map file indicates the autofs mount point (sales and payroll from the
server called personnel). The second column indicates the options for the autofs mount while
the third column indicates the source of the mount. Following the above configuration, the
autofs mount points will be /home/payroll and /home/sales. The -fstype= option is often
omitted and is generally not needed for correct operation.
The automounter will create the directories if they do not exist. If the directories exist before the
automounter was started, the automounter will not remove them when it exits. You can start or
restart the automount daemon by issuing the following command:
     以上详细讲解了每列的作用及用法,示例可以查看/etc/auto.misc文件




4,启停autofs进程及检测

$/sbin/service autofs start
or $/sbin/service autofs restart
Using the above configuration, if a process requires access to an autofs unmounted directory
such as /home/payroll/2006/July.sxc, the automount daemon automatically mounts the
directory. If a timeout is specified, the directory will automatically be unmounted if the directory
is not accessed for the timeout period.
You can view the status of the automount daemon by issuing the following command in your
terminal:
$/sbin/service/autofs status

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9240380/viewspace-659867/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: centos nfs(二)
下一篇: centos nfs(四)
请登录后发表评论 登录
全部评论
提供针对oracle初学者及进阶的数据库培训,欢迎大家咨询: 微信: wisdomone 微信公众号: lovedb 工作经历: 中国普天 北京科蓝 北京云和恩墨 北京神州新桥

注册时间:2008-04-04

  • 博文量
    2189
  • 访问量
    12690170