Sorry, it seems to have posted a draft I had, rather than the full item. I noticed one or two errors while putting it together, but it didn't affect the end result.
Hi All.
I am playing around with NFS and my NAS, trying to make sure the computer can automount the shares when required.
Here is the setup.
NAS: cat /etc/exports
/volume1/photo 192.168.2.0/24(rw,async,no_wdelay,root_squash,insecure_locks,anonuid=1024,anong id=100)
/volume1/music 192.168.2.0/24(rw,async,no_wdelay,root_squash,insecure_locks,anonuid=1024,anong id=100)
/volume1/video 192.168.2.0/24(rw,async,no_wdelay,root_squash,insecure_locks,anonuid=1024,anong id=100)
Client: showmount -a xerxes
All mounts on xerxes:
192.168.2.201:/volume1/music
192.168.2.201:/volume1/photo
192.168.2.201:/volume1/video
Client: showmount -e xerxes
Exports list on xerxes:
/volume1/video 192.168.2.0/24
/volume1/music 192.168.2.0/24
/volume1/photo 192.168.2.0/24
Client: /etc/auto_master
#
# Automounter master map
#
+auto_master # Use directory service
/net -hosts -nobrowse,hidefromfinder,nosuid
/home auto_home -nobrowse,hidefromfinder
/Network/Servers -fstab
/- -static
/- /etc/automounts/Xerxes
Client: /etc/automounts/Xerxes
/Volumes/video/ -fstype=nfs,rw,bg,hard,intr,tcp xerxes:/volume1/video
/Volumes/music/ -fstype=nfs,rw,bg,hard,intr,tcp xerxes:/volume1/music
/Volumes/photo/ -fstype=nfs,rw,bg,hard,intr,tcp xerxes:/volume1/photo
Client: ls -la | grep 'auto' (inc subdir automounts)
-rw-r--r-- 1 root wheel 149 Aug 5 16:51 auto_home
-rw-r--r--@ 1 root wheel 221 Dec 24 18:07 auto_master
-rw-r--r-- 1 root wheel 194 Aug 5 16:51 auto_master~orig
-rw-r--r--@ 1 root wheel 1766 Dec 24 19:02 autofs.conf
drwxr-xr-x 3 root wheel 102 Dec 24 19:18 automounts
-rwxr-xr-x@ 1 root wheel 248 Dec 24 19:18 automounts\Xerxes
After executing sudo automount -vc
Client: automount -vc
automount: /net updated
automount: /home updated
automount: /Volumes/video mounted
automount: /Volumes/music mounted
automount: /Volumes/photo mounted
automount: no unmounts
Up until this point, everything seems to be working well.
Automount appears to be showing its mounted succesfully
/Volumes has the three subdirectories as it should
However when browsing to it via Terminal or Finder, the directory is Read Only and Empty.
Console shows the following.
Client: Console
automountd[330]: parse_entry: getmapent for map /etc/automounts/Xerxes, key /Volumes/video failed
automountd[330]: parse_entry: getmapent for map /etc/automounts/Xerxes, key /Volumes/music failed
automountd[330]: parse_entry: getmapent for map /etc/automounts/Xerxes, key /Volumes/photo failed
Client: Manually mount as a test
If I run the following command, it mounts the NFS share and shows the contents - it fails without the -o resvport however.
sudo mount -t nfs -o resvport xerxes:/volume1/video /test/video
I added the resvport to the autofs.conf AUTOMOUNTD_MNTOPTS line to try and get this working as well
Does anyone have any idea why the manual mount will work, but the autofs mount fails?