Rclone Spotlight indexing on Mac

What is the problem you are having with rclone?

I cannot add my Rclone mounts to spotlight for indexing.

The shares are not automatically added to Spotlight.
Even when forced, they do not result in searchable mounts.

Command to force add to spotlight:

And it's still not working:

mdutil -s -a

/:

Indexing enabled.
/Volumes/drive:

Error: unknown indexing state.

This has been discussed before in a couple of threads:


but without any completed solution.

As someone else mentioned, Commander One search has worked fine so far. But its far from ideal. Would love to get to a point of using Spotlight, perhaps even with content indexing at some point :astonished:.

What is your rclone version (output from rclone version)

rclone v1.50.1

  • os/arch: darwin/amd64

  • go version: go1.13.4

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Mac OSX 10.14.6 (18G4032)
Fuse for macOS 3.10.4

Which cloud storage system are you using? (eg Google Drive)

Tried with GDrive and Onedrive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

sudo rclone mount eonedrive1: /Volumes/drive --allow-other -o local --vfs-cache-mode writes

The rclone config contents with secrets removed.

[onedrive]
type = onedrive
token = <...>
drive_id = <...>
drive_type = business

[eonedrive]
type = crypt
remote = onedrive:enc
filename_encryption = standard
directory_name_encryption = true
password = <...>
password2 = <...>

A log from the command with the -vv flag

Not including the full -vv flag here since it shows all the files in the drive as (presumably) Finder traverses the mount to get folder sizes.

The key error is:

2020/05/25 01:39:02 ERROR : -o/--option not supported with this FUSE backend

I was using the old version. Can confirm the issue exists in latest version:

rclone --version
rclone v1.51.0
- os/arch: darwin/amd64
- go version: go1.13.7

It really isn't a rclone issue per se as it's related to fuse.

You seem to have what's needed to mount and see it but you'd want to poke around fuse and see what else is needed.

What are you trying to do with this?

Trying to get spotlight to work...
Remember this?


Have you tried cmount? if you compile a version with build -tags cmount you can then pass flags through to fuse. This would use the fuse library directly. Figured you'd may be at least want to try it and see if it fixes your issue. If it does, then perhaps the flag could be incorporated if the go library supports it.

sudo ./rclone cmount gd: test -o local

I'd build one for you but im not sure how to build for OSX. :frowning:

You need to compile it from source and use the mount command I had.

Thank you for the thought!

I too am not aware of how to build in OSX. I tried doing some googling over the past 20 mins and no dice. Some links say to use Xcode, but that may be for iOS apps? Out of my depth here.

Ok, so it wasn't so bad to find out how to build...

First, needed to install go - Got that from https://golang.org/doc/install?download=go1.14.3.darwin-amd64.pkg
its a Mac pkg file so it installs like a wizard would on Windows.

Second, downloaded the latest files off GitHub - https://github.com/rclone/rclone/archive/master.zip

Third, ran the following command:

go build -tags cmount

Few seconds later, got rclone.
Ran version, and got this:

> ./rclone --version
> 
> rclone v1.52.0-DEV
> 
> - os/arch: darwin/amd64
> 
> - go version: go1.14.3

Fourth, testing for mount, and we get:

./rclone cmount

Usage:
rclone cmount remote:path /path/to/mountpoint [flags]

Flags:
--allow-non-empty Allow mounting over a non-empty directory (not Windows).
--allow-other Allow access to other users.
--allow-root Allow access to root user.
--async-read Use asynchronous reads. (default true)
--attr-timeout duration Time for which file/directory attributes are cached. (default 1s)
--daemon Run mount as a daemon (background mode).
--daemon-timeout duration Time limit for rclone to respond to kernel (not supported by all OSes). (default 15m0s)
--debug-fuse Debug the FUSE internals - needs -v.
...

Success -- looks like we got a cmount version of Rclone.

Fifth, trying out the mount with google drive and checking the spotlight status:

sudo ./rclone cmount gdrive: /Volumes/gdrive --allow-other -o local --vfs-cache-mode writes

No issues there. We have a mount.

Spotlight says

mdutil -a -s

/:

Indexing enabled.

/Volumes/gdrive:

Indexing disabled.

OK, getting close -- maybe we can enable this:

sudo mdutil -i on /Volumes/gdrive/

Password:

first it showed it as:
/Volumes/gdrive:
Error: unexpected indexing state. kMDConfigSearchLevelTransitioning

Then finally:
/Volumes/gdrive:

Indexing enabled.

SUCCESS!

Or is it...
the mount is blank!
I tested it by "ls /Volumes/gdrive/" and it was blank indeed.

:grimacing: :grimacing:

You are super close if you made it that far.

Just change your go build to:

go build -tags cmount

and the binary will have cmount.

thanks!

Made an update to my previous response. Now its another issue.

Any cmount mount is blank? And normal mount shows fine?

What did you run to mount it?

I compiled on my mac and can mount without an issue.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.