View Single Post

   
  #3 (permalink)  
Old 02-18-2008, 11:41 AM
Jason Campbell
 
Posts: n/a
Default Re: How do I kill the nfs daemons?

I use to have the same problem. I have been able to prevent it from
happening now. If you use the default settings for /etc/exports (nfs
server) and /etc/fstab (nfs client), they're mounted as "hard". Mount them
as "soft" and your problems should go away. Some examples (mercury is the
nfs server and venus is the nfs client):

root@mercury:~# cat /etc/exports
/mnt/home *.sysk-net.lan(rw,secure,sync,no_wdelay,root_squash)
/mnt/dl *.sysk-net.lan(rw,secure,sync,no_wdelay,no_root_squash)

root@venus:~# cat /etc/fstab

mercury:/mnt/home /home nfs
soft,rw,bg,intr,rsize=8192,wsize=8192,timeo=20,ret rans=3,retry=1

mercury:/mnt/dl /mnt/dl nfs
soft,rw,bg,intr,rsize=8192,wsize=8192,timeo=20,ret rans=3,retry=1

Now what happens when the nfs server goes down (really sucks since
/mnt/home is my /home on client -- X totally stops)? For a while, I can't
do anything on the client (except as root, since it's home (/root) is
locally mounted). But once the nfs server is back up, everything runs as
normal, as if nothing ever happened.

So, as far as an immediate fix for killing those daemons, killall -9
usually works. But for a long-term fix, use soft instead of the
hard default. Also, if you don't mount via /etc/fstab (aka, you use the
mount command directly) just use -o to put in soft option.

Hope this helps.

Jason Campbell
<syskill@sysk-net.com>

On Thu, 25 Sep 2003 14:00:39 -0700, Big Bird wrote:

> Here's the problem:
>
> Machine 1 exports a directory via nfs (no samba or similar nonsense).
>
> On machine 2 the directory is mounted.
>
> Machine 1 goes down (hardware reset) without any nice unmounting or
> such.
>
> blah... blah... blah...


Reply With Quote