Rclone + Cache / Crypt - Failed Uploads because Cache is already mounted

Problem:

I'm currently using Rclone to mount a Google Drive to my server for Media playback; I've got files encrypted using Rclone Crypt and recently switched away from a 3rd party Cache system (PlexDrive) to instead using Rclone Cache. Those Media folders are then mounted and then merged using Fusermount for seamless local and remote file access and reading.

I have no issues mounting, decrypting, and from what I've tested, using the Rclone cache mount to read from those Folders using my Media Server. I'm pretty sure my setup is less then optimal when it comes to the specific cache and file system flag's I've been using for those mounts but the system works regardless. The spot I'm running into issues is when I try uploading content to my Google drive from those folders using Rclone and I get this error:

ERROR : /home/user/.cache/rclone/cache-backend/drive-cache.db: Error opening storage cache. Is there another rclone running on the same remote? failed to open a cache connection to "/home/user/.cache/rclone/cache-backend/drive-cache.db": timeout

I believe this is because the Rclone cache is already mounted and being used for the Crypt drives etc. As a result, I'm not sure how to go about resolving / fixing this and what I could be doing wrong. :frowning:

Command Used when trying to upload content (example):
rclone copy /home/user/mounts/m/m-r/ m-gd:/

Rclone Version:

rclone v1.50.2
- os/arch: linux/amd64
- go version: go1.13.4

OS:

Ubuntu 18.04x 64 bit

Cloud Storage System:

Google Drive (Rclone Crypt, Rclone Cache, & FuserMounts Drive)

Method to the Madness:

Currently, I mount the Google Drive directory, then mount a Cache Version using the Rclone name to a seperate Directory. The Crypt mounts for each media library folder then point to this Cache directory and are then mounted to their respective folders for Fuse mount setup.

Google Drive -> Google Drive Cache __> M-GD  -> Fuser of Fuse-M and M-R Folders
                                   |_> TV-GD -> Fuser of Fuse-TV and TV-R Folders

The idea is that Fuse-M (or TV) are the combination of the Google Drive files read from the Crypt drive (M-GD or TV) and the local Folder (M-R) for reading. When uploading to Google drive, I grab the content of M-R and upload it to M-GD through its own Rclone process; this is where I'm encountering an issue.

Drive Directories:

/home/user/mounts/
  /drive-mount
  /drive-cache
  /m
     /fuse-m
     /m-gd
     /m-r
  /tv
     /fuse-tv
     /tv-gd
     /tv-r

Mount Commands used (in order):

  1. Mount Google Drive:
  • Name: drive-mount:/
  • Type: Google Drive
  • Command:
/usr/bin/rclone mount drive-mount:/ /home/user/mounts/drive-mount/ \
      --allow-other \
      --fast-list \
      --dir-cache-time 24h \
      --drive-skip-gdocs \
      --drive-chunk-size=64M \
      --umask 002 \
      -vv
  1. Mount Cache Drive:
  • Name: drive-cache:/
  • Type: Cache Mount
  • Command:
/usr/bin/rclone mount drive-cache:/ /home/user/mounts/drive-cache/ \
      --allow-other \
      --fast-list \
      --drive-skip-gdocs \
      --drive-chunk-size=64M \
      --cache-workers=12 \
      -vv
  1. Mount Movie / TV Drive:
  • Name: dec-m:/ or dec-tv:/
  • Type: Crypt Drive
  • Command: (example for Movies)
/usr/bin/rclone mount \
      --allow-other \
      --acd-templink-threshold 0 \
      --stats 10s \
      --buffer-size 1G \
      --timeout 10s \
      --contimeout 10s \
      --checkers 16 \
      --vfs-cache-mode minimal \
      --vfs-read-chunk-size 100M \
      --vfs-read-chunk-size-limit 400M \
      --vfs-cache-max-age 10h \
      -vv \
      dec-m:/ /home/user/mounts/m/m-gd/
  1. Mount Fuse Drive for Movies / TV:
  • Type: Fusermount Mounts
  • Command: (example for Movies)
/usr/bin/unionfs-fuse \
      -o cow,allow_other,direct_io,auto_cache,sync_read \
      /home/user/mounts/m/m-r/=RW:/home/user/mounts/m/m-gd/=RO /home/user/mounts/m/fuse-m

Relevant Files:

I apologize for the extremely long write up, I could probably have written this more efficiently but wanted to provide as much information as possible and explain what I could. I can include / provide logs of the mount command output.

In advance, thank you for reading through this wall of text and any help / insight you might provide! :slight_smile:

Wow, this looks really involved. I'm going to try to replicate on my end and I'll get back to you.

[edit]
I confess, your setup looks very complicated, and there are enough differences in our setups that it would take a long time for me to replicate everything in your setup. Can you provide a minimum example which shows the issue you're describing? Just a list of steps is fine.

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