记录日常工作关于系统运维,虚拟化云计算,数据库,网络安全等各方面问题。

Centos6/RHEL6 去掉顽固进程 nfsiod

主机系统最开始使用过NFS或是装过NFS软件后,默认开机运行过,现在要求把NFS软件去除掉,

不再使用,但是发现一个顽固进程nfsiod,NFS服务停掉,软件删除后,还是一样在。

这时主机系统不能重启,所以只能想办法了,经过多次测试,发现是与内核加载的模块有关。

卸载掉对应NFS模块就可以了。

[root@tomcat-weblogic ~]# mount -t nfs 192.168.137.13:/mnt /opt

[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]# ps aux |grep nfs
root      1774  0.0  0.0      0     0 ?        S    16:08   0:00 [nfsd4]
root      1775  0.0  0.0      0     0 ?        S    16:08   0:00 [nfsd4_callbacks]
root      1776  0.0  0.0      0     0 ?        S    16:08   0:00 [nfsd]
root      1777  0.0  0.0      0     0 ?        S    16:08   0:00 [nfsd]
root      1778  0.0  0.0      0     0 ?        S    16:08   0:00 [nfsd]
root      1779  0.0  0.0      0     0 ?        S    16:08   0:00 [nfsd]
root      1780  0.0  0.0      0     0 ?        S    16:08   0:00 [nfsd]
root      1781  0.0  0.0      0     0 ?        S    16:08   0:00 [nfsd]
root      1782  0.0  0.0      0     0 ?        S    16:08   0:00 [nfsd]
root      1783  0.0  0.0      0     0 ?        S    16:08   0:00 [nfsd]
root      1833  0.0  0.0      0     0 ?        S    16:12   0:00 [nfsiod]
root      1834  0.0  0.0      0     0 ?        S    16:12   0:00 [nfsv4.0-svc]
root      1841  0.0  0.0 103316   880 pts/0    S+   16:12   0:00 grep nfs
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]# umount /mnt/
umount: /mnt/: not mounted
[root@tomcat-weblogic ~]# umount /opt/
[root@tomcat-weblogic ~]# ps aux |grep nfs
root      1774  0.0  0.0      0     0 ?        S    16:08   0:00 [nfsd4]
root      1775  0.0  0.0      0     0 ?        S    16:08   0:00 [nfsd4_callbacks]
root      1776  0.0  0.0      0     0 ?        S    16:08   0:00 [nfsd]
root      1777  0.0  0.0      0     0 ?        S    16:08   0:00 [nfsd]
root      1778  0.0  0.0      0     0 ?        S    16:08   0:00 [nfsd]
root      1779  0.0  0.0      0     0 ?        S    16:08   0:00 [nfsd]
root      1780  0.0  0.0      0     0 ?        S    16:08   0:00 [nfsd]
root      1781  0.0  0.0      0     0 ?        S    16:08   0:00 [nfsd]
root      1782  0.0  0.0      0     0 ?        S    16:08   0:00 [nfsd]
root      1783  0.0  0.0      0     0 ?        S    16:08   0:00 [nfsd]
root      1833  0.0  0.0      0     0 ?        S    16:12   0:00 [nfsiod]
root      1847  0.0  0.0 103316   876 pts/0    R+   16:13   0:00 grep nfs
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]# /etc/init.d/nfs
nfs      nfslock  
[root@tomcat-weblogic ~]# /etc/init.d/nfs
nfs      nfslock  
[root@tomcat-weblogic ~]# /etc/init.d/nfs stop
Shutting down NFS daemon:                                  [  OK  ]
Shutting down NFS mountd:                                  [  OK  ]
Shutting down NFS services:                                [  OK  ]
Shutting down RPC idmapd:                                  [  OK  ]
[root@tomcat-weblogic ~]# ps aux |grep nfs
root      1833  0.0  0.0      0     0 ?        S    16:12   0:00 [nfsiod]
root      1919  0.0  0.0 103316   880 pts/0    R+   16:13   0:00 grep nfs
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]# /etc/init.d/rpcbind stop
Stopping rpcbind:                                          [  OK  ]
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]# ps aux |grep nfs        
root      1833  0.0  0.0      0     0 ?        S    16:12   0:00 [nfsiod]
root      1938  0.0  0.0 103316   884 pts/0    S+   16:13   0:00 grep nfs
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]# /etc/init.d/rpc
rpcbind     rpcgssd     rpcidmapd   rpcsvcgssd  
[root@tomcat-weblogic ~]# /etc/init.d/rpc
rpcbind     rpcgssd     rpcidmapd   rpcsvcgssd  
[root@tomcat-weblogic ~]# /etc/init.d/rpcgssd stop
Stopping RPC gssd:                                         [FAILED]
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]# yum remove nfs*
Loaded plugins: fastestmirror, refresh-packagekit
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package nfs-utils.x86_64 1:1.2.3-78.el6_10.2 will be erased
---> Package nfs-utils-lib.x86_64 0:1.1.5-13.el6 will be erased
---> Package nfs-utils-lib-devel.x86_64 0:1.1.5-13.el6 will be erased
---> Package nfs4-acl-tools.x86_64 0:0.3.3-8.el6 will be erased
---> Package nfsometer.noarch 0:1.6-1.el6 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================
 Package                                    Arch                          Version                                      Repository                       Size
