How to mount remote shares that have the same name, and easily differentiate them in the Finder?

Solution 1:

Although tags cannot be edited directly from the finder for volumes, comments can.

Therefore, I went into Side barDevicesMachine Name (which is where I can see all the volumes. In fact, it shows the /Volumes folder), and did the following:

  • I added the name of the particular server as a comment to each of the volumes.
  • In the finder view options, I added the comment column so that it shows when the folder is in list view, and checked the "always open in list view" option.

Therefore, now, whenever I open the volumes list I can see the comment and know exactly which share I want to open.


Previous to discovering this, I discovered that although volume tags cannot be edited from the finder, they can be changed through command line.

  • Create a dummy folder or use some existing folder in your own home folder. Change its tag to whatever you want the volume to have.
  • Get info on the volume you want to change, to see its current name. That is, if the share name is your username userX, and you have more than one such share mounted, one will be named userX, the next userX-1, userX-2 and so on. You can find out the name by getting info on the volume and looking at the "Name and extension" box.
  • Run the following commands from terminal to copy the tags from you dummy folder:

    xattr -wx com.apple.metadata:_kMDItemUserTags "$(xattr -px com.apple.metadata:_kMDItemUserTags /Users/userX/dummyFolder )" /Volumes/userX-N
    xattr -wx com.apple.FinderInfo "$(xattr -px com.apple.FinderInfo /Users/userX/dummyFolder )" /Volumes/userX-N
    

    Replace /Users/userX/dummyFolder with the full path of your dummy folder (you can drag it to the terminal window for that), and /Volumes/userX-N with the name of the volume that you verified above.

I learned this method from this answer.

Nevertheless I prefer the first method I mentioned, now that I discovered it, because:

  • It displays actual textual information rather than a color I have to remember the meaning of (though of course I could go for a text tag rather than a color tag).
  • It requires no command-line access, only simple finder operations.
  • It doesn't change anything in the volume that isn't supposed to be changed.

Note: Both solutions require that you do not remove the .DS_store file on the server.