ITPub博客

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

centos nfs(二)

原创 Linux操作系统 作者:wisdomone1 时间:2010-04-15 21:30:02 0 删除 编辑
   继续centos nfs学习之路,以前的参考文章,请查阅以下链接
centos nfs(一)


行文如下

   本节主要讨论,nfs的一些新增特性与相关信息,基本全部源于官方文档。

One drawback to using /etc/fstab is that, regardless of how infrequently a user accesses the
NFS mounted file system, the system must dedicate resources to keep the mounted file system
in place. This is not a problem with one or two mounts, but when the system is maintaining
mounts to many systems at one time, overall system performance can be affected. An
alternative to /etc/fstab is to use the kernel-based automount utility. An automounter consists
of two components. One is a kernel module that implements a file system, while the other is a
user-space daemon that performs all of the other functions. The automount utility can mount
and unmount NFS file systems automatically (on demand mounting) therefore saving system
resources. The automount utility can be used to mount other file systems including AFS,
SMBFS, CIFS and local file systems.
autofs uses /etc/auto.master (master map) as its default primary configuration file. This can
be changed to use another supported network source and name using the autofs configuration
(in /etc/sysconfig/autofs) in conjunction with the Name Service Switch mechanism. An
instance of the version 4 daemon was run for each mount point configured in the master map
and so it could be run manually from the command line for any given mount point. This is not
possible with version 5 because it uses a single daemon to manage all configured mount points,
so all automounts must be configured in the master map. This is in line with the usual
requirements of other industry standard automounters. Mount point, hostname, exported
Chapter 19. Network File System (NFS)
directory, and options can all be specified in a set of files (or other supported network sources)
rather than configuring them manually for each host. Please ensure that you have the autofs
package installed if you wish to use this service.



   基于使用/etc/fstab的不足,它并不会根据nfs client是否实时需要它,这样导致系统一直占用专用资源去维护所谓的nfs mount point.浪费了大量os资源;
随即引入了autofs,根据是否需要nfs mount point,可以动态进行加载或卸载.

    autofs包括两个组件:分别是基于内核实现文件系统功能的模块,另一个实现其它所有功能的用户空间进程。而且autofs可以加载其它文件系统:afs,sumfs,cifs及本地文件系统
 
   autofs使用/etc/auto.master作为默认的主要配置文件。通过/etc/sysconfig/autofs和名字服务切换机制的配合,可以使用基于autofs其它的受支持的网络源和名字。在一个特定的master map中,每个配置的mount point
   对应一个v4 版本的进程与其进行服务.但v5确与之相反,它采用一个进程管理所有配置好的加载点,因此所有的automounts必须配置在特定的master group.
   当然在使用autofs前,请确认安装了autofs包






3.1. What's new in autofs version 5?
     autofs4的一些新特性
    
Direct map support
支持直接映射

Autofs direct maps provide a mechanism to automatically mount file systems at arbitrary
points in the file system hierarchy. A direct map is denoted by a mount point of "/-" in the
master map. Entries in a direct map contain an absolute path name as a key (instead of the
relative path names used in indirect maps).
   autofs直接映射,可以在文件系统任何一个目录或层次中自动mount文件系统。它是通过在master map定义/为加载点来表示的。
        直接映射的记录包含以key的方式的绝对路径名字(而不像间接映射中使用相对路径名字)







Lazy mount and unmount support
支持空闲加载和卸载


Multimount map entries describe a hierarchy of mount points under a single key. A good
example of this is the "-hosts" map, commonly used for automounting all exports from a
host under "/net/" as a multi-mount map entry. When using the "-hosts" map, an
'ls' of "/net/" will mount autofs trigger mounts for each export from and
mount and expire them as they are accessed. This can greatly reduce the number of active
mounts needed when accessing a server with a large number of exports.
      多重加载映射记录表示:在单一键(key)下面加载点的层次结构。这里有一个很好的例子,比如:hosts map,它通常用于自动加载以单一多重加载遇射,
             来自于在/net/host下面的一个主机的所有导出共享(用于nfs client mount)

  (注:很难译,哈哈)




Enhanced LDAP support
   增强了对ldap的支持

The Lightweight Directory Access Protocol, or LDAP, support in autofs version 5 has been
enhanced in several ways with respect to autofs version 4. The autofs configuration file
(/etc/sysconfig/autofs) provides a mechanism to specify the autofs schema that a site
implements, thus precluding the need to determine this via trial and error in the application
itself. In addition, authenticated binds to the LDAP server are now supported, using most
mechanisms supported by the common LDAP server implementations. A new configuration
file has been added for this support: /etc/autofs_ldap_auth.conf. The default
configuration file is self-documenting, and uses an XML format.
        这与oracle关系不大,在此不译了,很简单,如有朋友对ldap感兴趣,请查阅相关文档







Proper use of the Name Service Switch (nsswitch) configuration.
    更为合理使用名字服务切换(nsswitch)配置信息
  
The Name Service Switch configuration file exists to provide a means of determining from
where specific configuration data comes. The reason for this configuration is to allow
administrators the flexibility of using the back-end database of choice, while maintaining a
uniform. software interface to access the data. While the version 4 automounter is becoming
increasingly better at handling the name service switch configuration, it is still not complete.
Autofs version 5, on the other hand, is a complete implementation. See the manual page for
nsswitch.conf for more information on the supported syntax of this file. Please note that not
all nss databases are valid map sources and the parser will reject ones that are invalid.
Valid sources are files, yp, nis, nisplus, ldap and hesiod.
     同上,不再单独译出



Multiple master map entries per autofs mount point
   每个autofs加载点对应多个master map entries

One thing that is frequently used but not yet mentioned is the handling of multiple master
map entries for the direct mount point "/-". The map keys for each entry are merged and
behave as one map.

    以上大意如下,经常使用但目前未提及的一件事是,有如此情形,对于直接加载点/,对应多个master group记录,
每条记录的map key可以被合并,对外像一个map似的
An example is seen in the connectathon test maps for the direct mounts below:
What's new in autofs version 5?
     如下是以上的一个示例
/- /tmp/auto_dcthon
/- /tmp/auto_test3_direct
/- /tmp/auto_test4_direct

---




译得不好,欢迎拍砖!!!

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

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

注册时间:2008-04-04

  • 博文量
    2189
  • 访问量
    12690170