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。