位置:- 正文

Linux中遇到device is busy的处理方法(linux device drivers)

编辑:rootadmin
今天小编将为大家分享的是Linux中遇到device is busy的处理方法。希望对大家会有帮助,有需要的朋友一起去看看吧... 17-04-17

推荐整理分享Linux中遇到device is busy的处理方法(linux device drivers),希望有所帮助,仅作参考,欢迎阅读内容。

文章相关热门搜索词:linux device id,linux device id,linux device drivers,linux device not managed by,linux device drivers,linux device driver,linux device not found,linux中遇到的命令问题,内容如对您有帮助,希望把文章链接给更多的朋友!

在Linux管理umount设备时,时常会遇到"device is busy", 如果umount一个文件系统碰到这种情况,并且你并没有在所需卸载的目录下。那么很可能有用户或进程在使用那个目录。

# umount /mnt

umount: /mnt: device is busy

umount: /mnt: device is busy

那么必须用fuser命令来查看process ID和进程的拥有者,比如:

# fuser -mu /mnt

/mnt: 25781c(root)

# kill -9 25781

# umount /mnt

像下面这种情况,就代表rhythmbox用户在使用那个目录。然后也可以用fuser -ck /dev/sdc1来杀进程。

Linux中遇到device is busy的处理方法(linux device drivers)

# fuser -m /dev/sdc1

/dev/sdc1: 538

# ps auxw|grep 538

donncha 538 0.4 2.7 219212 56792 SLl Feb11 11:25 rhythmbox

如果所有这些努力还不奏效,杀掉该进程后,那么这个时候可能需要加-f -l参数,强制卸载

# umount -f -l /mnt

NOTE:

可用下面的命令来检查SATA硬盘的坏块。

# badblocks -v /dev/sda

# badblocks -v /dev/sdb

# badblocks -v /dev/mapper/vgosi-lvol1

Checking blocks 0 to 10477568

Checking for bad blocks (read-only test): done

Pass completed, 0 bad blocks found.

本文链接地址:https://www.jiuchutong.com/zhishi/280072.html 转载请保留说明!
下一篇链接:https://www.jiuchutong.com/zhishi/280073.html
免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络