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: bind, bindfs, chroot, leopard, macfuse, mount, OSX, readonly, tiger
-
Great memcached/facebook slides.
Really easy to understand, and well articulated.All the best.

1 comment
Comments feed for this article
Trackback link: http://sizzo.org/wp/2008/12/mount-bind-on-osx/trackback