Networking Forums

Networking Forums > Computer Networking > Linux Networking > HELP: NFS mount hangs when attempting to copy file

Reply
Thread Tools Display Modes

HELP: NFS mount hangs when attempting to copy file

 
 
Timothy Miller
Guest
Posts: n/a

 
      07-20-2005, 10:37 PM
I'm having a bit of a problem doing simple copies over an NFS mount.
The client is running Linux (2.6.11), and the server is running Solaris
(5.8).

When I first boot the client, getting NFS directory listings works just
fine. But the instant I try to copy a file (to or from), the NFS mount
hangs. While I can still do other network activity (even rlogin to the
server), any NFS access I try to do after that point hangs, including
directory listings.

I have had this same client and server working flawlessly for years.
The only change is that the client is now on a VPN. However, I have a
Sun machine on the same VPN network segment, and it can copy files with
no problem, so it's not the router that's blocking anything.

Also, after it hangs like that, I cannot reboot the machine normally.
When attempting to unmount the network filesystems, the shutdown hangs,
and I have to hard-reset the machine.

Is there anyone who could please help me to debug this problem? I
don't even know how to watch to see if there's any network traffic. As
far as I know, I have NFS setup properly, but I don't know enough about
it to know what options I might try. I don't even care if the fix
degrades performance; I just want it to not hang.

Does anyone have any ideas?

Thanks very much in advance!

 
Reply With Quote
 
 
 
 
Andy Fraser
Guest
Posts: n/a

 
      07-20-2005, 10:51 PM
Timothy Miller <(E-Mail Removed)> wrote:

> I'm having a bit of a problem doing simple copies over an NFS mount.
> The client is running Linux (2.6.11), and the server is running Solaris
> (5.8).
>
> When I first boot the client, getting NFS directory listings works just
> fine. But the instant I try to copy a file (to or from), the NFS mount
> hangs. While I can still do other network activity (even rlogin to the
> server), any NFS access I try to do after that point hangs, including
> directory listings.
>
> I have had this same client and server working flawlessly for years.
> The only change is that the client is now on a VPN. However, I have a
> Sun machine on the same VPN network segment, and it can copy files with
> no problem, so it's not the router that's blocking anything.


I had a similar problem when my 100Mbps switch blew up and I temporarily
replaced it with a 10Mbps hub. I got around it by experimenting with the
soft, rsize, wsize and timeo mount options. "man mount" will tell you
more.

--
Andy.
 
Reply With Quote
 
Timothy Miller
Guest
Posts: n/a

 
      07-20-2005, 11:13 PM
Thank you for responding. One thing I'm having trouble finding out is
what the default rsize and wsize numbers are. And should I try larger
or smaller?

Thanks.

 
Reply With Quote
 
Andy Fraser
Guest
Posts: n/a

 
      07-20-2005, 11:31 PM
Timothy Miller <(E-Mail Removed)> wrote:

> Thank you for responding. One thing I'm having trouble finding out is
> what the default rsize and wsize numbers are. And should I try larger
> or smaller?


I think I read somewhere that it's 4096 bytes for Linux. 1024 worked
well for me so maybe start there.

--
Andy.
 
Reply With Quote
 
Michael Heiming
Guest
Posts: n/a

 
      07-21-2005, 10:24 AM
In comp.os.linux.networking Timothy Miller <(E-Mail Removed)>:

[ NFS problems through VPN - solaris server <-> linux client ]

> Also, after it hangs like that, I cannot reboot the machine normally.
> When attempting to unmount the network filesystems, the shutdown hangs,
> and I have to hard-reset the machine.


Try mounting with "soft" as option.

> Is there anyone who could please help me to debug this problem? I
> don't even know how to watch to see if there's any network traffic. As
> far as I know, I have NFS setup properly, but I don't know enough about


Since you don't post your mount options we don't know the
settings.

I'd try mounting with "tcp", IIRC solaris defaults to udp, but
this is changing sometimes and from OS to OS so one can't really
tell for sure.

Lowering r/wsize as someone else already pointed out is another
thing to try out. Try going for the highest nfs version possible.

[..]

--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo (E-Mail Removed) | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 73: Daemons did it
 
Reply With Quote
 
Timothy Miller
Guest
Posts: n/a

 
      07-21-2005, 03:10 PM
Ok, here's an example of one of the mounts from /proc/mounts (just
found out about that):

fish:/export/home/tim /home/tim nfs
rw,v3,rsize=32768,wsize=32768,hard,udp,lock,addr=s un 0 0

Ok, so clearly, the default transfer size is WAY larger than any of us
expected. I wonder how that default got in there.

I've read that soft-mounting often causes havoc. If it actually DOES
timeout, bad stuff happens. What is your experience and reasoning
here?

I'll fiddle with all of the other settings. Thanks.

 
Reply With Quote
 
Michael Heiming
Guest
Posts: n/a

 
      07-21-2005, 04:11 PM
In comp.os.linux.networking Timothy Miller <(E-Mail Removed)>:
> Ok, here's an example of one of the mounts from /proc/mounts (just
> found out about that):


> fish:/export/home/tim /home/tim nfs
> rw,v3,rsize=32768,wsize=32768,hard,udp,lock,addr=s un 0 0


> Ok, so clearly, the default transfer size is WAY larger than any of us
> expected. I wonder how that default got in there.


Haven't seen this as default r/wsize on any distro whatever you
run? But a good value on a LAN, the default is about 8192 on many
systems. But those seem to change from time to time.

But might be one of the problems on your VPN, I'd lower this and
switch to "tcp" instead of "udp" at first.

> I've read that soft-mounting often causes havoc. If it actually DOES
> timeout, bad stuff happens. What is your experience and reasoning
> here?


My experience is exactly different, many problems with hard
mounting and zero with soft mounting.

> I'll fiddle with all of the other settings. Thanks.


Yep, the difference with tcp instead of udp would be most
interesting, if the server supports that.

--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo (E-Mail Removed) | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 325: Your processor does not develop enough heat.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: NFS hangs during mount J G Miller Linux Networking 11 08-19-2010 02:50 PM
mount mount file system using nfs Jim Anderson Linux Networking 2 07-16-2008 09:19 PM
NFS mount hangs when using one specific IP Michael Ritzert Linux Networking 8 05-24-2005 10:28 AM
win98se hangs while network copy Deepak Patni Windows Networking 3 12-09-2003 07:16 PM
nfs connection: mount hangs Mario Premke Linux Networking 0 10-16-2003 11:13 AM



1 2 3 4 5 6 7 8 9 10 11