Linux -- umount磁盘卸载失败怎么办?

问题描述:

因为挂载错了,想取消挂载,但是umount报告如下错误:

[root@chris /]# umount /dev/sdc1
umount: /data1: target is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))

根据描述应该其他进程对挂载的目录有占用的情况

解决方案:

关闭占用的进程,但是在使用fuser命令的时候显示没有这个命令

[root@chris /]# fuser -m /dev/sdc1
-bash: fuser: command not found

然后需要安装一下:

[root@chris /]# yum install -y psmisc

再去使用fuser命令查看进程:

[root@chris /]# fuser -m /dev/sdc1
/dev/sdc1:           10246c
[root@chris /]# ps aux | grep 10246
root     10246  0.0  0.0 116460  3212 pts/0    Ss+  Oct19   0:00 -bash

使用kill命令关闭进程:

[root@chris /]# kill -9 10246

关闭进程以后再umount就成功了:

[root@chris /]# umount /dev/sdc1

最后可以使用df -h查看挂载情况,会发现已经取消挂载成功!

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值