Automounter operation

From techdocs
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.

/unsw

Somewhat more complicated. Instead of simply using heuristics to determine the home folder (not directory) path, we need to find the UNSW IT Windows server and path from Active Directory with an ldapsearch query and and then do a CIFS mount.

See /usr/local/infrastructure/bin/autofs_unsw.sh.

Notes:

  • The user identifier is the user's zID, AND
  • The user must have authenticated with their zPass so that a Kerberos ticket was created for them when they logged in. This ticket is passed to the Windows server to authorise the user to access their home folder. No ticket = no access.