[throw@t12 ~]$ sudo umount /data
umount: /data: target is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))sudo lsof|grep "/data"
可以看到一堆被占用的文件描述符。证明思路是对的。sudo ps -efaux|grep -i data
没看到几个相关的进程。所以这个命令思路错误。[throw@t12 ~]$ sudo fuser -m /data
/data: 12072ce 12571 12572 12573 12574 12575 12576
这个表示的都是进程号[throw@t12 ~]$ ps -aux|grep 12571
throw 2675 0.0 0.0 112648 972 pts/1 S+ 14:34 0:00 grep --color=auto 12571
zabbix 12571 0.0 0.0 82756 1260 ? S 2017 0:00 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
证明虽然进程可执行文件不在 /data目录,但是其使用的文件描述符在(结合lsof即可看到使用了哪些文件)
[throw@t11 ~]$ sudo fuser -m /data
/data: 3941 3942 3943 3944 3945 3946
[throw@t11 ~]$ ps aux|grep 3941
zabbix 3941 0.0 0.0 82756 1268 ? S Apr08 0:00 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
throw 22578 0.0 0.0 112648 976 pts/0 S+ 14:29 0:00 grep --color=auto 3941
[throw@t11 ~]$ ps aux|grep 394
zabbix 3941 0.0 0.0 82756 1268 ? S Apr08 0:00 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
zabbix 3942 0.0 0.0 82756 1796 ? S Apr08 0:54 /usr/sbin/zabbix_agentd: collector [idle 1 sec]
zabbix 3943 0.0 0.0 82876 2480 ? S Apr08 0:48 /usr/sbin/zabbix_agentd: listener #1 [waiting for connection]
zabbix 3944 0.0 0.0 82876 2480 ? S Apr08 0:48 /usr/sbin/zabbix_agentd: listener #2 [waiting for connection]
zabbix 3945 0.0 0.0 82876 2480 ? S Apr08 0:49 /usr/sbin/zabbix_agentd: listener #3 [waiting for connection]
zabbix 3946 0.0 0.0 82756 2244 ? S Apr08 0:12 /usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec]
throw 22841 0.0 0.0 112648 976 pts/0 S+ 14:30 0:00 grep --color=auto 394
[throw@t11 ~]$ sudo lsof|grep "/data"
zabbix_ag 3941 zabbix 1w REG 253,17 6996 5242882 /data/zabbix/zabbix_agentd.log
zabbix_ag 3941 zabbix 2w REG 253,17 6996 5242882 /data/zabbix/zabbix_agentd.log
zabbix_ag 3942 zabbix 1w REG 253,17 6996 5242882 /data/zabbix/zabbix_agentd.log
zabbix_ag 3942 zabbix 2w REG 253,17 6996 5242882 /data/zabbix/zabbix_agentd.log
zabbix_ag 3943 zabbix 1w REG 253,17 6996 5242882 /data/zabbix/zabbix_agentd.log
zabbix_ag 3943 zabbix 2w REG 253,17 6996 5242882 /data/zabbix/zabbix_agentd.log
zabbix_ag 3944 zabbix 1w REG 253,17 6996 5242882 /data/zabbix/zabbix_agentd.log
zabbix_ag 3944 zabbix 2w REG 253,17 6996 5242882 /data/zabbix/zabbix_agentd.log
zabbix_ag 3945 zabbix 1w REG 253,17 6996 5242882 /data/zabbix/zabbix_agentd.log
zabbix_ag 3945 zabbix 2w REG 253,17 6996 5242882 /data/zabbix/zabbix_agentd.log
zabbix_ag 3946 zabbix 1w REG 253,17 6996 5242882 /data/zabbix/zabbix_agentd.log
zabbix_ag 3946 zabbix 2w REG 253,17 6996 5242882 /data/zabbix/zabbix_agentd.log
[throw@t11 ~]$ sudo fuser -v /data/zabbix/zabbix_agentd.log
USER PID ACCESS COMMAND
/data/zabbix/zabbix_agentd.log:
zabbix 3941 F.... zabbix_agentd
zabbix 3942 F.... zabbix_agentd
zabbix 3943 F.... zabbix_agentd
zabbix 3944 F.... zabbix_agentd
zabbix 3945 F.... zabbix_agentd
zabbix 3946 F.... zabbix_agentd