One of the nice things (that used to be) about macOS is how much unix is underneath, but this has been less true each year.
Like any normal human being, I do my development on a real Unix system, FreeBSD. I ended up using FreeBSD VMs that have NFS exports, and I mount those on my macOS. However, there have been issues with Catalina, here’s the main problem:
mount | grep 'map auto_nfs_antranigv' | wc -l
18
So for some reason in Catalina you can’t do nested mounts, because auto_nfs_antranigv
was mounted in /Users/antranigv/nfs
, which is inside /Users
(also autofs’ed) it was duplicating and ended up eating a lot of CPU π
Here’s the proper way of doing it
First, in /etc/auto_master
add the following:
/System/Volumes/Data/netmount auto_nfs_user
(you might want to change user
to your username)
Then, create the following file β /etc/auto_nfs_user
Finally you can set your mounts, for example:
someoneelsecomputer -fstype=nfs cloudserver:/usr/home/sysadmin/cloud
here’s a complete example:
antranigv@zvartnots:~ $ cat /etc/auto_master
#
# Automounter master map
#
+auto_master # Use directory service
#/net -hosts -nobrowse,hidefromfinder,nosuid
/home auto_home -nobrowse,hidefromfinder
/System/Volumes/Data/nfs auto_nfs_antranigv
/Network/Servers -fstab
/- -static
antranigv@zvartnots:~ $ cat /etc/auto_nfs_antranigv
illuria-dev -fstype=nfs illuria-dev:/usr/home/antranigv/illuria
devbsd-src -fstype=nfs devbsd00:/usr/src
Now I’m happy! π