I'm on Snow Leopard. I have both MacFUSE and fuse4x installed. Is there a copy-on-write filesystem that I can install?

I tried building UnionFS-FUSE 0.25 using fuse4x's includes and libs, but I get this error:

error: ‘AT_SYMLINK_NOFOLLOW’ undeclared

It seems that OS X doesn't define this constant (I grepped all of /usr/include and it wasn't found).

I also tried using OS X's built-in union mounts (mount -o union) but it didn't behave as expected. I mounted 2 filesystems (using dmg files) with the union option to the same mount point. The first was read-only, and had a directory called d1 containing some files. The second did not have a directory with that name. When I tried to create a file in d1 in the union mount, I got a read-only fs error. I expected it to automatically create the dir and the file under it, both in fs #2. I then tried to create d1 in fs #2, but then the contents of d1 in fs #1 were completely hidden (the dir appeared empty). Basically the union-ing behavior only happened at the root level of filesystems, and wasn't recursive.

If someone wants to try replicating the built-in union mount behavior, I used this guide.

I'm not familiar with copy-on-write filesystems - does my expectation match how copy-on-write filesystems should work?

  • mount -union appears to be working as documented: Causes the namespace at the mount point to appear as the union of the mounted filesystem root and the existing directory. Lookups will be done in the mounted filesystem first. That means when finds d1 in fs#1, that's used, instead of some virtual union directory being returned. So that's probably not a solution...
    – Daniel Beck
    Commented Aug 29, 2012 at 7:26
  • @DanielBeck thanks, I didn't notice that. But this means I'll need a different solution.
    – Kelvin
    Commented Aug 29, 2012 at 17:22

1 Answer 1


After doing a little more research, I may have to give up on a pre-written solution and just write my own.

PyFilesystem looks like it has potential, particularly the MultiFS fs type. Its FUSE code needs a patch to work with fuse4x.

The MultiFS documentation isn't clear what whether it will create a directory on the writable fs, but I'll give it a try.


The patch introduced a bug when it moved this line before the iconv CDLL loading:

_libfuse = CDLL(_libfuse_path)

Just move it right after and it should work on OS X. (A general fix requires also adding the line after the if _system in block.)

So I tried the MultiFS and it does not create missing directories on the writable FS. But I'm guessing it's easy to add (even though I'm not a python expert). Also, trying to overwrite or append to a file on one of the read-only FS's doesn't consistently create the corresponding path on the writable one. I get a lot of errors and hangs (the fuse process then starts using a lot of CPU). This solution still looks very promising though.

You must log in to answer this question.

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