All of lore.kernel.org
 help / color / mirror / Atom feed
* mount -oaddr=<ipaddr> ?
@ 2016-04-05  0:55 Jeff Mahoney
  2016-04-05  3:12 ` Ian Kent
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Mahoney @ 2016-04-05  0:55 UTC (permalink / raw)
  To: autofs, Ian Kent


[-- Attachment #1.1: Type: text/plain, Size: 631 bytes --]

Hi all -

I'm investigating an issue where our user updated from SLE11 to SLE12
and the hostname for autofs mounts stopped appearing in the 'mount'
output.  I know why this happens, what the reason for it being this way
is, and that it can be overridden by setting the
use_hostname_for_mounts=yes option (and the side effects).  Before I go
and write up the patch implementing it, is there a reason why autofs
doesn't pass the hostname in the mount source and specify the ip address
using the -oaddr=<ipaddr> option?  Was this tried and found to be
wanting somehow?

Thanks,

-Jeff

-- 
Jeff Mahoney
SUSE Labs


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 881 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mount -oaddr=<ipaddr> ?
  2016-04-05  0:55 mount -oaddr=<ipaddr> ? Jeff Mahoney
@ 2016-04-05  3:12 ` Ian Kent
  2016-04-05 13:18   ` Jeff Mahoney
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Kent @ 2016-04-05  3:12 UTC (permalink / raw)
  To: Jeff Mahoney, autofs

On Mon, 2016-04-04 at 20:55 -0400, Jeff Mahoney wrote:
> Hi all -
> 
> I'm investigating an issue where our user updated from SLE11 to SLE12
> and the hostname for autofs mounts stopped appearing in the 'mount'
> output.  I know why this happens, what the reason for it being this
> way
> is, and that it can be overridden by setting the
> use_hostname_for_mounts=yes option (and the side effects).  Before I
> go
> and write up the patch implementing it, is there a reason why autofs
> doesn't pass the hostname in the mount source and specify the ip
> address
> using the -oaddr=<ipaddr> option?  Was this tried and found to be
> wanting somehow?

TBH I didn't even consider doing that.

But the daemon needs to be conservative in the options it uses because
maps may be used with other platforms and unknown or non-standard
options can cause mount failures.

While Linux mount.nfs(8) has the sloppy option (which maintainers seem
to try and remove from time to time) other platforms probably don't.

The addr=<address> option isn't listed as a valid option in nfs(5) and
neither is it listed in on-line Solaris documentation that I could find
so I'm not sure making the daemon use it is a good idea.

Maybe there's another way...

Note that I do need to be able to mount to a specific IP address while
specifying the host name in the mount command but don't know of a way todo it.

> 
> Thanks,
> 
> -Jeff
> 
--
To unsubscribe from this list: send the line "unsubscribe autofs" in

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mount -oaddr=<ipaddr> ?
  2016-04-05  3:12 ` Ian Kent
@ 2016-04-05 13:18   ` Jeff Mahoney
  2016-04-08  0:21     ` Ian Kent
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Mahoney @ 2016-04-05 13:18 UTC (permalink / raw)
  To: Ian Kent, autofs


