2

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: 10.110.163.10

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 10.110.163.10 gives me the following:

Export list for 10.110.163.10:
/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           10.110.163.10:/nfs-directory/&

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 10.110.163.10:/nfs-directory /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

0

Edit your /etc/nfs-mount.auto :

default              -rw,sync           10.110.163.10:/nfs-directory/

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 .