umount 出现 device is busy

当mount挂载了文件系统之后,卸载的时候

umount遇到 device is busy


[root@linusfay ~]# umount /mnt/share
umount: /mnt/share: device is busy
umount: /mnt/share: device is busy

原因:当任何目录有 mount, 然后有程序使用/挂在那个目录上的话, 就没有办法 umount 掉, 於 umount 时会出现 Device is busy 的错误。

类似的解决办法:

1、找哪个进程在使用该挂载目录,然后杀掉该进程,卸载目录。

[root@linusfay share]# fuser -m /mnt/share
/mnt/share:           5161c


[root@linusfay share]# ps aux |grep 5161 |grep -v grep
root      5161  0.0  0.0  66076  1520 pts/3    Ss   04:53   0:00 bash

[root@linusfay share]#kill  -9   5161

[root@linusfay ~]# umount share1

2、mount  -l  /mnt/share  当需卸载文件系统的引用不繁忙时直接卸载。

[root@linusfay share]# umount share1
umount: /mnt/share: device is busy
umount: /mnt/share: device is busy

[root@linusfay share]# umount  -l share1


查看是否完成卸载:

[root@linusfay share]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       36G   14G   21G  40% /
/dev/sda1              99M   23M   71M  25% /boot
tmpfs                 765M  364M  401M  48% /dev/shm


--没有看到  share1目录umount  -l share1已经完成卸载

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值