Gcache not mounting. Assume its a user error

What is the problem you are having with rclone?

Gcache mount not connecting

What is your rclone version (output from rclone version)

rclone: Version "v1.49.2"

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

Google drive

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

rclone mount --log-file=/home/hd13/turbonatorii/rclone.log -vv --allow-non-empty --allow-other --cache-db-purge gcache: ~/mnt/gdrive &

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

2019/09/21 01:18:36 DEBUG : rclone: Version "v1.49.2" starting with parameters ["rclone" "mount" "--log-file=/home/hd13/turbonatorii/rclone.log" "-vv" "--allow-non-empty" "--allow-other" "--cache-db-purge" "gcache:" "/home/hd13/turbonatorii/mnt/gdrive"]

2019/09/21 01:18:36 DEBUG : Using config file from "/home/hd13/turbonatorii/.config/rclone/rclone.conf"

2019/09/21 01:18:36 DEBUG : gcache: wrapped gdrive:gdrive at root

2019/09/21 01:18:36 DEBUG : gcache: Purging the DB

2019/09/21 01:18:36 INFO : gcache: Cache DB path: /home/hd13/turbonatorii/.cache/rclone/cache-backend/gcache.db

2019/09/21 01:18:36 INFO : gcache: Cache chunk path: /home/hd13/turbonatorii/.cache/rclone/cache-backend/gcache

2019/09/21 01:18:37 ERROR : /home/hd13/turbonatorii/.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 "/home/hd13/turbonatorii/.cache/rclone/cache-backend/gcache.db": timeout

2019/09/21 01:18:37 Failed to create file system for "gcache:": failed to start cache db: failed to open a cache connection to "/home/hd13/turbonatorii/.cache/rclone/cache-backend/gcache.db": timeout

This should not ever be used as it allows for over mounting and hiding things.

You can only have 1 cache instance going at a time. Your error would indicate you already have one rclone cache process running.

You can check by doing a "ps -ef | grep rclone" and see what other rclone processes are running.

That error occurs when another (probably rclone) process tries to open the same database file that the cache uses. Since this requires exclusive access it gets locked when in use.

You are likely trying to connect 2 remoted via the same cache - or you have an old mount that used the cache but that did not terminate properly. On windows this will be solved on a restart, but on Linux you need to manually dismount it (there are some commands for this on the mount docs page if you need them).

Sidenote: If you want to actually run several remotes via the same cache there may be ways around that via using union to combine them first, but the cache backend can only be accessed by a single rclone instance at any given time.

I've cleared up the error with the cache.db, but still not mounting the drive. I cannot see any of the files on the google drive and cannot write to the drive.
New logs.

2019/09/27 18:50:53 DEBUG : rclone: Version "v1.49.3" starting with parameters ["rclone" "mount" "--log-file=/home/hd13/turbonatorii/rclone.log" "-vv" "--allow-non-empty" "--allow-other" "--cache-db-purge" "gcache:" "/home/hd13/turbonatorii/mnt/gdrive"]

2019/09/27 18:50:53 DEBUG : Using config file from "/home/hd13/turbonatorii/.config/rclone/rclone.conf"

2019/09/27 18:50:53 DEBUG : gcache: wrapped gdrive:gdrive at root

2019/09/27 18:50:53 DEBUG : gcache: Purging the DB

2019/09/27 18:50:53 INFO : gcache: Cache DB path: /home/hd13/turbonatorii/.cache/rclone/cache-backend/gcache.db

2019/09/27 18:50:53 INFO : gcache: Cache chunk path: /home/hd13/turbonatorii/.cache/rclone/cache-backend/gcache

2019/09/27 18:50:53 INFO : gcache: Chunk Memory: true

2019/09/27 18:50:53 INFO : gcache: Chunk Size: 10M

2019/09/27 18:50:53 INFO : gcache: Chunk Total Size: 1G

2019/09/27 18:50:53 INFO : gcache: Chunk Clean Interval: 1m0s

2019/09/27 18:50:53 INFO : gcache: Workers: 4

2019/09/27 18:50:53 INFO : gcache: File Age: 1h0m0s

2019/09/27 18:50:53 DEBUG : Adding path "cache/expire" to remote control registry

2019/09/27 18:50:53 DEBUG : Adding path "cache/stats" to remote control registry

2019/09/27 18:50:53 DEBUG : Adding path "cache/fetch" to remote control registry

2019/09/27 18:50:53 DEBUG : Cache remote gcache:: Mounting on "/home/hd13/turbonatorii/mnt/gdrive"

2019/09/27 18:50:53 DEBUG : Cache remote gcache:: subscribing to ChangeNotify

2019/09/27 18:50:53 DEBUG : Adding path "vfs/forget" to remote control registry

2019/09/27 18:50:53 DEBUG : Adding path "vfs/refresh" to remote control registry

2019/09/27 18:50:53 DEBUG : Adding path "vfs/poll-interval" to remote control registry

2019/09/27 18:50:53 DEBUG : : Root:

2019/09/27 18:50:53 DEBUG : : >Root: node=/, err=

2019/09/27 18:51:49 DEBUG : /: Attr:

2019/09/27 18:51:49 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=

2019/09/27 18:51:49 DEBUG : /: ReadDirAll:

2019/09/27 18:51:49 DEBUG : Cache remote gcache:: list ''

2019/09/27 18:51:49 DEBUG : : list: error: missing cached dir:

2019/09/27 18:51:50 DEBUG : /: >ReadDirAll: item=0, err=

2019/09/27 18:51:53 DEBUG : Cache remote gcache:: starting cleanup

