Config OK for rclone (gDrive), but not for cache and crypt

#1

Hi!

First of all, sorry for my bag english :confused: and i’m a newb for command line.

I need help to config my cache and crypt.

I succesfully configure rclone (1.47) on my NAS synology, link it to my gDrive (team drive) and my plex server hosted on the NAS. I can successfully read the files on my devices connected to my Plex account.

For the moment, my gDrive has only 3 files to avoid overloading queries. So I’m trying to install rclone cache and crypt. I followed the following tutorial:

https://bytesized-hosting.com/pages/rclone-gdrive

Without success…

This is my rclone config:

[gdrive]
type = drive
client_id =
client_secret =
scope = drive
token = 
team_drive =

[gcache]
type = cache
remote = gdrive:/gdrive
plex_url = http://localhost:32400
plex_username = 
plex_password =
chunk_size = 5M
info_age = 1d
chunk_total_size = 10G

[gcrypt]
type = crypt
remote = gcache:/crypt
filename_encryption = standard
directory_name_encryption = true
password = 
password2 = 

I mount the gdrive with this command:

rclone mount --allow-other --allow-non-empty gdrive: ~/mnt/gdrive &

I can see the gdrive files on my local network. But when i try this command to crypt:

rclone mount --allow-other --allow-non-empty gcrypt: ~/mnt/gdrive &

I received this error message:

admin@DISKSTATION:~$ rclone mount --allow-other --allow-non-empty gcrypt: ~/mnt/gdrive &
[3] 19925
admin@DISKSTATION:~$ 2019/05/01 05:45:49 ERROR : /var/services/homes/admin/.cache/rclone/cache-backend/gcache.db: Error opening storage cache. Is there another rclone running on the same remote? failed to open a cache connection to “/var/services/homes/admin/.cache/rclone/cache-backend/gcache.db”: timeout
2019/05/01 05:45:50 ERROR : /var/services/homes/admin/.cache/rclone/cache-backend/gcache.db: Error opening storage cache. Is there another rclone running on the same remote? failed to open a cache connection to “/var/services/homes/admin/.cache/rclone/cache-backend/gcache.db”: timeout
2019/05/01 05:45:50 Failed to create file system for “gcrypt:”: failed to make remote gcache:"/crypt" to wrap: failed to start cache db: failed to open a cache connection to “/var/services/homes/admin/.cache/rclone/cache-backend/gcache.db”: timeout

Can you help me please?

Thanks!

#2

allow-non-empty is generally bad as it allows for over mounting and hiding stuff. Would highly recommend to not use it.

That error means that you have more than 1 rclone cache process running.

ps -ef | grep rclone

and kill the process ID of the other running one.

Cache is not really needed assuming you are on the latest version.

If you really want to use the cache backend, I’d set the chunk_size to 32M at 5M is very very small and creates a lot of overhead.

#3

Ok, and what’s the command to kill?

admin@DISKSTATION:~$ ps -ef | grep rclone
admin 18679 16323 0 05:41 pts/26 00:00:00 rclone mount --allow-other --all ow-non-empty gdrive: /var/services/homes/admin/mnt/gdrive
admin 26673 26627 0 06:43 pts/29 00:00:00 grep --color=auto rclone
admin 31751 1 0 Apr30 ? 00:00:03 rclone mount --allow-other --all ow-non-empty gcrypt: /var/services/homes/admin/mnt/gdrive

And the command to Mount correctly ?

So, if i don’t use cache, how to config crypt with my config?

Thanks for your help ! :blush:

#4

Yes, you can just use kill or kill 18679 and kill 31751

I do a very basic command as the defaults work well without changing much.

/usr/bin/rclone mount gcrypt: /GD --allow-other --dir-cache-time 96h --log-level INFO --log-file /opt/rclone/logs/rclone.log --timeout 1h

allow-other lets other users than the one that mounted it.
dir-cache-time uses a memory based cache to keep track of directory and file names. If anything changes, it will expire it and recheck. Longer the better.
logging just keeps a log file somewhere as I like keep a log.
timeout for 1 hour just helps for pausing in plex.

#5

I feel really dumb…

This is my config:

[gdrive]
type = drive
client_id =
client_secret =
scope = drive
token =
team_drive =

[gcrypt]
type = crypt
remote = gdrive:/crypt
filename_encryption = standard
directory_name_encryption = true
password =
password2 =

This is my result for command ps -ef | grep rclone,after kill previous process:

admin@DISKSTATION:~$ ps -ef | grep rclone
admin 8821 8487 0 17:55 pts/26 00:00:00 grep --color=auto rclone

And when i try your command:

admin@DISKSTATION:~$ /usr/bin/rclone mount gcrypt: /GD --allow-other --dir-cache-time 96h --log-level INFO --log-file /opt/rclone/logs/rclone.log --timeout 1h
2019/05/01 17:56:46 Failed to open log file: open /opt/rclone/logs/rclone.log: no such file or directory

#6

So I’m not as familiar with the layout of the disk on a diskstation.

It’s tell you that you don’t have a directory that is setup like I have, which is probably the case.

You can do something probably like /tmp/rclone.log or you can always remove the log-file from the command line. I like to keep a log file so I can see errors and such.

If you think Windows, it’s like I gave you a path to C:\WINNT or something and you are running on C:\Windows so it gives an error.