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:)

Mario Loria is a builder of diverse infrastructure with modern workloads on both bare-metal and cloud platforms. He's traversed roles in system administration, network engineering, and DevOps. You can learn more about him here.