当前位置:   article > 正文

【Linux】umount 提示:device is busy 的处理方法(In some cases useful info about processes that use )_umount device is busy

umount device is busy

    感谢点赞和关注 ,每天进步一点点!加油!

目录

1. 执行取消挂载 

2. 强制卸载

3. 查看进程占用

 4. 取消磁盘挂载的全流程

5. 图示说明 


问题描述

umount: /var/centos7: target is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))

1. 执行取消挂载 

  1. [root@hdp01 centos7]# umount /var/centos7/
  2. umount: /var/centos7: target is busy.
  3. (In some cases useful info about processes that use
  4. the device is found by lsof(8) or fuser(1))

2. 强制卸载

  1. [root@hdp01 centos7]# umount /var/centos7/ -f
  2. umount: /var/centos7: target is busy.
  3. (In some cases useful info about processes that use
  4. the device is found by lsof(8) or fuser(1))

3. 查看进程占用

  1. [root@hdp01 centos7]# fuser -m /var/centos7/
  2. /var/centos7: 21746c

 4. 取消磁盘挂载的全流程

  1. [root@hdp01 centos7]# umount /var/centos7/
  2. umount: /var/centos7: target is busy.
  3. (In some cases useful info about processes that use
  4. the device is found by lsof(8) or fuser(1))
  5. [root@hdp01 centos7]# df -lh
  6. Filesystem Size Used Avail Use% Mounted on
  7. /dev/xvda1 40G 4.3G 34G 12% /
  8. devtmpfs 16G 0 16G 0% /dev
  9. tmpfs 16G 0 16G 0% /dev/shm
  10. tmpfs 16G 404K 16G 1% /run
  11. tmpfs 16G 0 16G 0% /sys/fs/cgroup
  12. tmpfs 3.2G 0 3.2G 0% /run/user/0
  13. /dev/xvdb1 492G 28G 439G 6% /var
  14. /dev/loop0 9.6G 9.6G 0 100% /var/centos7
  15. [root@hdp01 centos7]# umount /var/centos7/
  16. umount: /var/centos7: target is busy.
  17. (In some cases useful info about processes that use
  18. the device is found by lsof(8) or fuser(1))
  19. [root@hdp01 centos7]# umount /var/centos7/ -f
  20. umount: /var/centos7: target is busy.
  21. (In some cases useful info about processes that use
  22. the device is found by lsof(8) or fuser(1))
  23. [root@hdp01 centos7]# fuser -m /var/centos7/
  24. /var/centos7: 21746c
  25. [root@hdp01 centos7]# ps aux | grep 21746
  26. root 21746 0.0 0.0 117528 2212 pts/2 Ss May12 0:00 -bash
  27. root 27307 0.0 0.0 114692 960 pts/2 S+ 10:25 0:00 grep --color=auto 21746
  28. [root@hdp01 centos7]# kill -9 21746
  29. Connection to hdp01 closed.
  30. [root@hdp01 yum.repos.d]# ps aux | grep 21746
  31. root 27312 0.0 0.0 114692 956 pts/0 S+ 10:26 0:00 grep --color=auto 21746
  32. [root@hdp01 yum.repos.d]# umount /var/centos7/
  33. [root@hdp01 yum.repos.d]# df -lh
  34. Filesystem Size Used Avail Use% Mounted on
  35. /dev/xvda1 40G 4.3G 34G 12% /
  36. devtmpfs 16G 0 16G 0% /dev
  37. tmpfs 16G 0 16G 0% /dev/shm
  38. tmpfs 16G 380K 16G 1% /run
  39. tmpfs 16G 0 16G 0% /sys/fs/cgroup
  40. tmpfs 3.2G 0 3.2G 0% /run/user/0
  41. /dev/xvdb1 492G 28G 439G 6% /var

5. 图示说明 

最后成功 OK

谢谢点赞和关注!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/155303
推荐阅读
相关标签
  

闽ICP备14008679号