Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
    
Have you tried umount -l – Mitch May 7 '13 at 12:39
    
thanks, mitch - thats it! – Produnis May 7 '13 at 18:21
up vote 27 down vote accepted

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

share|improve this answer

try sudo umount -l {mountPoint} to do a "lazy unmount". Lets you move on with your life without waiting for the plumber to arrive.

share|improve this answer

In case umount -f -l /mnt/myfolder doesn't work service nfs restart (or it's equivalent on your linux) might.

share|improve this answer
    
The problem with this is if you have several nfs mounted paths from different servers and you don't want to drop other mount points which would affect other services. – Efren May 16 at 6:09

In my case where umount -f did not work, umount -fr worked. -r argument remounts as read-only and then unmounts the folder.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.