linux – NFS:服务器脱机时无法卸载NFS共享


1. `df` does not work (times out)
2. `lsof` does not work (times out)
3. I cannot unmount the share (umount times out)
4. I cannot restart the client PC, the shutdown process gets stuck 
   while trying to umount the dead NFS share: 
   `nfs server not responding still trying`
5. hard reboot (reset) works, but while booting the client PC gets 
   stuck while trying to mount the NFS share

现在我知道如何解决问题nr.我可以将fstab中的条目更改为noauto.但其他问题呢? NFS客户端是否没有智能停止等待死NFS服务器?为什么它会无休止地等待?我可以在某处设置超时,以便无论发生什么,在x秒后他放弃尝试?








If a file request fails, the NFS client will report an error to the process on the client machine requesting the file access. Some programs can handle this with composure, most won’t. We do not recommend using this setting; it is a recipe for corrupted files and lost data. You should especially not use this for mail disks — if you value your mail, that is.


The program accessing a file on a NFS mounted file system will hang when the server crashes. The process cannot be interrupted or killed (except by a “sure kill”) unless you also specify intr. When the NFS server is back online the program will continue undisturbed from where it was. We recommend using hard,intr on all NFS mounted file systems.

在/ etc / fstab文件中

   # device             mountpoint  fs-type    options    dump fsckord
   ...  /mnt/home   nfs      rw,soft  0     0

转载注明原文:linux – NFS:服务器脱机时无法卸载NFS共享 - 代码日志