Ubuntu – How to unmount NFS when server is gone

nfsunmount

I am mounting a NFS-folder from a server to my laptop.

Unfortunately, the server goes off sometimes… The problem is, that I cannot unmount the "dead" NFS-folder. On the command-line, I get "device is busy", and via nautilus it crashes my current session.

Is there any way to unmount a NFS-folder when the server is off?

Best Answer

You can use umount -f -l /mnt/myfolder, and that will fix the problem.

  • -f – Force unmount (in case of an unreachable NFS system). (Requires kernel 2.1.116 or later.)

  • -l – Lazy unmount. Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy anymore. (Requires kernel 2.4.11 or later.)

Source:Linux Complete Command Reference

Related Question