NFS problem with autofs

I can mount NFS via FSTAB without problems.

fstab:

10.0.0.2:/srv/net/dysk2/publiczny        /mnt/FSTAB/Publiczny   nfs    nfsvers=4.2                   0  0

But I have problem with autofs.

I have:
**auto.master
**

+auto.master
/mnt/serwer /etc/auto.misc --timeout 10

auto.misc

publiczny            10.0.0.2:/srv/net/dysk2/publiczny

I get:

ls -l /mnt/serwer/
razem 0

automount -f -v
100000000|Starting automounter version 5.1.5, master map auto.master
100000000|using kernel protocol version 5.04
mounted indirect on /mnt/serwer with timeout 10, freq 3 seconds
attempting to mount entry /mnt/serwer/.directory
key ".directory" not found in map source(s).
failed to mount /mnt/serwer/.directory

What am I doing wrong?

PS.
I haven’t problem with identical configuration in openSUSE 42.1.

What happens if you try:

ls /mnt/serwer/publiczny

Here, I don’t see anything in the mount point directory unless something is already mounted. But if I look explicitly at something that should be in that directory, that forces the mount.

I don’t know if the order makes any difference, but this is my auto.master

#
# Sample auto.master file
# This is a 'master' automounter map and it has the following format:
# mount-point [map-type[,format]:]map [options]
# For details of the format look at auto.master(5).
#
#/misc    /etc/auto.misc
/media/auto  /etc/auto.nfs   --timeout=60

#
# NOTE: mounts done from a hosts map will be mounted with the
#    "nosuid" and "nodev" options unless the "suid" and "dev"
#    options are explicitly given.
#
#/net    -hosts
#
# Include /etc/auto.master.d/*.autofs
# The included files must conform to the format of this file.
#
#+dir:/etc/auto.master.d
#
# Include central master map if it can be found using
# nsswitch sources.
#
# Note that if there are entries for /net or /misc (as
# above) in the included master map any keys that are the
# same will not be seen as the first read key seen takes
# precedence.
#
+auto.master


The +auto.master is the last entry.

Also, as nrickert indicates, the auto mount occurs on demand. the --timeout parameter is the umount delay when the folder is no longer in use.

@nrickert

It was so easy.

ls /mnt/serwer/publiczny

solved the problem.

Thanks for help.

See description of option “browse” in man autofs.master.

@arvidjaar

Thanks.

I added

DEFAULT_BROWSE_MODE = "yes"

down:

/ etc / sysconfig / autofs

and I’m testing this configuration.

Earlier I was creating symlinks and it was working too, and still works.

I am running Leap 15.1 on a new computer, autofs package 5.1.3-lp151.7.2
autofs misbehaving as discussed in this thread
I have two other Leap 15.1 machines, autofs (same package) working perfectly

Where does file /etc/sysconfig/autofs come from?
The file /etc/sysconfig/autofs on the new (misbehaving) machine is very different from the two working macines.
Is the file locally generated?

Hi
No, it’s part of the original source, if you have made modifications it will not be over written if an updated package is installed as it’s set to noreplace. In the two working systems is there a autofs.conf.new file?

It actually gets put into a directory first (/var/adm/fillup-templates) then rpm macros install it.

Thanks, Malcom.

No, my “working” 15.1 systems do not have a “autofs.conf.new” file, but they are both updated since at least Leap 14.x and perhaps much longer.
Maybe something got lost.

The new machine is a completely clean install of 15.1.

Just for the fun of it, I might try migrating the /etc/sysconfig/autofs to the new system to see if that works.

Hi
Yes, that should work, I would check the differences first between the older file and the new.

OK, I replaced /etc/sysconfig/autofs with an older version from a working 15.1 computer, restarted the autofs service and autofs now working as expected.
Here is the autofs loaded by my clean install (does not work)

# cjm This version installed by 15.1 clean install dated 10/16/19  autofs does not work
## Path:           System/File systems/Autofs
## Description:    Options that will be used when the daemon is started.
## Type:           string
## Default:        ""
## ServiceReload:  autofs
#
AUTOFS_OPTIONS=""

