您的位置:首页 > 运维架构 > Linux

Linux umount device is busy

2010-07-13 23:57 483 查看
最近在umount时报下列外, 如:

#umount /sd03
Umount: /sd03 : device is busy.


这说明还有某个程序正在使用此目录, 为了保证程序的运行, 默认情况下umount不能卸载. 但是umount没说是哪个程序正在使用.
在Linux里有一个命令 fuser, 可以通过man fuser 看到具体的介绍:

Fuser - identify processes using files or sockets


#fuser –m 目录. 会显示使用目录的进程, 那么在umount之前, 可以先把这些进程先Kill.
另外就是使用umount –l 选项. Man umount

-l     Lazy  unmount. Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy any-more.  (Requires kernel 2.4.11 or later.)


当引用不繁忙时, 直接卸载与之目录相关系的文件系统. 推荐后者.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: