2011年11月21日 星期一

umount 發生device is busy



# umount /misc/remoteshare
umount: /misc/remoteshare: device is busy
umount: /misc/remoteshare: device is busy

查詢是否有程序在使用該目錄,但是出現 Input/output error
# fuser -m /misc/remoteshare
/misc/remoteshare: Input/output error

強制將該目錄釋放
# umount -l /misc/remoteshare


查詢是否有程序在使用該目錄,PID
# fuser -m /misc/remoteshare/
/misc/remoteshare/:   3324    4538c

後面c的意義如下
c: current directory.
e: executable being run.
f: open file. f is omitted in default display mode.
F: open file for writing. F is omitted in default display mode.
r: root directory.
m: mmap'ed file or shared library.


確認該程序是否可以停掉
ps -ef |grep 3324
ps -ef |grep 4538

停止該程序
kill 3324 4538

卸載目錄
umount /misc/remoteshare

如果還是不行,也可以使用強制卸載
umount -l /misc/remoteshare