zoukankan      html  css  js  c++  java
  • centos7执行umount提示:device is busy或者target is busy解决方法

    问题描述:

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

    [root@zabbix /]# 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@zabbix /]# fuser -m /dev/sdc1
    -bash: fuser: command not found

    然后需要安装一下:

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

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

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

    使用kill命令关闭进程:

    [root@zabbix /]# kill -9 10246

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

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

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

  • 相关阅读:
    vs中无法找到头文件
    c++ vector 用法
    c++ queue 用法
    c++ 中 毫秒级时间获取
    vs2013 boost signals
    vs2013环境下boost配置
    C++ static 用法
    fopen()和fclose()
    删除字符串尾的回车符
    WaitForSingleObject()
  • 原文地址:https://www.cnblogs.com/Sungeek/p/9831495.html
Copyright © 2011-2022 走看看