Thursday, May 17, 2007

Kill NFS Client Process

Yesterday I had a 8-core system with 16GB of RAM running a load average of 4. It was trying to connect to an NFS mount that it could no longer reach. Trying to view the mounted directory resulted in hangs. You get around those by doing:
killall -9 rpciod
But that won't kill the process since it's really using a kernel thread which will keep trying to get to the mount on NFS's behalf. I added a local firewall rule which was enough to convince it to give up:
iptables -I OUTPUT -d x.x.x.x -j REJECT
where x.x.x.x is the IP of the NFS server. I was then able to umount it after a little bit of delay from the above. The load average then dropped to 0.01. Looks like I'm on some kind of RedHat kick since I gleamed this from Interrupting those pesky "uninterruptible" processes. I'm curious about all of this and the following seem helpful: While looking around for how to kill the process I found Useless use of kill -9 which has a fitting picture for its content.