2019/09/27 18:51:54 DEBUG : Google drive root 'gdrive': Checking for changes on remote

2019/09/27 18:52:46 DEBUG : /: Attr:

2019/09/27 18:52:46 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=

2019/09/27 18:52:48 DEBUG : /: Attr:

2019/09/27 18:52:48 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=

2019/09/27 18:52:48 DEBUG : /: Lookup: name=".Trash"

2019/09/27 18:52:48 DEBUG : /: >Lookup: node=, err=no such file or directory

2019/09/27 18:52:48 DEBUG : /: Lookup: name=".Trash-28337"

2019/09/27 18:52:48 DEBUG : /: >Lookup: node=, err=no such file or directory

2019/09/27 18:52:48 DEBUG : /: ReadDirAll:

2019/09/27 18:52:48 DEBUG : /: >ReadDirAll: item=0, err=

2019/09/27 18:52:48 DEBUG : : Statfs:

2019/09/27 18:52:48 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:271712959882 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=

2019/09/27 18:52:48 DEBUG : /: Attr:

2019/09/27 18:52:48 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=

2019/09/27 18:52:52 DEBUG : /: Attr:

2019/09/27 18:52:52 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=

2019/09/27 18:52:53 DEBUG : Cache remote gcache:: starting cleanup

2019/09/27 18:52:54 DEBUG : Google drive root 'gdrive': Checking for changes on remote

2019/09/27 18:53:02 DEBUG : /: Attr:

2019/09/27 18:53:02 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=

2019/09/27 18:53:53 DEBUG : Cache remote gcache:: starting cleanup

2019/09/27 18:53:54 DEBUG : Google drive root 'gdrive': Checking for changes on remote

2019/09/27 18:54:53 DEBUG : Cache remote gcache:: starting cleanup

2019/09/27 18:54:54 DEBUG : Google drive root 'gdrive': Checking for changes on remote

2019/09/27 18:55:53 DEBUG : Cache remote gcache:: starting cleanup

2019/09/27 18:55:54 DEBUG : Google drive root 'gdrive': Checking for changes on remote

2019/09/27 18:56:53 DEBUG : Cache remote gcache:: starting cleanup

2019/09/27 18:56:54 DEBUG : Google drive root 'gdrive': Checking for changes on remote

2019/09/27 18:57:54 DEBUG : Cache remote gcache:: starting cleanup

2019/09/27 18:57:54 DEBUG : Google drive root 'gdrive': Checking for changes on remote

2019/09/27 18:57:55 DEBUG : : Statfs:

2019/09/27 18:57:55 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:271712959882 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=

2019/09/27 18:57:55 DEBUG : /: Attr:

2019/09/27 18:57:55 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=

2019/09/27 18:58:08 DEBUG : /: Attr:

2019/09/27 18:58:08 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=

2019/09/27 18:58:08 DEBUG : /: ReadDirAll:

2019/09/27 18:58:08 DEBUG : : Re-reading directory (6m18.692903963s old)

2019/09/27 18:58:08 DEBUG : Cache remote gcache:: list ''

2019/09/27 18:58:08 DEBUG : : list: error: missing cached dir:

2019/09/27 18:58:08 DEBUG : /: >ReadDirAll: item=0, err=

2019/09/27 18:58:54 DEBUG : Cache remote gcache:: starting cleanup

2019/09/27 18:58:54 DEBUG : Google drive root 'gdrive': Checking for changes on remote

2019/09/27 18:59:54 DEBUG : Cache remote gcache:: starting cleanup

2019/09/27 18:59:54 DEBUG : Google drive root 'gdrive': Checking for changes on remote

This might be a problem, not sure:

2019/09/27 18:51:49 DEBUG : Cache remote gcache:: list ''
2019/09/27 18:51:49 DEBUG : : list: error: missing cached dir:

But before we dig into that - I want to check your config file please.
The most common errors when wrapping remotes for Crypt or Cache-backend is improper configuration (it is not necessarily super intuitive for new users)

Please copypaste your rclone config file here - but make sure you redact any sensitive information like secrets, crypt keys ect. first.
Please let us see the whole file - or at the very least both your (Google Drive) and (Google Drive Cache) sections and anything else relevant to the mount you are trying to set up.

[gdrive]

type = drive

client_id =

client_secret =

scope = drive

token =

[gcache]

type = cache

remote = gdrive:/gdrive

plex_url =

plex_username =

chunk_size = 10M

info_age = 1h0m0s

chunk_total_size = 1G

Thank you.
I don't see anything relevant to your issue here (ie. the configs seem to be correct).

Unrelated sidenote:
I notice your

client_id =
client_secret =

are empty. This means you are using the shared Oauth key. There is nothing wrong with this - but I would highly encourage you to look into creating your own (later once things are working at a basic level) because a personal key will have better performance when the shared key is under heavy load from many shared users. (instructions for how to do this are found under Gdrive docs here):
https://rclone.org/drive/#making-your-own-client-id


This seems a little redundant:

remote = gdrive:/gdrive

remote = gdrive:/
would work fine too assuming you wanted to cache the entire drive. Right now you are caching a subfolder on a drive. That is not "wrong" though by any means. It might be your intention - in which case you can ignore what I just said :slight_smile:

So to continue troubleshooting ...
I think my next step would be to run the same mount command, except replacing your gcache with gdrive (so we shortcut around the cache in other words)

does that then show the files?
This test will let us know if the problem is related to the cache, or the underlying drive. Regardless of the results it cuts the problem-size in half :slight_smile:

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