Lorin Hochstein Lorin Hochstein - 1 year ago 182
Linux Question

Force unmount of NFS-mounted directory

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 "
", 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 Source

You might try a lazy unmount:

umount -l
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download