Use of the x-systemd.automount mount option in /etc/fstab
This document (000020402) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 12
Situation
Resolution
Attempts to alter the above behavior by setting either "auto" or "noauto" will have no effect.
In other words, all of the following combinations of options in /etc/fstab will yield the same result:
x-systemd.automount
auto,x-systemd.automount
noauto,x-systemd.automount
NOTE: A variety of different services or entities started by systemd can insist that something be mounted. Additionally, any process started during boot can request access to various paths, potentially triggering an automount unit to mount a file system. Therefore, even if /etc/fstab syntax would give the expectation that a file system won't mount during boot, it may still get mounted during boot for other reasons.
Additional Information
grep auto /proc/mounts
...
systemd-1 on /mnt/sub1 type autofs (rw,relatime,fd=51,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=24999)
Please note that systemd's automount feature is separate from the method provided by the autofs package, which has been around many years longer. The method used by the autofs package does not use entries in /etc/fstab. Instead, it uses /etc/auto.master plus map files. Either method will result in automount traps of "type autofs" . Even so, they are two distinct methods. Either method can be used on SLES 12 and 15, but any given mount point should only be defined by one of the methods. Technically, a system could have one set of mount points under the control of the autofs package and another set under the control of systemd. However, to avoid confusion, it is recommended that just one method be used for all automounts on any given system.
For someone not familiar with either method, the systemd method is typically more quickly grasped and implemented.
A notable difference between the default behaviors of x-systemd.automount and the autofs package is: The autofs package defaults to timing out (umounting) an automount after approximately 10 minutes of idleness. However, x-systemd.automount defaults to never timing out, which is preferred by many administrators. Repeatedly umounting and remounting based on idle periods can introduce potential points of failure.
For more information on the timeout settings for each of these, see "man 5 auto.master" (for the autofs package) and "man 5 systemd.automount".
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:000020402
- Creation Date: 01-Oct-2021
- Modified Date:08-Oct-2021
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com