Troubleshooting Failed Autofs Mount Points

This document (7008959) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Desktop 11
SUSE Linux Enterprise Desktop 10
SUSE Linux Enterprise Server 11
SUSE Linux Enterprise Server 10
 

Situation

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/auto.tools

# cat /etc/auto.tools
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
 

Resolution

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/auto.tools
/scripts auto.scripts

Autofs expects to find /etc/auto.tools 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,

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

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

 

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7008959
  • Creation Date: 07-Jul-2011
  • Modified Date:05-Mar-2021
    • SUSE Linux Enterprise Desktop
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center