Skip to content

Set autofs to nfs4 #158

Merged
merged 2 commits into from
Mar 5, 2021
Merged

Set autofs to nfs4 #158

merged 2 commits into from
Mar 5, 2021

Commits on Mar 4, 2021

  1. autofs.conf: Remove comments

    Remove comments from this file, as they would not be updated when autofs
    is updated. Refer to the man page instead.
    donald committed Mar 4, 2021
    Configuration menu
    Copy the full SHA
    f60b5e1 View commit details
    Browse the repository at this point in the history
  2. autofs.conf: Set mount_nfs_default_protocol = 4

    From autofs.conf(5):
    
    mount_nfs_default_protocol
    
       Specify  the default protocol used by mount.nfs(8) (program default 3).
       Since we can't identify this default automatically we need to set it in
       the autofs configuration.
    
    Our mount.fs defaults to nfs4, so configure this correctly.
    
    Background:
    
    autmount tries to avoid to call mount.nfs for a host, when the host or
    the nfs service on the host is not available to avoid long timeouts (and
    possibly use a alternative ip-address or server).
    
    So it uses rpc calls to the null procedure of the relevant nfs version.
    If a map entries specifies a version option for nfs, then it is clear,
    what this relevant version is. But if no version is specified in the map
    entry, automounts wants to poll the version(s) mount.nfs would use, if
    no version is specified. Per default, it is assumed, that mount.nfs
    tries nfs3 and 2, so this is what gets polled. As we only offer nfs4, we
    get the error `mount(nfs): no hosts available`. We need to tell
    automount, that our mount.nfs defaults to nfs4 so that nfs4 is polled.
    
    The above error doesn't occur with our current version of nfs-utils
    (which is 2.4.1). In this version, `mount.nfs` is so old, that it
    doesn't show its version number when called as `mount.nfs -V`.  In that
    case, autofs skips the probing of nfs-versions alltogether.
    
    However, when nfs-utils is upgraded to 2.5.4, autofs will detect that
    and we get the error. So the change here is a prerequisite for an update
    of nfs-utils.
    
    This new setting is valid for autofs version 5.1.3 and for autofs
    version 5.1.7, so there is no issue with the concurrently ongoing update
    of autofs.
    donald committed Mar 4, 2021
    Configuration menu
    Copy the full SHA
    ff6c668 View commit details
    Browse the repository at this point in the history