how to use /etc/fstab to do remote mounts using machine name or personalized naming scheme?

Hi,

I'm using 3 Synology diskstations and a couple of Mac's to store my files.

The Synology's all contain a similar (Plex) file structure: /data/media/music /data/media/video /data/media/podcast (just examples). These machines are not available all the time, i.e. they are each on a different time/boot schedule.

This results in them mounting all in similar ways and me not being (easily) able to distinguish if it is music on Syno1 or on Syno2 etc. Like this:

/Volumes/media

/Volumes/media-1

/Volumes/media-2


How do I construct my /etc/fstab so that it will mount e.g. like this:

/Volumes/DS1/media

/Volumes/DS2/media

/Volumes/DS3/media

or

/Volumes/hostname/media

or any other logic naming scheme using a recognisable machine / node name?


Thanks for helping out!

Posted on May 20, 2023 12:15 AM

Reply

Similar questions

3 replies

May 20, 2023 3:37 AM in response to iPanini

iPanini wrote:

How do I construct my /etc/fstab so that it will mount e.g. like this:

It might not be possible. That's the first thing you'll have to accept about Mac networking - it's really bad and getting worse.


First of all, the /Volumes path is reserved for the system's use. If you want to have better control over your own mount points and make them more stable, you will need to specify your mount points elsewhere.


I recommend a Google search for "autofs technical white paper". This is a document that Apple published and withdrew years ago. It describes how to use /etc/fstab to run the auto mounter. It's likely to be an exercise in frustration. Apple didn't take down this documentation without good reason.

May 20, 2023 5:28 AM in response to etresoft

Interesting read! Thanks for pointing me to it ;-)

For the time being, in fact as a quick workaround, I'd prefer to use Directory Utility to see if I can use it to create the mount entries in the correct config files (/etc/).

Are you aware if this is still possible? I'm on Catalina and on Monterey for that matter.


Thanks a ton for helping out!

May 20, 2023 12:30 PM in response to iPanini

iPanini wrote:

Interesting read! Thanks for pointing me to it ;-)
For the time being, in fact as a quick workaround, I'd prefer to use Directory Utility to see if I can use it to create the mount entries in the correct config files (/etc/).
Are you aware if this is still possible? I'm on Catalina and on Monterey for that matter.

I don't know. You can try it. Isn't that for NFS? Modern security models may be incompatible with things like NFS. You just have to test it. Even just accessing local files, sometimes root is denied on modern macOS.


You should be able to create and use your own mount points. That should give you a stable path to use, as long as permissions will let you do it.

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.

how to use /etc/fstab to do remote mounts using machine name or personalized naming scheme?

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