SCIENTIFIC-LINUX-USERS Archives

March 2015

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Arnau Bria <[log in to unmask]>
Reply To:
Arnau Bria <[log in to unmask]>
Date:
Mon, 23 Mar 2015 13:24:06 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (109 lines)
Dear all,

I'm currently using autofs  in order to mount a remote NFS server which
name is an alias of various IPs. The alias is served using a named
serves configured to server the IPs in RR with random order .
from the client side, every time  that I run  dig I get a different IP
from the DNS server (as expected).

But when I configure automount, for some reason (not 100% clear to me)
some IPs are used more times than others... so, i.e, the IP which
finishes in 37 is the most used.

After enabling the debug in autofs, I realized that autofs has some
kind of internal procedure for selection "the best" NFS server, based
on "cost" and "weight":


Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: called with host nfs-server.domain.com(192.168.1.49) proto 6 version 0x70
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: nfs v3 random selection time: 0.902374
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: host nfs-server.domain.com cost 902373 weight 0
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: called with host nfs-server.domain.com(192.168.1.49) proto 17 version 0x70
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: nfs v3 random selection time: 0.334700
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: nfs v2 random selection time: 0.208992
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: host nfs-server.domain.com cost 271845 weight 0
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: called with host nfs-server.domain.com(192.168.1.40) proto 6 version 0x70
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: nfs v3 random selection time: 0.818936
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: host nfs-server.domain.com cost 818935 weight 0
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: called with host nfs-server.domain.com(192.168.1.40) proto 17 version 0x70
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: nfs v3 random selection time: 0.186731
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: nfs v2 random selection time: 0.270032
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: host nfs-server.domain.com cost 228381 weight 0
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: called with host nfs-server.domain.com(192.168.1.14) proto 6 version 0x70
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: nfs v3 random selection time: 0.619938
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: host nfs-server.domain.com cost 619938 weight 0
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: called with host nfs-server.domain.com(192.168.1.14) proto 17 version 0x70
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: nfs v3 random selection time: 0.694382
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: nfs v2 random selection time: 0.986926
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: host nfs-server.domain.com cost 840654 weight 0
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: called with host nfs-server.domain.com(192.168.1.7) proto 6 version 0x70
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: nfs v3 random selection time: 0.883242
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: host nfs-server.domain.com cost 883242 weight 0
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: called with host nfs-server.domain.com(192.168.1.7) proto 17 version 0x70
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: nfs v3 random selection time: 0.098134
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: nfs v2 random selection time: 0.040803
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: host nfs-server.domain.com cost 69468 weight 0
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: called with host nfs-server.domain.com(192.168.1.8) proto 6 version 0x70
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: nfs v3 random selection time: 0.821978
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: host nfs-server.domain.com cost 821977 weight 0
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: called with host nfs-server.domain.com(192.168.1.8) proto 17 version 0x70
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: nfs v3 random selection time: 0.658772
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: nfs v2 random selection time: 0.941505
Mar 23 11:47:58 node-hp0403 automount[8007]: get_nfs_info: host nfs-server.domain.com cost 800138 weight 0
[...]

And I guess that this is the reason why some IPs are used more often
than others.


So, here I have 2 questions:

1.-) Is my guess correct?

2.-) How may I configure autofs to don't use this cost/weight and rely
on the DNS info?

I'm running autofs-5.0.5-88.el6.x86_64.

I've been taking a look a the source code and found some things:

1.-) the autofs mailing does not longer exists....

2.-) README.replicated-server:

------------------------------------
1) Highest priority in selection is proximity.
   Proximity, in order of precedence is:
     - PROXIMITY_LOCAL, host corresponds to a local interface.
     - PROXIMITY_SUBNET, host is located in a subnet reachable
       through a local interface.
     - PROXIMITY_NETWORK, host is located in a network reachable
       through a local interface.
     - PROXIMITY_OTHER, host is on a network not directlty
       reachable through a local interface.

2) NFS version and protocol is selected by caclculating the largest
   number of hosts supporting an NFS version and protocol that
   have the closest proximity. These hosts are added to the list
   in response time order. Hosts may have a corresponding weight
   which essentially increases response time and so influences the
   host order.

3) Hosts at further proximity that support the selected NFS version
   and protocol are also added to the list in response time order as
   in 2 above.
--------------------------------------


In my case all the clients are in the same subnet. SO, may I configure
servers with same weight in order to create some kind of "FAIRSHARE":

Mutliple weighted, replicated hosts same path:
<path> host1(1),host2(1),host3(1):/path/path

Any doc is welcome!


TIA,
Arnau

ATOM RSS1 RSS2