RHCSAv10 · RHEL 10

Lessons

Network mounts: NFS and autofs

updated 2026-10-19 by seed

Goal

"Mount export.example.com:/share on /mnt/share, persistent, read-only" — and the autofs variant.

NFS by hand

dnf install -y nfs-utils
showmount -e 192.168.130.40
mkdir -p /mnt/share
mount -t nfs 192.168.130.40:/share /mnt/share

Persistent

192.168.130.40:/share  /mnt/share  nfs  ro,soft,timeo=50  0 0

soft avoids an indefinite freeze when the server disappears. hard is the default (blocking I/O).

autofs (mount on demand)

dnf install -y autofs

/etc/auto.master.d/share.autofs:

/mnt/auto  /etc/auto.share

/etc/auto.share:

share  -ro  192.168.130.40:/share
systemctl enable --now autofs
ls /mnt/auto/share      # triggers the mount

Troubleshooting

systemctl status nfs-server      # server side
exportfs -v
firewall-cmd --list-services     # nfs, rpc-bind, mountd if filtered
dmesg | tail

Verify

findmnt /mnt/share || findmnt /mnt/auto/share
mount | grep nfs