I've run into some problems when configuring autofs on CentOS and I would really appreciate your help with it ^^

I have to VMs:

  1. CentOS Linux release 7.8.2003, IP address:

Two NFS shares defined in /etc/exports:

/nfs-directory          *(rw,no_root_squash)
/additional-nfs         *(rw,no_root_squash)
  1. Red Hat Enterprise Linux release 8.2

I'm trying to automount NFS from CentOS here

showmount -e gives me the following:

Export list for
/additional-nfs *
/nfs-directory  *

I've installed autofs, created the configuration file /etc/auto.master.d/nfs-directory.autofs and defined the following:

/nfs-directory          /etc/nfs-mount.auto

And in the file /etc/nfs-mount.auto I defined:

*               -fstype=nfsv4,rw,sync 

I enabled and restarted autofs, it does create the /nfs-directory, but it's empty, I can't see any files inside it...

When I type mount /mnt, everything works fine, NFS mounts correctly and I can access file within the share, but I can't manage to do the same with the automounter.

1 Answer 1


Edit your /etc/nfs-mount.auto :

default              -rw,sync 

Per default the mount type is nfs ; also you can access the share with /nfs-directory/default.

You can enable logging on autofs in /etc/autofs.conf :

logging = debug

Check the logs : journalctl -u autofs Restart autofs : systemctl restart autofs

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .