通常,在挂载NFS时,最好将标志设置如下:
bg,intr,soft
bg If the first NFS mount attempt times out, retry the mount in the
background. After a mount operation is backgrounded, all subsequent mounts
on the same NFS server will be backgrounded immediately, without first
attempting the mount. A missing mount point is treated as a timeout, to
allow for nested NFS mounts.
soft If an NFS file operation has a major timeout then report an I/O error
to the calling program. The default is to continue retrying NFS file
operations indefinitely.
intr If an NFS file operation has a major timeout and it is hard mounted,
then allow signals to interupt the file operation and cause it to return
EINTR to the calling program. The default is to not allow file operations
to be interrupted.
您还可以设置:
timeo=5,retrans=5,actimeo=10,retry=5
如果NFS服务器断开连接,然后等待重试,则应该允许NFS挂载超时并使目录不可访问。
查看此链接,以获取有关NFS挂载选项的更多信息。
/etc/fstab
吗?