How to unmount when umount hangs due to disconnected disk?

I have an external disk connected via USB that was accidentally disconnected uncleanly. Now lsing the directory in which it was mounted gives Input/output error. umounting the directory simply hangs. dmesg just contains:

[3360010.363235] usb 2-1.1: USB disconnect, device number 3

How do I resolve this (short of rebooting), i.e. how do I clean up kernel state upon unclean disconnect of an external storage device?


Lazy unmount usually does the trick.

sudo umount -l /path/where/its/mounted

For more info try man umount.


You should also be able to do

sudo umount -f /path/to/mount

From man umount:

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