umount: /var: device is busy

去掉挂载显示device is busy

出现此问题是当前挂载点上面有进程存在

[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))
  • 解决:

使用下面名查看挂载点上面运行的进程,然后停掉,操作如下:

[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

注:上面是使用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

本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。

发表于

我来说两句

0 条评论
登录 后参与评论

相关文章

扫码关注云+社区