MacOS – How to fix the Spotlight index for an encfs-mounted directory

filesystemmacosspotlight

Until recently, on OS X 10.8, I was using Alfred (which in turn uses Spotlight) to search files and directories on an encfs-mounted partition (which is mounted off a folder in my Dropbox directory).

I used to use the command sudo mdutil -i on ~/Dropbox-encfs to enable indexing for that partition once it had been mounted (typically, I remounted every time I rebooted).

However, since upgrading to OS X 10.9, entering the same command returns the error Error: unknown indexing state. Indexing and searching on my main root partition continues to work:

~$ sudo mdutil -a -s
/:
    Indexing enabled.
/Users/myuserdirectory/Dropbox-encfs:
    Error: unknown indexing state.

Has something changed in OS X 10.9 that might cause this? How would I go about debugging or fixing this problem?

I'm using encfs version 1.7.4p1. I've already tried turning on and off the indexing (-i on, -i off), and using the -E flag to mdutil to erase the store.

I mount the encfs partition using the following command:

sudo encfs --public -ovolname=Dropbox-encfs ~/Dropbox/.encfs-crypted ~/Dropbox-encfs

Aside from the indexing problem, the mounted encfs partition otherwise seems to work fine.

I should add that I am also seeing warnings of this form in /var/log/system.log:

Dec 23 14:51:20 montpelier.local mds[57]: (Warning) Volume:
vsd:0x7ffe0c826c00 Open failed.  failureCount:7

Best Answer

Appending the option -o local to the mount (i.e. encfs) command seems to work...