Prevent drives from mounting when connected?

Hi

How can I, on a M! Pro MacPro running Monterey, prevent the OS from automatically mounting certain drives when connected?

Background: I have a CalDigit Thunderbolt dock, to which Time Machine drives for me and my wife are connected. When I connect my computer, I do not need (want) her drives to mount automatically.

Id this possible?

You could write an AppleScript that automatically disconnects the drive after it’s mounted, and have it run via Keyboard Maestro whenever that drive attaches. But it would still mount for a couple seconds.

True - I am always forgetting about Apple Script.

But I am looking for a build in solution as I am not keen on building something like that. But I might look into this.

I am happy to share a similar script I wrote to help get you started, if need be.

There’s some (likely) helpful information here: macos - How to Disable USB Auto-mount - Ask Different

The Unix way would be to add a noauto flag in /etc/fstab, something that’s covered in the first answer, though Apple sometimes diverges from the Unix way for Apple reasons. (I think this will work though)

3 Likes

Perfect - I love that macOS is so similar to Linux. Made the changes and it is working.

Thanks @ACautionaryTale

2 Likes