本文主要是介绍【Linux】umount 提示:device is busy 的处理方法(In some cases useful info about processes that use ),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
感谢点赞和关注 ,每天进步一点点!加油!
目录
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. 执行取消挂载
[root@hdp01 centos7]# umount /var/centos7/
umount: /var/centos7: target is busy.(In some cases useful info about processes that usethe device is found by lsof(8) or fuser(1))
2. 强制卸载
[root@hdp01 centos7]# umount /var/centos7/ -f
umount: /var/centos7: target is busy.(In some cases useful info about processes that usethe device is found by lsof(8) or fuser(1))
3. 查看进程占用
[root@hdp01 centos7]# fuser -m /var/centos7/
/var/centos7: 21746c
4. 取消磁盘挂载的全流程
[root@hdp01 centos7]# umount /var/centos7/
umount: /var/centos7: target is busy.(In some cases useful info about processes that usethe device is found by lsof(8) or fuser(1))
[root@hdp01 centos7]# df -lh
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 40G 4.3G 34G 12% /
devtmpfs 16G 0 16G 0% /dev
tmpfs 16G 0 16G 0% /dev/shm
tmpfs 16G 404K 16G 1% /run
tmpfs 16G 0 16G 0% /sys/fs/cgroup
tmpfs 3.2G 0 3.2G 0% /run/user/0
/dev/xvdb1 492G 28G 439G 6% /var
/dev/loop0 9.6G 9.6G 0 100% /var/centos7
[root@hdp01 centos7]# umount /var/centos7/
umount: /var/centos7: target is busy.(In some cases useful info about processes that usethe device is found by lsof(8) or fuser(1))
[root@hdp01 centos7]# umount /var/centos7/ -f
umount: /var/centos7: target is busy.(In some cases useful info about processes that usethe device is found by lsof(8) or fuser(1))
[root@hdp01 centos7]# fuser -m /var/centos7/
/var/centos7: 21746c
[root@hdp01 centos7]# ps aux | grep 21746
root 21746 0.0 0.0 117528 2212 pts/2 Ss May12 0:00 -bash
root 27307 0.0 0.0 114692 960 pts/2 S+ 10:25 0:00 grep --color=auto 21746
[root@hdp01 centos7]# kill -9 21746
Connection to hdp01 closed.
[root@hdp01 yum.repos.d]# ps aux | grep 21746
root 27312 0.0 0.0 114692 956 pts/0 S+ 10:26 0:00 grep --color=auto 21746
[root@hdp01 yum.repos.d]# umount /var/centos7/
[root@hdp01 yum.repos.d]# df -lh
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 40G 4.3G 34G 12% /
devtmpfs 16G 0 16G 0% /dev
tmpfs 16G 0 16G 0% /dev/shm
tmpfs 16G 380K 16G 1% /run
tmpfs 16G 0 16G 0% /sys/fs/cgroup
tmpfs 3.2G 0 3.2G 0% /run/user/0
/dev/xvdb1 492G 28G 439G 6% /var
5. 图示说明
最后成功 OK
谢谢点赞和关注!
这篇关于【Linux】umount 提示:device is busy 的处理方法(In some cases useful info about processes that use )的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!