ITPub博客

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

centos nfs(四)

原创 Linux操作系统 作者:wisdomone1 时间:2010-04-16 10:43:25 0 删除 编辑
   思考着作个centos nfs学习系列,以后看着或许有点小成就。,centos学习系列前期的链接,请查看:
   centos nfs(三)

Common NFS Mount Options
  nfs加载的一些通用选项




Beyond mounting a file system via NFS on a remote host, other options can be specified at the
time of the mount to make it easier to use. These options can be used with manual mount
commands, /etc/fstab settings, and autofs.
   除了在远程主机通过nfs加载文件系统,在加载时指定一些其它的选项,这样可以更为方便使用它。指定这些选项可以
采用手工mount,/etc/fstab及autofs



The following are options commonly used for NFS mounts:
   nfs加载目前主要使用的一些选项


• fsid=num — Forces the file handle and file attributes settings on the wire to be num, instead of
a number derived from the major and minor number of the block device on the mounted file
system. The value 0 has special meaning when used with NFSv4. NFSv4 has a concept of a
root of the overall exported file system. The export point exported with fsid=0 is used as this
root.
              强制配置在用(上线的)的文件句柄及文件属性为数字,而不是来源于基于加载文件系统块设备的主次编号的一个数字。值为0
表示使用nfsv4的一个特有的值nfsv4可以理解为总体上导出的文件系统的基础。以fsid=0导出的导出点用于根(注:对于os理解不到位,译文有些生硬)  




• hard or soft — Specifies whether the program using a file via an NFS connection should
stop and wait (hard) for the server to come back online, if the host serving the exported file
system is unavailable, or if it should report an error (soft).
If hard is specified, the user cannot terminate the process waiting for the NFS communication
to resume unless the intr option is also specified.
If soft is specified, the user can set an additional timeo= option, where
specifies the number of seconds to pass before the error is reported.
              指定使用基于nfs文件的程序是否,在nfs server恢复正常之前停止工作或继续等待。假如导出nfs shares的主机(nfs server)
出现问题不可用,它应该报一个错误(这就是soft),hard与之相反.如果你指定hard,除非另行指定了intr选项,否则你不能中断进程,只能等待nfs连接恢复正常

在指定soft的情况下,用户可以指定一个额外的选项timeo=value,表示报错之前要等待多少时间(以秒计)





Note
Using soft mounts is not recommended as they can generate I/O errors in very
congested networks or when using a very busy server.
重要通知
  不推荐使用soft mount,因为使用一个非常忙碌的系统时,可能会产生相当严重的网络阻塞i/o错误

intr — Allows NFS requests to be interrupted if the server goes down or cannot be reached.

   允许指定如果nfs server不正常时,nfs 请求可以被中断(通讯中断或nfs server go down)




• nfsvers=2 or nfsvers=3 — Specifies which version of the NFS protocol to use. This is useful
for hosts that run multiple NFS servers. If no version is specified, NFS uses the highest
supported version by the kernel and mount command. This option is not supported with
NFSv4 and should not be used.
    指定使用哪个版本的nfs.对于使用多个nfs server的主机很有用。如果没有指定具体的nfs 版本,默认会使用最高的nfs版本。
nfsv4不支持这个选项且不使用它    





• noacl — Turns off all ACL processing. This may be needed when interfacing with older
versions of Red Hat Enterprise Linux, Red Hat Linux, or Solaris, since the most recent ACL
technology is not compatible with older systems.
           关闭所有acl处理功能或机制。如果和一些比较老的redhat或solaris进行交互时,由于目前大多数acl技术和以前的技术并不兼容。所在需要指定这个选项





nolock — Disables file locking. This setting is occasionally required when connecting to older
NFS servers.
          禁止文件锁功能。当你连接较老的nfs server时,偶尔要用这个选项




• noexec — Prevents execution of binaries on mounted file systems. This is useful if the
system is mounting a non-Linux file system via NFS containing incompatible binaries.
            防止执行加载文件系统的二进制文件(可理解为可执行文件)。如果你通过nfs加载了非linux的不兼容的可执行文件时,非常有用




• nosuid — Disables set-user-identifier or set-group-identifier bits. This prevents remote users
from gaining higher privileges by running a setuid program.
            禁用使用配置uid或gid的比特位功能,防止远程用户得到运行setuid程序的更高权限



• port=num — Specifies the numeric value of the NFS server port. If num is 0 (the default), then
mount queries the remote host's portmapper for the port number to use. If the remote host's
NFS daemon is not registered with its portmapper, the standard NFS port number of TCP
2049 is used instead.
               指定nfs server的端口编号.如果为0(默认),那么mount动作会查询远程主机使用的portmapper端口号。
如果远程主机的nfs进程没有注册到它的portmapper之中。会使用标准的tcp 2049端口作为nfs的端口号
          


• rsize=num and wsize=num — These settings speed up NFS communication for reads
(rsize) and writes (wsize) by setting a larger data block size, in bytes, to be transferred at
one time. Be careful when changing these values; some older Linux kernels and network
cards do not work well with larger block sizes. For NFSv2 or NFSv3, the default values for
both parameters is set to 8192. For NFSv4, the default values for both parameters is set to
32768.
            通过配置一个更大的数据块大小,会提升nfs通讯每次传递的数据读写速度(以bytes计)。
但在修改这些值要小心;一些较老的linux内核可能不会很好支持它。对于nfsv2或nfsv3,这些参数的默认值是8192,
nfsv4可以配置为32768
 




• sec=mode — Specifies the type of security to utilize when authenticating an NFS connection.
sec=sys is the default setting, which uses local UNIX UIDs and GIDs by means of
AUTH_SYS to authenticate NFS operations.
sec=krb5 uses Kerberos V5 instead of local UNIX UIDs and GIDs to authenticate users.
sec=krb5i uses Kerberos V5 for user authentication and performs integrity checking of NFS
operations using secure checksums to prevent data tampering.
sec=krb5p uses Kerberos V5 for user authentication, integrity checking, and encrypts NFS
traffic to prevent traffic sniffing. This is the most secure setting, but it also has the most
performance overhead involved.
• tcp — Specifies for the NFS mount to use the TCP protocol.
• udp — Specifies for the NFS mount to use the UDP protocol.
            指定验证nfs通讯或连接时使用哪种安全类型.默认是sys,它通过auth_sys的本地unix uids和gids来认证nfs连接,
            (注:其它krb5,krb5i同理,不再译文)



 
Many more options are listed on the mount and nfs man pages.
   更多mount选项细节,请参考man手册

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

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

注册时间:2008-04-04

  • 博文量
    2189
  • 访问量
    12690170