1825002 Members
2647 Online
109678 Solutions
New Discussion юеВ

Re: NFS Mount - TCP only

 
SOLVED
Go to solution
Karthik S S
Honored Contributor

NFS Mount - TCP only

Hi,

How do I mount a NFS share on the client so that it uses only tcp for communication ( I believe it is udp by default). I could not find any clue from the man pages. Is there any specific option which can be passed thru -o switch of mount command??

Pl. help

Thanks
Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
17 REPLIES 17
James A. Donovan
Honored Contributor

Re: NFS Mount - TCP only

Add "NFS_TCP=1" to your /etc/rc.config.d/nfsconf file, and restart your NFS client services.
Remember, wherever you go, there you are...
Kent Ostby
Honored Contributor

Re: NFS Mount - TCP only

I believe that would be:

mount -f NFS -o proto=tcp nfs_server:/exported_file /local_mount_point

Best regards,

Kent M. Ostby
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
Helen French
Honored Contributor

Re: NFS Mount - TCP only

Whcih version of OS are you using? The "NFS_TCP" option is not valid on 11i (11.11). In 11i, you can have TCP or UPD with a mount option. In 11i, the default protocol is TCP and if you want to use UDP use '-o proto=udp" option with mount command.

In either case, if TCP is not available on nfs server, it will fall back to UDP.
Life is a promise, fulfill it!
Steven E. Protter
Exalted Contributor

Re: NFS Mount - TCP only

Version 3 of NFS was changed to rely on TCP for performance and reliablitity.

Unless my pea brain molecules are wrong about what was said 16 months ago in HP school.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Karthik S S
Honored Contributor

Re: NFS Mount - TCP only

Thanks a lot for all your help. I use 11.00 and set the parameter in nfsconf file and mounted the share. Now how do I make sure that NFS mount is using tcp ... I tried running rpcinfo but it hangs :-( ... Is there any other way by which I can find out??

-Thanks
Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
Uday_S_Ankolekar
Honored Contributor

Re: NFS Mount - TCP only

I thisnk you can try with "netstat -a" command

-USA..
Good Luck..
Helen French
Honored Contributor

Re: NFS Mount - TCP only

You can use 'netstat' command to see it. Also 'lsof' will be another tooll that will help you. Make sure the server and client side are enabled for TCP protocol nfs mounts.
Life is a promise, fulfill it!
Kevin Wright
Honored Contributor

Re: NFS Mount - TCP only

nfsstat -m
PVR
Valued Contributor

Re: NFS Mount - TCP only

In HP ux 11.0 u have to add the line NFS_TCP=1 in the /etc/rc.config.d/nfsconfi file to enable this. This will work only if the patch for the same is installed in the server.

U can confirm it with rpcinfo -p server command. If it doesn't work use netstat -an | grep -i nfsd. if it gives "established" in the output, u can ensure that it is using tcp.

In the NFS server side, export the share with options, vers=3,proto=tcp and mount at client side also with the same options.

Don't give up. Try till success...
Karthik S S
Honored Contributor

Re: NFS Mount - TCP only

Now How do I enable NFS Over TCP on Linux 8.0??

Thanks,
Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
Suresh Patoria
Super Advisor

Re: NFS Mount - TCP only

Hi,

You can check the communication using nfsstat command

whethere it is on TCP or UDP

Thanx
T G Manikandan
Honored Contributor

Re: NFS Mount - TCP only

What kernel version are you running?


Just check with #uname -a
Karthik S S
Honored Contributor

Re: NFS Mount - TCP only

Redhad Linux 9.0, Kernel 2.4.20-8

Thanx,
Karthik
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
James A. Donovan
Honored Contributor

Re: NFS Mount - TCP only

NFS over TCP is not built into the RedHat 9.0 (2.4.20-8 kernel) distribution. You would need to add it yourself.

From the NFS-HOWTO:

http://www.tldp.org/HOWTO/NFS-HOWTO/performance.html#NFS-TCP

5.4. NFS over TCP
A new feature, available for both 2.4 and 2.5 kernels but not yet integrated into the mainstream kernel at the time of this writing, is NFS over TCP. Using TCP has a distinct advantage and a distinct disadvantage over UDP. The advantage is that it works far better than UDP on lossy networks. When using TCP, a single dropped packet can be retransmitted, without the retransmission of the entire RPC request, resulting in better performance on lossy networks. In addition, TCP will handle network speed differences better than UDP, due to the underlying flow control at the network level.

The disadvantage of using TCP is that it is not a stateless protocol like UDP. If your server crashes in the middle of a packet transmission, the client will hang and any shares will need to be unmounted and remounted.

The overhead incurred by the TCP protocol will result in somewhat slower performance than UDP under ideal network conditions, but the cost is not severe, and is often not noticable without careful measurement. If you are using gigabit ethernet from end to end, you might also investigate the usage of jumbo frames, since the high speed network may allow the larger frame sizes without encountering increased collision rates, particularly if you have set the network to full duplex.


also check this link...
http://www.livejournal.com/talkread.bml?journal=kt_linux&itemid=77094
Remember, wherever you go, there you are...
James A. Donovan
Honored Contributor

Re: NFS Mount - TCP only

...and this one too...
http://nfs.sourceforge.net/
Remember, wherever you go, there you are...
Karthik S S
Honored Contributor

Re: NFS Mount - TCP only

But how do I add it manually??
-Karthik S S
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
James A. Donovan
Honored Contributor
Solution

Re: NFS Mount - TCP only

You need to
1) login to your linux box as root.
2) cd /usr/src/linux-2.4
3) make menuconfig
4) goto Filesystems -> Network Filesystems
5) check the "Provide NFS server over TCP support (EXPERIMENTAL)" box
6) exit and recompile your kernel.
Remember, wherever you go, there you are...