Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have our customer's ftp root tailored by creating "virtual" directories with mount. This means that we have some hundred directories mounted with the bind option.

Lately we've experienced problems where directories just won't unmount until we run umount several times, -lrf in different combinations doesn't even work. No error is presented by umount, but when I run rmdir it tells me Device or resource busy.

Should I expect this behaviour when we've mounted this amount of directories, or is there something else going on here?

share|improve this question
add comment

2 Answers

Try the lsof command to see if there are still open files in the offending path?

share|improve this answer
    
running lsof | grep the/path/in/question doesn't return anything –  Znarkus Oct 22 '10 at 15:33
    
Neither does lsof +D the/path/in/question or fuser -v the/path/in/question –  Znarkus Oct 23 '10 at 8:59
    
That's strange. I have only seen the error when I forget and there's a process running using a file in the path. –  Aaron Copley Oct 25 '10 at 14:20
add comment
up vote 0 down vote accepted

Seems like I have solved this.

I think the main problem was umount /path/to/ftp/dir/*. Replaced it with umount /path/to/ftp/dir/sub1, umount /path/to/ftp/dir/sub2, etc.

Also I don't use -l or any other modifier anymore. I probably need to review that, but for now this works best.

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.