Google Drive (former Google File Streams) migrated from using osxfuse to SMB on macOS and stability went down the drain.
rclone on the other hand has been a solid choice for a long time, and support for crypt remote helps avoid dependency on yet another tool – Cryptomator, (and associated extra mount of raw data).
Mounting with rclone is pretty straightforward but in this case, requires additional flags to ensure the mount can tolerate high latency of Google Drive remote and avoid spurious unmounts. Those flags took me a while to discover.
- Install rclone from https://rclone.org, not homebrew. (v1.56.2 as of writing)
- Install macFUSE from https://osxfuse.github.io (v4.2.1 as of this writing)
- If simple GUI wrapper desired – install Platypus from https://sveinbjorn.org/platypus
- On https://console.cloud.google.com create a project and issue credentials as described at https://rclone.org/drive/
rclone configand configure required remotes.
Specify the following flags to the mount command:
--daemon– to start the background daemon and return
--daemon-timeout 599s– this is important. Cloud mounts are very high latency, you want as long a timeout value as possible for the kernel to wait for the userspace program to respond without giving up and unmounting. The spurious unmounts are easily reproducible by issuing
find .in a mounted folder or two. There is or was some sort of limit of 10 minutes according to multiple sources, however, I could not confirm that. Still, 599 seconds seems to be stable enough for me.
--vfs-cache-mode full– self-explanatory
--vfs-cache-max-size 1024G– or whatever other suitable value you want
--drive-acknowledge-abuse– without that flag files that are considered “harmful” by Google will fail with i/o error, which is rather nondescript.
To summarize, your mount command for rclone remote
google-drive should look something like this:
rclone mount google-drive: ~/google-drive --volname "Google Drive" \ --drive-acknowledge-abuse \ --vfs-cache-mode full --vfs-cache-max-size 1024G \ --daemon --daemon-timeout 599s
To unmount, use
diskutil unmount or
diskutil unmount force in place of
umount -f respectively.
Quoting the https://sveinbjorn.org/platypus:
With a bit of care in naming the remotes a small script below can be used to create a simple minimalistic UI to mount, unmount, and view the status of all configured rclone remotes:
- User-readable titles can be derived from rclone remote names by replacing
-with ` ` and converting them to title case
- Remote names ending with specific suffixes, such as
-raw, etc. can be skipped; This is handy when using crypt remote: you would not want to manually mount the underlying raw storage, only mount crypt remote.
rclone.conf may look like so:
[google-drive] type = drive ... [encrypted-data-raw] type = drive ... [secret-encrypted-data] type = crypt remote = encrypted-data-raw: ...
This will result in the menu looking like so:
🟢 Google Drive
🔴 Secret Encrypted Data
Each item will have a submenu, with the following actions:
Due to Platypus limitation, the remote name will be repeated in the title of submenu items.
Sources, including Makefile that will do everything for you, can be found here
The embedded version of
Mounter.py below is facilitated by https://emgithub.com.