From: Jeff Layton <jtlayton@poochiereds.net>
To: autofs@linux.kernel.org
Subject: [PATCH] mount_nfs replicated mounts patch (now sorts by subnet locality too)
Date: Mon, 18 Jul 2005 17:41:16 -0400 [thread overview]
Message-ID: <1121722876.6710.6.camel@localhost.localdomain> (raw)
Hi all,
I sent this earlier from a different account but it never showed up, so
apologies if it's a duplicate...
Here's the latest patch for my mount_nfs overhaul. This version adds
a new sorting criteria that should bring the replicated mount behavior
pretty closely into line with Solaris. I've done some basic testing of
it and it seems to work, but will need some more extensive testing (like
the rest of the patch).
The new version now checks to see whether any address for a replicated
mount is on a subnet that is local to the client (by comparing the
address to the routing table in /proc/net/route). We then sort by this
criteria after "bindness" (if the mount is a bind mount) and before the
weight.
There's only one catch -- the mount program simply selects the first
address given by a gethostbyname() call. So if the host is multi-homed,
we may end up mounting across a router anyway, even if another address
is closer.
We could simply use the address instead of the hostname for the mount,
but then we lose the hostname information for the mount. This could
look very messy, especially with a lot of NFS mounts. So, what I'm
thinking is this:
Currently the 'addr=' mount option for nfs mounts is ignored. I'd like
to roll a patch for mount such that this option is instead treated as an
address hint. If the address provided by the 'addr=' option matches one
of the addresses returned by gethostbyname(), then the mount program
would use that address for the mount. Otherwise, the existing behavior
(use first address in list) would prevail.
Does this sound like a good plan, or does anyone else have another
suggestion on how to deal with this?
In any case, here is the current revision of the autofs patch
(unfortunately, it seems to have gotten too large to post directly to
the list):
http://poochiereds.net/autofs/autofs-replicated-mounts-overhaul.patch
I'll plan to add the code soon that will add the "addr=" option for
mounts that are on the local subnet, unless there are major objections
to that approach:
As always, comments and suggestions are appreciated...
-- Jeff
next reply other threads:[~2005-07-18 21:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-18 21:41 Jeff Layton [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-07-18 21:28 [PATCH] mount_nfs replicated mounts patch (now sorts by subnet locality too) Jeff Layton
2005-07-16 23:32 Jeff Layton
2005-07-19 12:34 ` Ian Kent
2005-07-19 12:53 ` Jeff Layton
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=1121722876.6710.6.camel@localhost.localdomain \
--to=jtlayton@poochiereds.net \
--cc=autofs@linux.kernel.org \
/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.