Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

Have you tried lazy unmount? This usually does the trick for me.

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

For more info try man umount.

share|improve this answer

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.)
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.