Automounter operation

From techdocs
Revision as of 15:29, 21 August 2023 by Plinich (talk | contribs)
Jump to navigation Jump to search

cfengine configuration locations:

/usr/local/warehouse/autofsconf.*
/usr/local/warehouse/automounter.*
/var/lib/cfengine3/masterfiles/automounter.inc

The automounter is autofs. See:

$ man automounter
$ man autofs.conf
$ man auto.master

At least these mount points are managed by the automounter:

/import/<server>/<index>
/home
/web
/unsw

The server name is used by heuristics in the script /usr/local/bin/autofs_mount_options.sh to determine:

  • The network file system type (e.g., “nfs”, “glusterfs”),
  • Mount options (e.g., “vers”, “udp”), and
  • Path on remote server (e.g., “/export/kamen/1” (NFS), “/gv0” (GlusterFS)).

/import

The automounter reads all the /import mappings and mount options from /etc/auto.static. This file is regenerated each time the automounter is started or reloaded on each host.

See:

  • /usr/local/bin/autofs_generate_static.sh, and
  • /etc/systemd/system/autofs.service.d/static.conf

The main concept in the above is that the key to the mount is the server name.

/home and /web

The automounter invokes a script to get the mappings and mount options for:

  • /home (/usr/local/bin/autofs_home.sh), and
  • /web (/usr/local/bin/autofs_web.sh)

The main concept in the above is that the key to the mount is the user name.

The above scripts use ldapsearch to get the user's home directory which, in turn, gives the server name.

Then, all mounts use the server name heuristic by invoking /usr/local/bin/autofs_mount_options.sh as described above.