首页 > 代码库 > NFS客户端访问行为相关的几个参数解释
NFS客户端访问行为相关的几个参数解释
soft / hard
Determines the recovery behavior of the NFS client after
an NFS request times out. If neither option is speci-
fied (or if the hard option is specified), NFS requests
are retried indefinitely. If the soft option is speci-
fied, then the NFS client fails an NFS request after
retrans retransmissions have been sent, causing the NFS
client to return an error to the calling application.
NB: A so-called "soft" timeout can cause silent data
corruption in certain cases. As such, use the soft
option only when client responsiveness is more important
than data integrity. Using NFS over TCP or increasing
the value of the retrans option may mitigate some of the
risks of using the soft option.
确定在一次NFS请求(NFS request)超时后,NFS客户端的恢复行为。
如果hard或未指定,NFS请求将无期限(indefinitely)重试;
如果soft,请求被retrans次重传后失败,NFS客户端返回错误给调用的应用程序。
soft在一些场景下会导致数据破坏,一般用于客户端响应比数据完整性更重要的场景。
使用TCP挂载或者增加retrans值,可以减轻soft导致的风险。
timeo=n
The time (in tenths of a second) the NFS client waits
for a response before it retries an NFS request. If this
option is not specified, requests are retried every 60
seconds for NFS over TCP. The NFS client does not per-
form any kind of timeout backoff for NFS over TCP.
However, for NFS over UDP, the client uses an adaptive
algorithm to estimate an appropriate timeout value for
frequently used request types (such as READ and WRITE
requests), but uses the timeo setting for infrequently
used request types (such as FSINFO requests). If the
timeo option is not specified, infrequently used request
types are retried after 1.1 seconds. After each
retransmission, the NFS client doubles the timeout for
that request, up to a maximum timeout length of 60 sec-
onds.
客户端在重试NFS请求前,等待响应的时间(单位十分之一秒)。
基于TCP的NFS,未指定的情况下将每60秒重试一次。
基于UDP的NFS,通过自适应算法估算频繁请求类型的等待时间。timeo只用于非频繁的请求类型,如果未指定,从1.1秒起,每次重试前等待的时间翻翻,最大60秒。
retrans=n
The number of times the NFS client retries a request
before it attempts further recovery action. If the
retrans option is not specified, the NFS client tries
each request three times.
The NFS client generates a "server not responding" mes-
sage after retrans retries, then attempts further recov-
ery (depending on whether the hard mount option is in
effect).
在尝试进一步恢复动作前,请求重试的次数。默认值3。