Linux目录使用umount提示umount: /databack: target is busy.

由于Linux硬盘移除后没有将挂载的目录没有移除,后续使用umoun提示tumount: /databack: target is busy.

[root@VM-12-15-centos ~]# umount /databack
umount: /databack: target is busy.

这种情况是有进程在使用导致的,使用

fuser #查询使用进程信息
fuser
No process specification given
Usage: fuser [-fIMuvw] [-a|-s] [-4|-6] [-c|-m|-n SPACE]
             [-k [-i] [-SIGNAL]] NAME...
       fuser -l
       fuser -V
Show which processes use the named files, sockets, or filesystems.

  -a,--all              display unused files too
  -i,--interactive      ask before killing (ignored without -k)
  -I,--inode            use always inodes to compare files
  -k,--kill             kill processes accessing the named file
  -l,--list-signals     list available signal names
  -m,--mount            show all processes using the named filesystems or
                        block device
  -M,--ismountpoint     fulfill request only if NAME is a mount point
  -n,--namespace SPACE  search in this name space (file, udp, or tcp)
  -s,--silent           silent operation
  -SIGNAL               send this signal instead of SIGKILL
  -u,--user             display user IDs
  -v,--verbose          verbose output
  -w,--writeonly        kill only processes with write access
  -V,--version          display version information
  -4,--ipv4             search IPv4 sockets only
  -6,--ipv6             search IPv6 sockets only
  -                     reset options

  udp/tcp names: [local_port][,[rmt_host][,[rmt_port]]]  
[root@VM-12-15-centos ~]# fuser -mv /databack/
                     USER        PID ACCESS COMMAND
/databack:           root     kernel mount /databack
                     root      95595 ..c.. mysqld_safe
                     mysql     95766 F.c.. mysqld
[root@VM-12-15-centos ~]#
  • 使用-km /kv参数将进程杀掉
[root@VM-12-15-centos ~]# fuser -kv /databack/
                     USER        PID ACCESS COMMAND
/databack:           root     kernel mount /databack
[root@VM-12-15-centos ~]# fuser -km /databack
/databack:           95595c 95766c
[root@VM-12-15-centos ~]#
[root@VM-12-15-centos ~]# fuser -km /databack
  • 在使用umount再去操作就可以了,再使用df -TH查询磁盘情况已经卸载掉了
[root@VM-12-15-centos ~]# umount /databack
[root@VM-12-15-centos ~]#

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值