ITPub博客

首页 > Linux操作系统 > Linux操作系统 > How to umount when the device is busy

How to umount when the device is busy

原创 Linux操作系统 作者:shengzhitan 时间:2010-09-07 09:42:59 0 删除 编辑

It happens all the time doesn’t it? You need to unmount a CD or you want to pack away the external drive but when you try to umount it you get the dreaded “device is busy” message. Wouldn’t it be great if Linux actually told you what was keeping the drive busy? Here we are in 2008, I’m using Ubuntu Gutsy, and that message hasn’t changed in all the years I’ve used Linux.

# umount /media/disk/
umount: /media/disk: device is busy
umount: /media/disk: device is busy

First thing you’ll do will probably be to close down all your terminals and xterms but here’s a better way. You can use the fuser command to find out which process was keeping the device busy:

# fuser -m /dev/sdc1
/dev/sdc1: 538
# ps auxw|grep 538
donncha 538 0.4 2.7 219212 56792 ? SLl Feb11 11:25 rhythmbox

Rhythmbox is the culprit! Close that down and umount the drive. Problem solved!

the “umount -l /mnt/sdb1” woked nicely

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24095423/viewspace-672853/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-07-16

  • 博文量
    20
  • 访问量
    29376