Prevent SMB Share to automount in Big Sur
Hi,
I am currently using an external program to mount my NAS over NFS in a custom folder, and it's all working great.
However, often my iMac M1 will automount the same NAS over SMB under /Volumes, and this creates some problems:
- I believe that indexing starts, as I hear the NAS disk work like crazy for an hour or so, and if I unmount the NAS from the Finder, NAS activity stops. In any case, after some hour, the disk gets mounted again and I know that from the sound of my disks
- Some programs like Word have problems in saving the file to the right path, since there is both an NFS and a SMB connection (Word complains about file write problems and if I unmount the NAS from Finder, leaving just the NFS connection, it will all work well)
While I could tell the Mac not to index the NAS, still I don't want to have twice the same connection with the NAS and moreover, I don't need SMB access - I prefer NFS one.
I have tried to avoid this automount to start, without any luck. I searched in /etc and in my hidden files in my profile to see if I could find something interesting, but I couldn't find anything.
The list of the mounted disks is here below:
Lucas-iMac:Downloads luca$ mount
/dev/disk3s1s1 on / (apfs, sealed, local, read-only, journaled)
devfs on /dev (devfs, local, nobrowse)
/dev/disk3s6 on /System/Volumes/VM (apfs, local, noexec, journaled, noatime, nobrowse)
/dev/disk3s2 on /System/Volumes/Preboot (apfs, local, journaled, nobrowse)
/dev/disk3s4 on /System/Volumes/Update (apfs, local, journaled, nobrowse)
/dev/disk1s2 on /System/Volumes/xarts (apfs, local, noexec, journaled, noatime, nobrowse)
/dev/disk1s1 on /System/Volumes/iSCPreboot (apfs, local, journaled, nobrowse)
/dev/disk1s3 on /System/Volumes/Hardware (apfs, local, journaled, nobrowse)
/dev/disk3s5 on /System/Volumes/Data (apfs, local, journaled, nobrowse, protect)
map auto_home on /System/Volumes/Data/home (autofs, automounted, nobrowse)
192.168.1.120:/FILM on /Users/luca/mount/FILM (192.168.1.120) (nfs, nodev, nosuid, mounted by luca)
/dev/disk3s1 on /System/Volumes/Update/mnt1 (apfs, sealed, local, journaled, nobrowse)
192.168.1.120:/iMac on /Users/luca/mount/iMac (192.168.1.120) (nfs, nodev, nosuid, mounted by luca)
//DRIVE@localhost:49821/Google%20Drive on /Volumes/GoogleDrive (smbfs, nodev, nosuid, nobrowse, mounted by luca)
//xxxx@192.168.1.120/iMac on /Volumes/iMac (smbfs, nodev, nosuid, mounted by luca)
As you see, /Users/luca/mount contains my NFS folders (the ones I mount with the script) while the last line contains the automounted SMB volume.
I read about a post where I should edit the fstab file adding the UUID of my Disk, but when I tried to get this information, nothing good is retrieved, even if the disk is mounted indeed:
Lucas-iMac:~ luca$ diskutil info /Volumes/iMac/
Could not find disk: /Volumes/iMac/
The auto_home doesn't seem to contain anything interesting:
Lucas-iMac:etc luca$ cat /etc/auto_home
#
# Automounter map for /home
#
+auto_home # Use directory service
#
# Get /home records synthesized from user records
#
+/usr/libexec/od_user_homes
Lucas-iMac:etc luca$ cat auto_master
#
# Automounter master map
#
+auto_master # Use directory service
#/net -hosts -nobrowse,hidefromfinder,nosuid
/home auto_home -nobrowse,hidefromfinder
/Network/Servers -fstab
/- -static
Any help to avoid automounting the SMB share would be appreciated.
Thanks
Luca
iMac 24″, macOS 11.6