From: Jeff Layton <jtlayton@poochiereds.net>
To: nfs@lists.sourceforge.net
Subject: making the 'addr=' mount option an address hint
Date: Sun, 17 Jul 2005 11:38:28 -0400 [thread overview]
Message-ID: <1121614708.6713.41.camel@localhost.localdomain> (raw)
Hi,
I've been working on a fairly major overhaul of the autofs mount_nfs
code. One of the things I've recently added is making it prefer to mount
from server addresses that are on the same subnet as the client.
Unfortunately, I've found that when the mount program does a
gethostbyname() call to get the address of the host, it simply picks the
first address in the list, without regard for how "close" it is to the
client.
The upshot of this is that if even autofs picks a replicated mount entry
that is on the same subnet as the client, we may end up mounting across
a router anyway.
A simple way to correct this would be to make autofs pass the address
instead of the hostname when calling "mount". However, that will make
for an ugly /proc/mounts, especially if we have a lot of automounted NFS
mounts (it's more human-friendly to keep the hostname info when looking
at the list of mounts).
So, what I'd like to do is roll a patch for mount to change the behavior
of the 'addr=' option. Instead of ignoring it, we'd treat it as an
address hint. If one of the addresses returned by gethostbyname()
matches this address, then we'd mount using that address. Otherwise, the
existing behavior would prevail (use the first address in the list).
I'm writing this to solicit some feedback before I dive in and start
working on it. Does this sound like a reasonable idea? Is there
something I'm not considering that would prevent this from working?
Thanks,
Jeff
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
NFS maillist - NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs
next reply other threads:[~2005-07-17 15:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-17 15:38 Jeff Layton [this message]
2005-07-17 16:51 ` making the 'addr=' mount option an address hint Olaf Kirch
2005-07-17 17:40 ` Jeff Layton
2005-07-18 15:22 ` Trond Myklebust
2005-07-18 17:55 ` Jeff Layton
2005-07-18 18:09 ` Dan Stromberg
2005-07-18 18:45 ` Trond Myklebust
2005-07-18 19:59 ` Jeff Layton
2005-07-18 15:36 ` Trond Myklebust
2005-07-18 18:24 ` [NFS] " Jeff Layton
2005-07-18 18:37 ` Trond Myklebust
2005-07-18 18:37 ` Trond Myklebust
2005-07-18 19:54 ` Olaf Kirch
2005-07-18 20:49 ` Trond Myklebust
2005-07-18 20:49 ` Trond Myklebust
2005-07-19 12:26 ` Ian Kent
2005-07-19 12:22 ` [NFS] " Ian Kent
2005-07-19 12:17 ` Ian Kent
2005-07-19 12:03 ` Ian Kent
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1121614708.6713.41.camel@localhost.localdomain \
--to=jtlayton@poochiereds.net \
--cc=nfs@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.