=============================================================================================================================================================
Removing:
 nfs-utils                                  x86_64                        1:1.2.3-78.el6_10.2                          @updates                        1.0 M
 nfs-utils-lib                              x86_64                        1.1.5-13.el6                                 @base                           157 k
 nfs-utils-lib-devel                        x86_64                        1.1.5-13.el6                                 @base                           244 k
 nfs4-acl-tools                             x86_64                        0.3.3-8.el6                                  @base                           102 k
 nfsometer                                  noarch                        1.6-1.el6                                    @epel                           633 k

Transaction Summary
=============================================================================================================================================================
Remove        5 Package(s)

Installed size: 2.1 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : nfs-utils-lib-devel-1.1.5-13.el6.x86_64                                                                                                   1/5
  Erasing    : nfsometer-1.6-1.el6.noarch                                                                                                                2/5
  Erasing    : nfs-utils-lib-1.1.5-13.el6.x86_64                                                                                                         3/5
  Erasing    : 1:nfs-utils-1.2.3-78.el6_10.2.x86_64                                                                                                      4/5
warning:    erase unlink of /var/lib/nfs/v4recovery failed: No such file or directory
warning:    erase unlink of /var/lib/nfs/statd/sm.bak failed: No such file or directory
warning:    erase unlink of /var/lib/nfs/statd/sm failed: No such file or directory
warning:    erase unlink of /var/lib/nfs/statd failed: No such file or directory
warning:    erase rmdir of /var/lib/nfs/rpc_pipefs failed: Device or resource busy
  Erasing    : nfs4-acl-tools-0.3.3-8.el6.x86_64                                                                                                         5/5
  Verifying  : nfsometer-1.6-1.el6.noarch                                                                                                                1/5
  Verifying  : 1:nfs-utils-1.2.3-78.el6_10.2.x86_64                                                                                                      2/5
  Verifying  : nfs4-acl-tools-0.3.3-8.el6.x86_64                                                                                                         3/5
  Verifying  : nfs-utils-lib-1.1.5-13.el6.x86_64                                                                                                         4/5
  Verifying  : nfs-utils-lib-devel-1.1.5-13.el6.x86_64                                                                                                   5/5

Removed:
  nfs-utils.x86_64 1:1.2.3-78.el6_10.2  nfs-utils-lib.x86_64 0:1.1.5-13.el6  nfs-utils-lib-devel.x86_64 0:1.1.5-13.el6  nfs4-acl-tools.x86_64 0:0.3.3-8.el6
  nfsometer.noarch 0:1.6-1.el6         

