umount: /var: device is busy

2018-01-02 10:48:50 浏览数 (2)

去掉挂载显示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

注:上面是使用kill直接杀掉挂载点上面的进程,建议使用daemon的方式停掉进程。

代码语言:javascript复制
[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
  • 重新卸载
代码语言:javascript复制
[root@zabbix ~]# umount /dev/mapper/vg_zabbix-LogVol02

参考链接:http://www.cnblogs.com/dkblog/archive/2012/07/18/2597192.html

0 人点赞