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.app
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.this
肯定在一次NFS请求(NFS request)超时后,NFS客户端的恢复行为。
若是hard或未指定,NFS请求将无期限(indefinitely)重试;
若是soft,请求被retrans次重传后失败,NFS客户端返回错误给调用的应用程序。orm
soft在一些场景下会致使数据破坏,通常用于客户端响应比数据完整性更重要的场景。
使用TCP挂载或者增长retrans值,能够减轻soft致使的风险。server
timeo=n three
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.ci
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.requests
客户端在重试NFS请求前,等待响应的时间(单位十分之一秒)。
基于TCP的NFS,未指定的状况下将每60秒重试一次。
基于UDP的NFS,经过自适应算法估算频繁请求类型的等待时间。timeo只用于非频繁的请求类型,若是未指定,从1.1秒起,每次重试前等待的时间翻翻,最大60秒。it
retrans=n io
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。