Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I mounted a remote file system using sshfs (version 2.8.4)

sshfs -o allow_root [email protected]: ./example

but unmounting it fails

> fusermount -u example
umount: /home/joeuser/example: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))

Any ideas as to what might be causing this error and how one might fix it?

share|improve this question
add comment

3 Answers

up vote 4 down vote accepted

Some program is using a file in the filesystem you're trying to unmount. It could be a file opened for reading or writing, a current directory, or a few more obscure cases. It could even be due to a directory on the filesystem being a mount point.

To investigate, run lsof +f -- example. It will tell what the process(es) are using the filesystem. Make your own judgement as to whether to make them close files, kill them, or defer the unmount operation.

share|improve this answer
add comment

I think you want a lazy unmount:

sudo umount -l example
share|improve this answer
    
I think your suggestion is incorrect. According to the manual page lazy umount Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem *as soon as it is not busy* anymore. So it will not resolve the original issue. Agreed with @Gilles, lsof should help here. –  user83293 Sep 24 '13 at 6:50
add comment

I often see "device busy" with sshfs when I have a terminal window open to a directory on the sshfs share. Exiting the terminal or changing directories to a local share then running fusermount -u solves my problems.

share|improve this answer
add comment

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.