## Description:    Use AutoFS miscellaneous device (/dev/autofs).
## Type:           string
## Default:        "yes"
#
# Determine whether the AutoFS misc device (/dev/autofs) will be used
# for routing ioctl commands. Requires kernel support (2.6.28 and newer).
USE_MISC_DEVICE="yes"

And here is the /etc/sysconfig/autofs that works, copied from an evolved (serially updated via zypper dup) 15.1 machine
As you can see, big difference.

## Path:           System/File systems/Autofs
## Description:    Options that will be used when the daemon is started.
## Type:           string
## Default:        ""
## ServiceReload:  autofs
#
AUTOFS_OPTIONS=""

## Description:    Default mount options.
## Type:           string
## Default:        ""
#
# Default mount options which are appended or replaced to
# each map entry (see also APPEND_OPTIONS).
LOCAL_OPTIONS=""

## Description:    Append or replace options.
## Type:           string
## Default:        "yes"
#
# Determine whether LOCAL_OPTIONS are appended to map entry options
# or if the map entry options replace the global options
# (program default "yes", append options).
APPEND_OPTIONS="yes"

## Description:    Use AutoFS miscellaneous device (/dev/autofs).
## Type:           string
## Default:        "yes"
#
# Determine whether the AutoFS misc device (/dev/autofs) will be used
# for routing ioctl commands. Requires kernel support (2.6.28 and newer).
USE_MISC_DEVICE="yes"

## Description:    Default map name for the master map.
## Type:           string
## Default:        "auto.master"
#
DEFAULT_MASTER_MAP_NAME="auto.master"

## Description:    Set the default mount timeout.
## Type:           integer(0:)
## Default:        600
#
DEFAULT_TIMEOUT=600

## Description:    maps are browsable by default.
## Type:           string
## Default:        "yes"
#
DEFAULT_BROWSE_MODE="yes"

## Description:    Set default log level.
## Type:           string
## Default:        "none"
#
# "none", "verbose" or "debug"
#
DEFAULT_LOGGING="none"

## Description:    Define the default LDAP schema to use for lookups.
## Type:           string
## Default:        "auto.master"
#
# System default
#
DEFAULT_MAP_OBJECT_CLASS="nisMap"
DEFAULT_ENTRY_OBJECT_CLASS="nisObject"
DEFAULT_MAP_ATTRIBUTE="nisMapName"
DEFAULT_ENTRY_ATTRIBUTE="cn"
DEFAULT_VALUE_ATTRIBUTE="nisMapEntry"
#
# Other common LDAP nameing
#
#DEFAULT_MAP_OBJECT_CLASS="automountMap"
#DEFAULT_ENTRY_OBJECT_CLASS="automount"
#DEFAULT_MAP_ATTRIBUTE="ou"
#DEFAULT_ENTRY_ATTRIBUTE="cn"
#DEFAULT_VALUE_ATTRIBUTE="automountInformation"
#
#DEFAULT_MAP_OBJECT_CLASS="automountMap"
#DEFAULT_ENTRY_OBJECT_CLASS="automount"
#DEFAULT_MAP_ATTRIBUTE="automountMapName"
#DEFAULT_ENTRY_ATTRIBUTE="automountKey"
#DEFAULT_VALUE_ATTRIBUTE="automountInformation"

## Description:    Set the default location for the SASL authentication configuration file.
## Type:           string
## Default:        "/etc/autofs_ldap_auth.conf"
#
DEFAULT_AUTH_CONF_FILE="etc/autofs_ldap_auth.conf"

## Description:    Set the map cache hash table size.
## Type:           integer
## Default:        1024
#
# Should be a power of 2 with a ratio roughly between 1:10 and 1:20
# for each map.
MAP_HASH_TABLE_SIZE=1024

I have no idea how this appeared on my older system, autofs has worked for a long time.
I know I did not build it from scratch

As you can see, the Browse item is changed along with other parameters, per the Tumbleweed discussion above.

Thanks for your help, Malcom