Apple - Mount folder as a volume (OSX)

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

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.


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/