Fixing automount problems on macOS Catalina_

July 14, 2021 @10:30

I had previously bemoaned the inability to figure out why my automounts were being so stupid in Catalina and after periodically searching and giving up I finally found a bread crumb that showed me the way.

Previously I automounted several shares in a directory under my home directory called Shares, but ran into a situation where it duplicated the mounts frequently and often crashed while accessing data in a NFS mounted directory. It looks like this is no longer the way... exactly.

The New Way

It looks like what Apple wants you to do in the brave new world is to create an entry in / using their virtual symbolic link facility (synthetic.conf(5)) and mount under that. A quick look at the manpage and I was able to come up with the following:

/etc/synthetic.conf

# Create a virtual /Shares folder to automount into
Shares

Then I just changed my auto_master to mount my auto_nfs map on /Shares instead of /System/Volumes/Data/Users/mernisse/Shares.

/etc/auto_master

/Shares         auto_nfs

It looks like the automounter in macOS will resolve that synthetic location to /System/Volumes/Data/Shares, so I symlinked that into my homedir using good old ln(1). After a quick automount -vc my mounts appeared and after a several minutes I've noticed no duplication (previously I'd have 20 or 30 duplicates by now).

Automount sans duplicates!

I wish this was better documented but hopefully this will help someone else!

Subscribe via RSS. Send me a comment.