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?
Try the
lsof
command to see if there are still open files in the offending path?Seems like I have solved this.
I think the main problem was
umount /path/to/ftp/dir/*
. Replaced it withumount /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.