去掉挂载显示device is busy
代码语言:javascript复制出现此问题是当前挂载点上面有进程存在
[root@zabbix ~]# umount /dev/mapper/vg_zabbix-LogVol02
umount: /var: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
- 解决:
代码语言:javascript复制使用下面名查看挂载点上面运行的进程,然后停掉,操作如下:
[root@zabbix ~]# fuser -m -v /dev/mapper/vg_zabbix-LogVol02
USER PID ACCESS COMMAND
/dev/mapper/vg_zabbix-LogVol02:
root 1534 F.... auditd
root 1556 F.... rsyslogd
root 2024 F.... crond
- fuser -m –k /dev/mapper/vg_zabbix-LogVol02
代码语言:javascript复制注:上面是使用kill直接杀掉挂载点上面的进程,建议使用daemon的方式停掉进程。
[root@zabbix ~]# /etc/init.d/rsyslog stop
Shutting down system logger: [ OK ]
[root@zabbix ~]# fuser -m -v /dev/mapper/vg_zabbix-LogVol02
USER PID ACCESS COMMAND
/dev/mapper/vg_zabbix-LogVol02:
root 1534 F.... auditd
root 2024 F.... crond
[root@zabbix ~]# /etc/init.d/crond stop
Stopping crond: [ OK ]
[root@zabbix ~]# /etc/init.d/auditd stop
Stopping auditd: [ OK ]
[root@zabbix ~]# fuser -m -v /dev/mapper/vg_zabbix-LogVol0
Cannot stat /dev/mapper/vg_zabbix-LogVol0: No such file or directory
Cannot stat /dev/mapper/vg_zabbix-LogVol0: No such file or directory
Cannot stat /dev/mapper/vg_zabbix-LogVol0: No such file or directory
- 重新卸载
[root@zabbix ~]# umount /dev/mapper/vg_zabbix-LogVol02
参考链接:http://www.cnblogs.com/dkblog/archive/2012/07/18/2597192.html