RedHat EX200 Question Answer
Configure AutoFS so that accessing /shares/projects mounts server1:/srv/nfs/projects.
See the solution below in Explanation.
Solution:
dnf install -y autofs
mkdir -p /shares
echo "/shares /etc/auto.shares" > > /etc/auto.master
echo "projects -fstype=nfs,rw server1:/srv/nfs/projects" > /etc/auto.shares
systemctl enable --now autofs
ls /shares/projects
Detailed Explanation:
/etc/auto.master defines the main map.
/etc/auto.shares defines the indirect mount entry.
The mount happens on demand when /shares/projects is accessed.
RHEL 10 file-system documentation includes AutoFS for on-demand mounts. ( Red Hat Documentation )
TESTED 16 May 2026
Copyright © 2014-2026 ACE4Sure. All Rights Reserved