CertGrid CertGrid
Hands-on Lab·Red Hat Certified System Administrator

On-Demand Mounting with autofs

One objective. The behaviour is the whole point and it is captured directly: `findmnt` reports nothing mounted, one `ls` runs, and `findmnt` reports an NFS mount that autofs created. Both map styles the exam can ask for - indirect and direct - are built here.

File Systems Guide 39 of 67 Intermediate

Written against the versions above. Put maps in `/etc/auto.master.d/<name>.autofs` rather than editing `/etc/auto.master`. The stock master file ends with `+auto.master`, which includes that directory, so a drop-in survives package updates and can be deleted cleanly.

autofs runs on RHCSA-A01 and mounts RHCSA-UTIL01's exports on demand.
Server NameIP AddressOSRolesCPURAMHDD
RHCSA-A01192.168.0.31RHEL 10.0 (Coughlan)Practice node (graded) - spare /dev/sda2 Core4 GB50 GB + 15 GB
RHCSA-UTIL01192.168.0.32RHEL 10.0 (Coughlan)Utility - repository server and NFS exports2 Core4 GB50 GB

Before you start

  1. The package and the map files

  2. An indirect map

  3. Nothing is mounted until something looks

  4. Both keys, and no fstab at all

  5. A direct map

Official sources