How can I configure autofs so my mounts never timeout?
Environment
- Red Hat Enterprise Linux 9
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 6
Issue
- How can I configure
autofs
so my mounts never timeout? - I need persistent mounts, but I can't set them up in
/etc/fstab
.
Resolution
- Per the man page,
automount
allows atimeout=0
setting to disable unmounting:
-t, --timeout
Set the global minimum timeout, in seconds, until directories are unmounted. The default
is 10 minutes. Setting the timeout to zero disables umounts completely.
- This setting can be added to
/etc/sysconfig/autofs
to disable unmounting as well:
# TIMEOUT - set the default mount timeout (default 600).
#
TIMEOUT=0
NOTE: If you add a --timeout
value in /etc/auto.master
file, this will supersedes the TIMEOUT
option specified in the /etc/sysconfig/autofs
file.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments