Re: How to get autofs to use NFS v4?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2018-08-03 at 11:38 -0500, Patrick Goetz wrote:
> On 08/01/2018 09:02 PM, Ian Kent wrote:
> > 
> > I don't think so, that config file should be part of the nfs-utils
> > package, that's been the case for some time now. Ubuntu might put
> > it somewhere other than /etc but I can't see the sense in that.
> > 
> 
> It looks like you are correct.  Ubuntu provides 2 NFS packages, 
> nfs-common and nfs-kernel-server.  Greping through the nfs-common 
> package contents I find a man page for nfsmount.conf:
> 
> cnsit@snakeskin:~$ dpkg -L nfs-common | grep \.conf
> /lib/systemd/system/nfs-config.service
> /etc/init/idmapd-mounting.conf
> /etc/init/statd.conf
> /etc/init/gssd-mounting.conf
> /etc/init/idmapd.conf
> /etc/init/statd-mounting.conf
> /etc/init/gssd.conf
> /etc/request-key.d/id_resolver.conf
> /usr/share/nfs-common/conffiles
> /usr/share/nfs-common/conffiles/idmapd.conf
> /usr/share/nfs-common/conffiles/nfs-common.default
> /usr/share/man/man5/nfsmount.conf.5.gz
> 
> 
> So, the functionality is presumably there, but they don't supply a 
> default /etc/nfsmount.conf, similar to how there is no default 
> /etc/sssd/sssd.conf.

Most probably.

> 
> The way the man page is written




> , this is a bit unclear, but it looks 
> like this is a client side configuration option, and appears like it 
> could be useful. Many open questions, though. For example, are the 
> configuration options set in /etc/nfsmount.conf overriden by mount 
> options in /etc/fstab?  And how does this interact with systemd, say if 
> someone is using a mount or automount unit file.

As far as I know mount options will override relevant setting the the
configuration.

For example (which should be commented out in the default config):
# Protocol Version [2,3,4]
# This defines the default protocol version which will
# be used to start the negotiation with the server.
# Defaultvers=4

Means that mount.nfs will use v4 as default and fall back to v3 etc.
if that's not possible when using "-t nfs".

But if you request NFSv4 with "-t nfs4" or (I believe) the equivalent
of "nfsvers=4" or "vers=4" in the mount options then it should fail
if a v4 mount isn't possible.

Whereas:
# Setting this option makes it mandatory the server supports the
# given version. The mount will fail if the given version is 
# not support by the server. 
# Nfsvers=4

doesn't quite have a corresponding option and should result in
similar behaviour to using one of the version 4 options above
when using "-t nfs".

You would think that the commented out value is the default
(and I may be wrong) but I'm pretty sure mount.nfs will fall
back to lower NFS versions by default.

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



[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux