Mount an external drive to a specific directory?

Hello,


I've researched this question and can't seem to find an answer that I'm able to understand.


I'm hoping to be able to mount an external drive to a specific directory on my system - specifically here: /Users/Shared/Mounts. I'm also hoping that I can use thuderbolt bridge from my iMac to access this same drive - meaning I'd like to mount on that machine to the same local directory as well.


The reason for this: I'm a video editor and have two machines - a lower powered macbook pro 2019 and a more capable iMac 2019. I commute and travel with the macbook pro and carry an external drive with me. I'd like to be able to have the fastest speeds when traveling but also the convenience of being able to simply plug into that laptop through thunderbolt and access all content without having to connect and reconnect the drive. Paths to files would also need to remain the same on both access points.


This info I found useful, but goes beyond my understanding:


https://apple.stackexchange.com/questions/291149/permanently-change-mount-point-of-volume


Thank you!

MacBook

Posted on Mar 3, 2020 11:29 AM

Reply

Similar questions

9 replies

Mar 4, 2020 10:25 PM in response to greyMediumMild

It works! I was able to create a folder and a symlink of it in my Macbook Pro's external drive. I added that symlink to /Users/Shared/Mounts/ on both Macbook and iMac and all the paths remain the same. Using Davinci Resolve, my editing package, I was able to load up the project on both machines and all files linked up nicely.


It was a bit confusing at first though, as the folder that symlink created looks exactly like an 'alias' and behaves like one in finder. But once you navigate to it inside of applications, the pathing was what i was looking for - i.e. /Users/Shared/Mounts/symlinkFolder/file.jpg


This link was helpful:

https://www.howtogeek.com/297721/how-to-create-and-use-symbolic-links-aka-symlinks-on-a-mac/

Mar 4, 2020 5:25 AM in response to HWTech

symlinks are a low level kernel level file system abstraction and as such all applications, programs, launch daemons, launch agents, etc... that access the file system will see them as just another file, directory, device, FIFO, etc... Basically they will see the item the symbolic link points at and not know it was a symlink that got them there.


An program would have to use some specific low level file system calls to even know it was a symlink and then bypass it.


An Alias on the other hand is a GUI framework abstraction, and as such unless the program is using the user mode file manager framework, an Alias will just look like a regular file to a program that does not link to those frameworks and does not use those framworks function calls.


Of course nothing keeps the symlink from being accurate, or even having an actual file path stored in it, but that is a setup and maintenance issue. For example, if the target files is moved or renamed, the symlink does not have a clue. But an Alias my still find the file as the Alias often times uses multiple ways of identifying the file even when it is moved or renamed to somewhere on the same disk.


greyMediumMild PS. I vote for just using /Volumes as well.


And if there are multiple external devices with the same volume name, then change the volume names on the external devices to make them unique.


And if you really want to see things in /Users/Shared/Mounts, then use a symlink as suggested by Wilddrums above.


And I also tend to agree with HWTech about trying to work with macOS and not fight it. I have had to undo many things I did in the early days because I was a Unix software developer and I knew better. I didn't, I just thought I did 😀

Mar 3, 2020 8:40 PM in response to greyMediumMild

What is wrong with it mounting at "/Volumes" which is the default? It is always there on every Mac. Unless you connect two drives with the same volume names you won't have any issues and it already does what you are looking for.


While it is possible to configure it on the "/Users/Shared/Mounts" using instructions from your link, you may find it could cause problems. macOS does not like unexpected things. Keep your system as simple as possible and use the macOS defaults. I learned a long time ago not to overly customize or overly complicate my macOS system configuration.


As for @Wilddrums' suggestion, I have found using symlinks doesn't always work properly with some apps.

Mar 3, 2020 9:28 PM in response to Wilddrums

Wilddrums wrote:

I'm curious of what are the apps that cannot work properly with such a low level thing as a Symlink? Maybe malware?

WD

I honestly don't recall as it has been some time since the last time it happened. Most apps work do work with the symlink as expected. Obviously it happens with an app I don't use very often. I know that some command line utilities have options to follow or not to follow symlinks, but I had never seen it happen in a standard GUI app before. If I happen to remember the app I will let you know.



Mar 4, 2020 9:23 AM in response to greyMediumMild

I see. Thank you all for the responses! Very helpful.


@wilddrums If I understand symlinks correctly, they are a 'shortcut' to the directory. So as an example, if I had 'file.jpg' inside of 'myExternalDrive' and added a symlink of the drive to /Users/Shared/Mounts the resulting path to that file will NOT be /Users/Shared/Mounts/myExternalDrive/file.jpg but instead /myExternalDrive/file.jpg since the path would still be unchanged?


Hope that questions makes sense. Ideally in this workflow that I have in my head, I would be able to have the same path in my macbook and my iMac - which I connect to the macbook through thunderbolt bridge to access the macbook's external drive. If I'm able to 'mount' the external drive in the same directory on both machines, this would allow for both to access the same files with the same path.


But yes, @HWTech I may just be asking for trouble with this way of working. I cant figure out a way to make the 'traveling external drive' experience more seamless.


Mar 4, 2020 9:54 AM in response to greyMediumMild

No, Symlinks are not "shortcuts" or "redirects", they simply make a folder on the external drive to seamlessly looks like it is located on the local drive. The path will be all on the local drive. No sign of the external volume at all.


In a nutshell, you let the drive mount in the default folder and set a Symlink to that drive in the folder of your choice. If you do that on both computers, this will be transparent for all applications.


A little warning. While there are no issues with virtually all apps, some pro-apps like video editing, may expect some content to always be available and may react unexpectedly if the drive is disconnected. In most cases this will not be a real problem.


WD

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Mount an external drive to a specific directory?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.