12

Is it possible to (auto) 'mount' folders as Volumes? I have a large DAS Volume, 'Data', that contains all my data. To make paths shorter and more future proof, I'd like to have Volumes like

/ContentTypeA/ /ContentTypeB/

Instead of using

/Data/ContentTypeA/ /Data/ContentTypeB/

etc, which is where the data actually resides.

Any ideas on how to do that? It's not a big problem. Just curious.

4
  • Does the answer to apple.stackexchange.com/questions/84222/… (which recommends the use of symbolic links or aliases) solve your problem?
    – nohillside
    Aug 4, 2013 at 14:38
  • It doesn't seem to work with either. I.e. doing either cd /ContentTypeA/ or cd /ContentTypeA/existingfolder just says 'no such file or directory'. :(
    – jiku
    Aug 4, 2013 at 15:54
  • There will be no folders unless you create them :-)
    – nohillside
    Aug 4, 2013 at 17:19
  • For Catalina, the answer is given here: apple.stackexchange.com/a/372500/119397 -- see "man synthetic.conf"
    – ronen
    Dec 19, 2019 at 8:27

4 Answers 4

10

Let's assume you are mounting/attaching your Data drive as usual which will result in paths like /Volumes/Data/ContentA and /Volumes/Data/ContentB. You can now do either of:

  • create symbolic links via Terminal running the following commands in a Terminal window:

    ln -s /Volumes/Data/ContentA ~/ContentA
    ln -s /Volumes/Data/ContentB ~/ContentB
    
  • create aliases via Finder by opening /Volumes/Data in Finder, selecting ContentA, pressing Cmd-L to create an alias and moving this alias to your Home folder. The alias file can afterwards be renamed as you see fit.

With both options the content of the Data drive will be accessible via your Home folder.

1
  • That works. :) Combining it with the home folder solved it. Thanks a lot patrix!
    – jiku
    Aug 4, 2013 at 17:56
16

Sometimes symbolic links may not be suitable for your needs.

In that cases you can use bindfs - a FUSE filesystem for mounting a directory to another location.

Install it with homebrew:

brew install bindfs

And then bind one folder to another:

bindfs /Volumes/Data/ContentA ~/ContentA
3
  • cool thanks, is this different than the mount command on linux? or is this basically a port of the mount command to MacOS? Jul 14, 2017 at 21:26
  • @AlexanderMills bindfs is a FUSE filesystem for mounting a directory to another location. It's not mount command.
    – mixel
    Jul 15, 2017 at 1:38
  • When I run brew install bindfs I see: Error: bindfs has been disabled because it requires closed-source macFUSE!
    – Hackeron
    Jul 3, 2022 at 8:33
8

I just wanna say thanks to @mixel - that is THE WAY to do it, I actually wanted to mount the iCloud Drive as a volume, so that it appears on the desktop.

Installation of bindfs did not go that easy on Sierra, I had to do the following:

brew cask install osxfuse
brew install homebrew/fuse/bindfs

and then in my case I might add that the handy relevant bindfs option is -o volumename=NAME, otherwise the volume gets some crazy name that hurts eyes.

And for anyone who'd like to have the iCloud Drive appear as a volume, the sequence is this:

sudo mkdir /Volumes/iCloud\ Drive
sudo bindfs -o volname=iCloud\ Drive /Users/robert/Library/Mobile\ Documents/com~apple~CloudDocs \
        /Volumes/iCloud\ Drive/
2
  • Disadvantage of fuse is that it do not support inotify events. If source updated, while App watching for updates in destination, it will not receive updates.
    – diimdeep
    Apr 25, 2018 at 12:16
  • Two comments: 1) You have to do it every time the session restarts. 2) The Volume is not showing up in the volume list in the sideBar. Would you know a workaround?
    – Myoch
    Nov 5, 2018 at 0:49
6

Update for 2021 on High Sierra:

Trying to install bindfs on MacOS today, using the examples above, I got this error:

Error: bindfs has been disabled because it requires closed-source macFUSE!

Bummer. (Don't you just hate it when someone else's ideology interferes with your technology?)

But thanks to: https://github.com/osxfuse/osxfuse/issues/801 I was finally able to workaround that, and install bindfs from here:

brew install gromgit/fuse/bindfs-mac

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .