Find the answer to your Linux question:
Results 1 to 4 of 4
In the article HaNFS: Linux HA, # If your kernel defaults to using TCP for NFS (as is the case in 2.6 kernels), switch to UDP instead by using the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2008
    Posts
    18

    NFS Linux-HA Heartbeat : HOWTO UDP?


    In the article HaNFS: Linux HA,

    # If your kernel defaults to using TCP for NFS (as is the case in 2.6 kernels), switch to UDP instead by using the 'udp' mount option. If you don't do this, you won't be able to quickly switch from server "A" to "B" and back to "A" because "A" will hold the TCP connection in TIME_WAIT state for 15-20 minutes and refuse to reconnect.

    The shared mounted volume is in /etc/ha.d/haresources.

    Where do i set the NFS to default to UDP only. I looked up /etc/services and found nfs under both UDP/TCP.

    Any hints .. or ideas?

  2. #2
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,763
    Code:
    man nfs
    tcp Mount the NFS filesystem using the TCP protocol. This is the default if it is supported by both client and server.
    Many NFS servers only support UDP.

    udp Mount the NFS filesystem using the UDP protocol.
    Client-side setting when the NFS share is mounted.

  3. #3
    Just Joined!
    Join Date
    Oct 2008
    Posts
    18

    Thanks for man nfs

    The NFS volume will not be in /etc/fstab. You asked me to look up man nfs. In NFS HA using heartbeat the shared volume will be in /etc/ha.d/haresources as follows:

    #node1 10.0.0.170 Filesystem::/dev/sda1::/data1::ext2
    nfs1-dmz 192.168.14.43 Filesystem::/dev/VolGroup01/lvol01::/data::/ext3
    nfslock nfs


    On 2nd thoughts, if the 1st server were to go down, I believe it should not really matter if the NFS is using TCP or UDP protocols, the Failover should take place immediately..

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,763
    Please re-read the "hint" you pasted:
    # If your kernel defaults to using TCP for NFS (as is the case in 2.6 kernels), switch to UDP instead by using the 'udp' mount option. If you don't do this, you won't be able to quickly switch from server "A" to "B" and back to "A" because "A" will hold the TCP connection in TIME_WAIT state for 15-20 minutes and refuse to reconnect.

    ..by using the 'udp' mount option.


    Your HA NFS share is being MOUNTED by *some* machine, this is where the udp option can be applied - as a MOUNT option.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •