Recently, it seems my NFS connections have been crashing hard, most recently, a saved file from my browser to my servers’ mount point via NFS which caused the VM I was using to completely lock up:( So I did some quick searching and found these options which you should use when mounting any NFS shares:

  • 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.
    

and to deal with timeouts:

timeo=5,retrans=5,actimeo=10,retry=5

Thanks stackexchange peoples:)

Blog Logo

Mario Loria


Published

Image

./scriptthe.net

Because 127.0.0.1 gets old after a while.

Back to Overview