umount : /software : device is busy
操作系统:RHEL6.4 - 64在Linux操作系统(虚拟机)中有/software文件系统正在被访问
直接使用umount命令卸载提示 device is busy
使用fuser命令查看并杀掉相关进程可正常卸载
查看当前文件系统
[root@rhel64 ~]# df -Th

克隆一个会话session2,cd 切换到/software/,模拟正在使用此文件系统

session1 执行umount 卸载/software文件系统,提示device is busy
[root@rhel64 ~]# umount /software/
[root@rhel64 ~]# df -Th

fuser --help查看命令帮助
查看访问文件系统的用户、进程号
[root@rhel64 ~]# fuser -av /software/

杀掉访问文件系统的进程
也可以使用kill -9 2020 直接杀进程,但当多个进程访问时fuser -k更方便
[root@rhel64 ~]# fuser -k /software/

session2 标签显示会话已经断开

再次尝试卸载文件系统成功
[root@rhel64 ~]# df -Th
[root@rhel64 ~]# umount /software/
[root@rhel64 ~]# df -Th

本文永久更新链接地址:http://www.linuxidc.com/Linux/2015-12/126304.htm
