6
29
2014
0

umount遇到问题

问题描述:在umount时遇到下面问题

umount /mnt/sdd1:device is busy.

     (In some cases useful info about processes that use the device is found by losf(8) or fuser(1))

 

解决方法:

一开始我使用ps查看正在运行进程,kill -9 也没有强制杀死,后来用了下述方法,成功搞定:

step1:fuser -m -v /mnt/sdd1 查看到底哪些进程使用了/mnt/add1

-m 指定路径表示的是一个磁盘挂载的目录或者磁盘分区

-v 指定fuser结果显示的格式

 

step 2:fuser -m -v -i -k /mnt/sdd1 杀死使用了/mnt/add1设备的进程

-k kill  杀死与/mnt/sdd1相关的进程

-i interactive .交互式的,该参数在Kill process时交互式询问用户是否要kill进程

问题与解决的截图如下:

 

补充一句:umount时若device is busy.你可以试试umount -l /dev/sdd1

其中-l是lazy的含义。man mount

 -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  anymore.
              (Requires kernel 2.4.11 or later.)
Category: Linux | Tags: | Read Count: 1353

登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter

Host by is-Programmer.com | Power by Chito 1.3.3 beta | Theme: Aeros 2.0 by TheBuckmaker.com