[-- Attachment #1.1: Type: text/plain, Size: 2320 bytes --]

On 4/4/16 11:12 PM, Ian Kent wrote:
> On Mon, 2016-04-04 at 20:55 -0400, Jeff Mahoney wrote:
>> Hi all -
>>
>> I'm investigating an issue where our user updated from SLE11 to SLE12
>> and the hostname for autofs mounts stopped appearing in the 'mount'
>> output.  I know why this happens, what the reason for it being this
>> way
>> is, and that it can be overridden by setting the
>> use_hostname_for_mounts=yes option (and the side effects).  Before I
>> go
>> and write up the patch implementing it, is there a reason why autofs
>> doesn't pass the hostname in the mount source and specify the ip
>> address
>> using the -oaddr=<ipaddr> option?  Was this tried and found to be
>> wanting somehow?
> 
> TBH I didn't even consider doing that.
> 
> But the daemon needs to be conservative in the options it uses because
> maps may be used with other platforms and unknown or non-standard
> options can cause mount failures.
> 
> While Linux mount.nfs(8) has the sloppy option (which maintainers seem
> to try and remove from time to time) other platforms probably don't.
> 
> The addr=<address> option isn't listed as a valid option in nfs(5) and
> neither is it listed in on-line Solaris documentation that I could find
> so I'm not sure making the daemon use it is a good idea.
> 
> Maybe there's another way...
> 
> Note that I do need to be able to mount to a specific IP address while
> specifying the host name in the mount command but don't know of a way todo it.

After looking at it again, the kernel supports doing this but nfs-utils
explicitly doesn't.

A closer look at nfs-utils also shows that, given a hostname, mount.nfs
will iterate over all available addresses matching the specification
(e.g. constrained by proto=) and try to mount using each one.  It will
properly pass an addr= field to the kernel but it ignores the one passed
on the mount command line.  It will use getaddrinfo() to get the list of
addresses for the remote host and then iterate over them, retrying until
it finds one that works.  So that part of it works, but the
prioritization implemented by the replicated modules isn't.  I wonder if
it would make sense to move that to nfs-utils instead.  It seems like it
would be generally useful.

-Jeff

-- 
Jeff Mahoney
SUSE Labs


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 881 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mount -oaddr=<ipaddr> ?
  2016-04-05 13:18   ` Jeff Mahoney
@ 2016-04-08  0:21     ` Ian Kent
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Kent @ 2016-04-08  0:21 UTC (permalink / raw)
  To: Jeff Mahoney, autofs

On Tue, 2016-04-05 at 09:18 -0400, Jeff Mahoney wrote:
> On 4/4/16 11:12 PM, Ian Kent wrote:
> > On Mon, 2016-04-04 at 20:55 -0400, Jeff Mahoney wrote:
> > > Hi all -
> > > 
> > > I'm investigating an issue where our user updated from SLE11 to
> > > SLE12
> > > and the hostname for autofs mounts stopped appearing in the
> > > 'mount'
> > > output.  I know why this happens, what the reason for it being
> > > this
> > > way
> > > is, and that it can be overridden by setting the
> > > use_hostname_for_mounts=yes option (and the side effects).  Before
> > > I
> > > go
> > > and write up the patch implementing it, is there a reason why
> > > autofs
> > > doesn't pass the hostname in the mount source and specify the ip
> > > address
> > > using the -oaddr=<ipaddr> option?  Was this tried and found to be
> > > wanting somehow?
> > 
> > TBH I didn't even consider doing that.
> > 
> > But the daemon needs to be conservative in the options it uses
> > because
> > maps may be used with other platforms and unknown or non-standard
> > options can cause mount failures.
> > 
> > While Linux mount.nfs(8) has the sloppy option (which maintainers
> > seem
> > to try and remove from time to time) other platforms probably don't.
> > 
> > The addr=<address> option isn't listed as a valid option in nfs(5)
> > and
> > neither is it listed in on-line Solaris documentation that I could
> > find
> > so I'm not sure making the daemon use it is a good idea.
> > 
> > Maybe there's another way...
> > 
> > Note that I do need to be able to mount to a specific IP address
> > while
> > specifying the host name in the mount command but don't know of a
> > way todo it.
> 
> After looking at it again, the kernel supports doing this but nfs
> -utils
> explicitly doesn't.
> 
> A closer look at nfs-utils also shows that, given a hostname,
> mount.nfs
> will iterate over all available addresses matching the specification
> (e.g. constrained by proto=) and try to mount using each one.  It will
> properly pass an addr= field to the kernel but it ignores the one
> passed
> on the mount command line.  It will use getaddrinfo() to get the list
> of
> addresses for the remote host and then iterate over them, retrying
> until
> it finds one that works.  So that part of it works, but the
> prioritization implemented by the replicated modules isn't.  I wonder
> if
> it would make sense to move that to nfs-utils instead.  It seems like
> it
> would be generally useful.

I'm not sure that's a good idea.

The syntax that would need to be supported by nfs-utils for this is used
by OSes that provide read-only replicated mount fail over.

So, as soon as that was added people will assume the Linux kernel NFS
client has this fail over support which it hasn't.

Ian
--
To unsubscribe from this list: send the line "unsubscribe autofs" in

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-08  0:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-05  0:55 mount -oaddr=<ipaddr> ? Jeff Mahoney
2016-04-05  3:12 ` Ian Kent
2016-04-05 13:18   ` Jeff Mahoney
2016-04-08  0:21     ` Ian Kent

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.