Force unmount of NFS-mounted directory

Lorin Hochstein picture Lorin Hochstein · Sep 2, 2008 · Viewed 367.9k times · Source

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?

Answer

tessein picture tessein · Sep 2, 2008

You might try a lazy unmount:

umount -l