I want to automount a nfs share whenever a user logs in to our Mac Minis. My original idea was to use the remote share as the place for the user's home directories, but due to being not able to mount the share, I'm just trying to get it mounted to an unrelated directory via autofs first.
My /etc/auto_master
looks like this:
+auto_master
/net -hosts -nobrowse,hidefromfinder,nosuid
/home auto_home -nobrowse,hidefromfinder
/Network/Servers -fstab
/- -static
/- auto_nfs -nobrowse,nosuid
My /etc/auto_nfs
:
/home_tmp -fstype=nfs,vers=3,rw,resvport,tcp,soft,intr,rsize=8192,wsize=8192,noatime,timeo=900,retrans=3 192.168.0.2:/home_tmp
The remote machine is running 4.9.11-1-ARCH x86_64 GNU/Linux and it's /etc/exports
looks like
/home_tmp -nohide,sync,rw 192.168.0.0/26
and the share is also visible from the client:
$ showmount -e 192.168.0.2
Exports list on 192.168.0.2:
/home_tmp 192.168.0.0/26
The machine trying to mount the nfs share is within the 192.168.0.0/26 subnet.
When I do a sudo mount -t nfs -o resvport,rw 192.168.0.2:/home_tmp /home_tmp
, I can change into /home_tmp
and see it's content. But when I try to change into this directory with automount, I get:
$ cd /home_tmp
-bash: cd: /home_tmp: No such file or directory
The system log shows:
automountd: MOUNT REQUEST: name=/home_tmp [] map=auto_nfs opts=nobrowse,nosuid path=/home_tmp direct=1
automountd: PUSH /etc/auto_nfs
automountd: POP /etc/auto_nfs
automountd: mapline: -fstype=nfs,vers=3,rw,resvport,tcp,soft,intr,rsize=8192,wsize=8192,noatime,timeo=900,retrans=3 192.168.0.2:/home_tmp
automountd: do_mount1:
automountd: (nfs,nfs) /home_tmp -vers=3,rw,resvport,tcp,soft,intr,rsize=8192,wsize=8192,noatime,timeo=900,retrans=3
automountd: 192.168.0.2:/home_tmp penalty=0
automountd: nfsmount: input:
automountd: 192.168.0.2[other]
automountd: nfsmount: mount on /home_tmp vers=3,rw,resvport,tcp,soft,intr,rsize=8192,wsize=8192,noatime,timeo=900,retrans=3:
automountd: 192.168.0.2:/home_tmp
automountd: ping: 192.168.0.2 request vers=3 min=3
automountd: pingnfs: 192.168.0.2: RPC: Timed out
automountd: pingnfs FAIL: can't get nfs version
automountd: NFS server 192.168.0.2 not responding
automountd: Couldn't mount 192.168.0.2:/home_tmp, err=2
automountd: MOUNT REPLY : status=2, AUTOFS_DONE
automountd: mount of /home_tmp failed: No such file or directory
automountd: MOUNT REQUEST: name=/home_tmp [] map=auto_nfs opts=nobrowse,nosuid path=/home_tmp direct=1
automountd: PUSH /etc/auto_nfs
automountd: POP /etc/auto_nfs
automountd: mapline: -fstype=nfs,vers=3,rw,resvport,tcp,soft,intr,rsize=8192,wsize=8192,noatime,timeo=900,retrans=3 192.168.0.2:/home_tmp
automountd: do_mount1:
automountd: (nfs,nfs) /home_tmp -vers=3,rw,resvport,tcp,soft,intr,rsize=8192,wsize=8192,noatime,timeo=900,retrans=3
automountd: 192.168.0.2:/home_tmp penalty=0
automountd: nfsmount: input:
automountd: 192.168.0.2[other]
automountd: nfsmount: mount on /home_tmp vers=3,rw,resvport,tcp,soft,intr,rsize=8192,wsize=8192,noatime,timeo=900,retrans=3:
automountd: 192.168.0.2:/home_tmp
automountd: Couldn't mount 192.168.0.2:/home_tmp, err=2
automountd: MOUNT REPLY : status=2, AUTOFS_DONE
automountd: automountd exited
I read somewhere that this RPC: Timed out error can be caused by the nfs-server being started before some other service, so I restarted the nfs-server, but without effect. Any advice welcome to solve this...