mount bind on osx?

macfuse_180x180 I’ve been using Connect360 to stream video to my Xbox but it does not allow me to choose more than one video directory to share and it will not follow links onto my external drive. This is a typical problem with a simple solution on Linux, mount --bind. I couldn’t find mount_bind for osx but a simple alternative that really shows off the utility of user filesystems saved the day.

Enter bindfs, a directory mirroring user filesystem that works with macfuse. Running bindfs /path/to/dest /path/to/link provides the same experience. Delving into the man page shows that you have tons of control over permissions of the directory mount as well.

If you plan to use bindfs on osx be sure to install macfuse from macports and save yourself the configure failure when building bindfs from source because you downloaded the dmg and ran the installer.

We’ve been running all of our services here on sizzo in linux chroots that rely heavily on bind mounted directories to share data. It wasn’t until the 2.6.26 kernel that read only bind mounts were working, which provide an extra level of data protection within the chroot. Alternatively using bindfs/fuse on linux seems like it would be another great solution, especially when more fine grained control of permissions is necessary.

Tags: , , , , , , , ,

  1. onassar’s avatar

    Great memcached/facebook slides.
    Really easy to understand, and well articulated.

    All the best.

  2. nicoen’s avatar

    I know this is old post. Nevertheless it won’t work on Snow Leopard in 64-bit kernel-mode. Macfuse it isn’t ported yet. :(

    cheers
    /nicoen

  3. Beryllium’s avatar

    Worked nicely for me, thanks :)

    @nicoen, I installed it via Macports on Snow Leopard. http://www.macports.org/