Force unmount of NFS-mounted directory

Question :

Force unmount of NFS-mounted directory,

Answer :

I have an NFS-mounted directory on a Linux machine that has hung. I’ve tried to force an unmount, but it doesn’t seem to work:

$ umount -f /mnt/data  $ umount2: Device or resource busy  $ umount: /mnt/data: device is busy  

If I type “mount“, it appears that the directory is no longer mounted, but it hangs if I do “ls /mnt/data“, and if I try to remove the mountpoint, I get:

$ rmdir /mnt/data  rmdir: /mnt/data: Device or resource busy  

Is there anything I can do other than reboot the machine?

Read More  Developing a online exam application, how do I prevent cheaters?


You might try a lazy unmount:

umount -l  

That’s the answer Force unmount of NFS-mounted directory, Hope this helps those looking for an answer. Then we suggest to do a search for the next question and find the answer only on our site.

Disclaimer :

The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you