Complete!
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]# ls
dead.letter  gnome-terminal.desktop
[root@tomcat-weblogic ~]# mount
/dev/mapper/VolGroup-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
/dev/sdb1 on /data type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]# ps aux |grep nfs        
root      1833  0.0  0.0      0     0 ?        S    16:12   0:00 [nfsiod]
root      2025  0.0  0.0 103316   884 pts/0    S+   16:14   0:00 grep nfs
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]# umount /proc/fs/nfsd
[root@tomcat-weblogic ~]# ps aux |grep nfs    
root      1833  0.0  0.0      0     0 ?        S    16:12   0:00 [nfsiod]
root      2028  0.0  0.0 103316   876 pts/0    R+   16:14   0:00 grep nfs
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]# umount /var/lib/nfs/
.etab.lock   export-lock  rpc_pipefs/  
[root@tomcat-weblogic ~]# umount /var/lib/nfs/rpc_pipefs/
cache/    lockd/    mount/    nfs/      nfsd4_cb/ portmap/  statd/    
[root@tomcat-weblogic ~]# umount /var/lib/nfs/rpc_pipefs/
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]# mount
/dev/mapper/VolGroup-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
/dev/sdb1 on /data type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]# ps aux |grep nfs               
root      1833  0.0  0.0      0     0 ?        S    16:12   0:00 [nfsiod]
root      2032  0.0  0.0 103316   880 pts/0    R+   16:15   0:00 grep nfs
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]# lsmod
Module                  Size  Used by
nfs                   432170  0
fscache                61337  1 nfs
nfsd                  312300  0
lockd                  74752  2 nfs,nfsd
nfs_acl                 2647  2 nfs,nfsd
auth_rpcgss            46116  2 nfs,nfsd
sunrpc                268897  6 nfs,nfsd,lockd,nfs_acl,auth_rpcgss
exportfs                4300  1 nfsd
ipt_REJECT              2383  2
nf_conntrack_ipv4       9218  2
nf_defrag_ipv4          1483  1 nf_conntrack_ipv4
xt_iprange              2216  1
iptable_filter          2793  1
ip_tables              17895  1 iptable_filter
ip6t_REJECT             4372  2
nf_conntrack_ipv6       7985  3
nf_defrag_ipv6         26637  1 nf_conntrack_ipv6
xt_state                1492  5
nf_conntrack           79761  3 nf_conntrack_ipv4,nf_conntrack_ipv6,xt_state
ip6table_filter         2889  1
ip6_tables             18828  1 ip6table_filter
ipv6                  337436  139 ip6t_REJECT,nf_conntrack_ipv6,nf_defrag_ipv6
hv_netvsc              27638  0
hv_utils               14902  0
hv_balloon             13836  0 [permanent]
joydev                 10512  0
sg                     29446  0
i2c_piix4              11520  0
i2c_core               29164  1 i2c_piix4
ext4                  381584  3
jbd2                   93380  1 ext4
mbcache                 8193  1 ext4
sr_mod                 15049  0
cdrom                  39565  1 sr_mod
pata_acpi               3701  0
ata_generic             3837  0
ata_piix               24409  0
sd_mod                 37190  5
crc_t10dif              1209  1 sd_mod
hyperv_keyboard         3196  0
hid_hyperv              4342  0
hv_storvsc             12817  3
hyperv_fb               8965  1
hv_vmbus              280572  7 hv_netvsc,hv_utils,hv_balloon,hyperv_keyboard,hid_hyperv,hv_storvsc,hyperv_fb
dm_mirror              14864  0
dm_region_hash         12181  1 dm_mirror
dm_log                  9930  2 dm_mirror,dm_region_hash
dm_mod                102823  8 dm_mirror,dm_log
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]# in
in               info             infokey          init             insmod           install          install-info     instmodsh        
indxbib          infocmp          infotocap        initctl          insmod.static    install-catalog  installkernel    invest-chart     
[root@tomcat-weblogic ~]# ins
insmod           insmod.static    install          install-catalog  install-info     installkernel    instmodsh        
[root@tomcat-weblogic ~]# ins
insmod           insmod.static    install          install-catalog  install-info     installkernel    instmodsh        
[root@tomcat-weblogic ~]# m
Display all 101 possibilities? (y or n)
[root@tomcat-weblogic ~]# rm
rm           rmdir        rmic         rmid         rmiregistry  rmmod        
[root@tomcat-weblogic ~]# rmmod
.bash_history           .config/                .gconf/                 .ICEauthority           .pki/                   
.bash_logout            .cshrc                  .gnome2/                .java/                  .pulse/                 
.bash_profile           .dbus/                  gnome-terminal.desktop  .local/                 .pulse-cookie           
.bashrc                 dead.letter             .gtk-bookmarks          .mysql_history          .tcshrc                 
.cache/                 .esd_auth               .gvfs/                  .nautilus/              .Xauthority             
[root@tomcat-weblogic ~]# rmmod fscache
ERROR: Module fscache is in use by nfs
[root@tomcat-weblogic ~]# rmmod nfs
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]# lsmod        
Module                  Size  Used by
fscache                61337  0
nfsd                  312300  0
lockd                  74752  1 nfsd
nfs_acl                 2647  1 nfsd
auth_rpcgss            46116  1 nfsd
sunrpc                268897  4 nfsd,lockd,nfs_acl,auth_rpcgss
exportfs                4300  1 nfsd
ipt_REJECT              2383  2
nf_conntrack_ipv4       9218  2
nf_defrag_ipv4          1483  1 nf_conntrack_ipv4
xt_iprange              2216  1
iptable_filter          2793  1
ip_tables              17895  1 iptable_filter
ip6t_REJECT             4372  2
nf_conntrack_ipv6       7985  3
nf_defrag_ipv6         26637  1 nf_conntrack_ipv6
xt_state                1492  5
nf_conntrack           79761  3 nf_conntrack_ipv4,nf_conntrack_ipv6,xt_state
ip6table_filter         2889  1
ip6_tables             18828  1 ip6table_filter
ipv6                  337436  139 ip6t_REJECT,nf_conntrack_ipv6,nf_defrag_ipv6
hv_netvsc              27638  0
hv_utils               14902  0
hv_balloon             13836  0 [permanent]
joydev                 10512  0
sg                     29446  0
i2c_piix4              11520  0
i2c_core               29164  1 i2c_piix4
ext4                  381584  3
jbd2                   93380  1 ext4
mbcache                 8193  1 ext4
sr_mod                 15049  0
cdrom                  39565  1 sr_mod
pata_acpi               3701  0
ata_generic             3837  0
ata_piix               24409  0
sd_mod                 37190  5
crc_t10dif              1209  1 sd_mod
hyperv_keyboard         3196  0
hid_hyperv              4342  0
hv_storvsc             12817  3
hyperv_fb               8965  1
hv_vmbus              280572  7 hv_netvsc,hv_utils,hv_balloon,hyperv_keyboard,hid_hyperv,hv_storvsc,hyperv_fb
dm_mirror              14864  0
dm_region_hash         12181  1 dm_mirror
dm_log                  9930  2 dm_mirror,dm_region_hash
dm_mod                102823  8 dm_mirror,dm_log
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]#
[root@tomcat-weblogic ~]# ps aux |grep nfs
root      2038  0.0  0.0 103316   880 pts/0    R+   16:16   0:00 grep nfs
[root@tomcat-weblogic ~]# ps aux |grep nfs


转载请标明出处【Centos6/RHEL6 去掉顽固进程 nfsiod】。

《www.92cto.com》 虚拟化云计算,系统运维,安全技术服务.

网站已经关闭评论