Troubleshooting Failed Autofs Mount Points

  • 7008959
  • 07-Jul-2011
  • 27-Apr-2012


Novell Open Enterprise Server 2 (OES 2) Linux
SUSE Linux Enterprise Desktop 11
SUSE Linux Enterprise Desktop 10
SUSE Linux Enterprise Server 11
SUSE Linux Enterprise Server 10
Autofs Automounter


Autofs automounter has been configured but all attempts to access the mount fail. The file system is not mounted properly to the expected local mount point.

For example, an autofs indirect mount configuration of,

# cat /etc/auto.master
/tools   /etc/

# cat /etc/
scripts   -ro   srv1:/export/tools

results in "No such file or directory" errors.

# cd /tools/scripts
-bash: cd: /tools/scripts: No such file or directory

# ls -l /tools/scripts
ls: cannot open directory /tools/scripts: No such file or directory


Several scenarios and their resolutions are considered that would cause a mount point to fail.

1. Invalid autofs configuration
The auto.master format is:
mount-point [map-type[,format]:]map [options]
See auto.master(5) for more details.

The map file format is:
key [-options] location
See autofs(5) for more details.

2. Blocked auto.master mount-point
If a file exists in the location specified as the auto.master mount-point, autofs will not be able to create the mount-point and consequently the key in the mount-point when needed. If a file exists for a direct mount, the same error would occur. In the example above, if /tools already exists as a regular file.

# ls -l /tools
-rw-r--r-- 1 root root 150 2011-07-07 11:34 /tools

The following error is observed in /var/log/messages:

automount[957]: /tools: mount failed!

Delete the /tools file and run /etc/init.d/autofs restart.

Running ls -l / should show an entry like:

drwxr-xr-x  3 root root     0 2011-07-07 11:35 tools

3. Missing or empty auto.master map file
The file specified as the map file should exist as specified. If a full path is missing in auto.master, then /etc/ is assumed.

# cat /etc/auto.master
/tools   /etc/
/scripts auto.scripts

Autofs expects to find /etc/ and /etc/auto.scripts, and expects the files to be a valid map type [see auto.master(5)] with matching map type content and format.

Create a valid map file in the correct location.

4. Mismatched map file key
Specify the valid configured key in the form of /mount-point/key. The file system will be mounted at /mount-point/key. From the example above, you must specify /tools/scripts.

5. Invalid map file location
The easiest way to test the location is to attempt to mount it independent of autofs to a new mount point you create. Observe the errors and make sure it will mount properly. It should then mount properly under autofs.
Consider the following map file:

# cat /etc/auto.tools2
scripts   -ro            srv1:/export/tools
data      -fstype=ext3   :/dev/eng/rd

Stop automounter
# /etc/init.d/autofs stop
Create a temporary mount point
# mkdir -p /tmp/mount
Try mounting each location to the temporary mount point.
# mount srv1:/export/tools /tmp/mount
# umount /tmp/mount
# mount /dev/eng/rd /tmp/mount
# umount /tmp/mount

If manually mounting the location fails, resolve the specified errors and make sure they mount manually first. When they mount manually, start autofs.

# /etc/init.d/autofs start

For local devices, make sure you include the leading colon ":" in the location. For example,

# cat /etc/auto.eng
data   -fstype=ext3   /dev/eng/rd

# cat /etc/auto.eng
data   -fstype=ext3   :/dev/eng/rd