What is the problem you are having with rclone?
When using VFS Cache on a union mount, locally stored media can be played, but anything on the remote times out.
I've moved my setup from a full Ubuntu server install with plex, rclone etc running directly from the OS to running Proxmox and containerizing the applications. For Rclone I've set this up on the master node and am bind mounting for the containers to have read/write access ensuring the same GUID is used and mapped. I've mirrored my rclone setup from how it was on the Ubuntu installation and copied the config over.
On the node running rclone I changed the fuse.conf to uncomment allow-other and also installed fuse3. Now when I start the mount I can play any files which are stored locally mounted to sd, but anything that is stored on the gdrive part of the union just freezes. I've tried playing files using a plex CT, and also trying directly from the plex mount point on the node without any luck.
The only way I can get this working is to remove the VFS element (comment out) of the mount command. Once I remove VFS the files play without a problem.
I have tried both beta and production version of rclone, the same issue happens with both.
I don't know if it's a permissions issue for the cache, but everything I try seems to fail. Like I say, I've just mirrored how I had it, so I'm confused why when I try to use VFS cache it just doesn't seem to want to allow remote files to be accessed. Any thoughts?
Thanks for anyone that can help
FYI here's the perms for the cache where a remote 2019 file won't play, but the 2023 local file does:
root@pve:/mnt/ssd/cache/rclone/vfs/Union/Movies# ls -la
total 16
drwx------ 4 plex media 4096 Apr 10 10:30 .
drwx------ 4 plex media 4096 Apr 10 02:31 ..
drwx------ 2 plex media 4096 Apr 10 08:47 'Shazam! (2019)'
drwx------ 2 plex media 4096 Apr 10 02:27 'Shazam! Fury of the Gods (2023)'
Run the command 'rclone version' and share the full output of the command.
rclone v1.63.0-beta.6951.52fbb10b4
- os/version: debian 11.6 (64 bit)
- os/kernel: 6.0.19-edge (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.20.3
- go/linking: static
- go/tags: none
Which cloud storage system are you using? (eg Google Drive)
Google Drive, Local SD Union
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
[Unit]
Description=rclone FUSE mount
Documentation=http://rclone.org/docs/
[Service]
Type=notify
User=plex
Group=media
RestartSec=5
Environment=RCLONE_CONFIG=/home/plex/.config/rclone/rclone.conf
ExecStart=/usr/bin/rclone mount Union: /mnt/plex \
--uid 1000 \
--gid 1000 \
--allow-other \
--log-file /home/plex/rcloneunion.log \
--log-level DEBUG \
--umask 002 \
--cache-dir=/mnt/cache/rclone \
--vfs-cache-mode full \
--vfs-cache-max-size 600G \
--vfs-read-chunk-size 32M \
--vfs-cache-max-age 9999h \
--disable-http2
ExecStop=/bin/fusermount -uz /mnt/plex
ExecStartPost=/usr/bin/rclone rc vfs/refresh recursive=true --url 127.0.0.1:5574 _async=true
Restart=on-failure
[Install]
WantedBy=multi-user.target
The rclone config contents with secrets removed.
[crypt]
type = crypt
remote = gdrive2:mechanimal82/
filename_encryption = standard
password = redacted
password2 = redacted
[gdrive2]
type = drive
client_id = redacted
client_secret = redacted
scope = drive
token = {"access_token":"redacted","expiry":"2023-04-10T10:45:15.767116138+01:00"}
root_folder_id = redacted
[Union]
type = union
upstreams = /mnt/sd/Plex/local crypt::nc
action_policy = epall
A log from the command with the -vv
flag
Sample (can provide more if needed):
2023/04/10 08:45:10 DEBUG : rclone: Version "v1.63.0-beta.6951.52fbb10b4" starting with parameters ["/usr/bin/rclone" "mount" "Union:" "/mnt/plex" "--uid" "1000" "--gid" "1000" "--allow-other" "--dir-cache-time" "9999h" "--log-file" "/home/plex/rcloneunion.log" "--log-level" "DEBUG" "--umask" "002" "--rc" "--rc-addr" "127.0.0.1:5574" "--rc-no-auth" "--cache-dir=/mnt/ssd/cache/rclone" "--vfs-cache-mode" "full" "--vfs-cache-max-size" "600G" "--vfs-fast-fingerprint" "--vfs-read-chunk-size" "32M" "--vfs-cache-max-age" "9999h" "--disable-http2"]
2023/04/10 08:45:10 NOTICE: Serving remote control on http://127.0.0.1:5574/
2023/04/10 08:45:10 DEBUG : Creating backend with remote "Union:"
2023/04/10 08:45:10 DEBUG : Using config file from "/home/plex/.config/rclone/rclone.conf"
2023/04/10 08:45:10 DEBUG : Creating backend with remote "crypt:"
2023/04/10 08:45:10 DEBUG : Creating backend with remote "/mnt/sd/Plex/local"
2023/04/10 08:45:10 DEBUG : Creating backend with remote "gdrive2:mechanimal82/"
2023/04/10 08:45:10 DEBUG : gdrive2: Loaded invalid token from config file - ignoring
2023/04/10 08:45:10 DEBUG : Saving config "token" in section "gdrive2" of the config file
2023/04/10 08:45:10 DEBUG : Keeping previous permissions for config file: -rw-r--r--
2023/04/10 08:45:10 DEBUG : gdrive2: Saved new token in config file
2023/04/10 08:45:10 DEBUG : fs cache: renaming cache item "gdrive2:mechanimal82/" to be canonical "gdrive2:mechanimal82"
2023/04/10 08:45:10 DEBUG : union root '': actionPolicy = *policy.EpAll, createPolicy = *policy.EpMfs, searchPolicy = *policy.FF
2023/04/10 08:45:10 INFO : union root '': poll-interval is not supported by this remote
2023/04/10 08:45:10 DEBUG : vfs cache: root is "/mnt/sd/cache/rclone"
2023/04/10 08:45:10 DEBUG : vfs cache: data root is "/mnt/sd/cache/rclone/vfs/Union"
2023/04/10 08:45:10 DEBUG : vfs cache: metadata root is "/mnt/sd/cache/rclone/vfsMeta/Union"
2023/04/10 08:45:10 DEBUG : Creating backend with remote "/mnt/sd/cache/rclone/vfs/Union/"
2023/04/10 08:45:10 DEBUG : fs cache: renaming cache item "/mnt/sd/cache/rclone/vfs/Union/" to be canonical "/mnt/ssd/cache/rclone/vfs/Union"
2023/04/10 08:45:10 DEBUG : Creating backend with remote "/mnt/sd/cache/rclone/vfsMeta/Union/"
2023/04/10 08:45:10 DEBUG : fs cache: renaming cache item "/mnt/sd/cache/rclone/vfsMeta/Union/" to be canonical "/mnt/ssd/cache/rclone/vfsMeta/Union"
2023/04/10 08:45:10 DEBUG : union root '': Mounting on "/mnt/plex"
2023/04/10 08:45:10 DEBUG : : Root:
2023/04/10 08:45:10 DEBUG : : >Root: node=/, err=<nil>
2023/04/10 08:45:11 DEBUG : rc: "vfs/refresh": with parameters map[_async:true recursive:true]
2023/04/10 08:45:11 DEBUG : rc: "vfs/refresh": reply map[jobid:1]: <nil>
2023/04/10 08:45:11 DEBUG : : Reading directory tree
2023/04/10 08:45:12 DEBUG : Google drive root 'mechanimal82': Disabling ListR to work around bug in drive as multi listing (5) returned no entries
2023/04/10 08:45:12 DEBUG : Google drive root 'mechanimal82': Recycled 5 entries
2023/04/10 08:45:13 DEBUG : Google drive root 'mechanimal82': Re-enabling ListR as previous detection was in error
2023/04/10 08:45:47 DEBUG : /: Attr:
2023/04/10 08:45:47 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2023/04/10 08:45:58 DEBUG : /: Lookup: name="Movies"
2023/04/10 08:45:58 DEBUG : /: >Lookup: node=Movies/, err=<nil>
2023/04/10 08:45:58 DEBUG : Movies/: Attr:
2023/04/10 08:45:58 DEBUG : Movies/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2023/04/10 08:45:58 DEBUG : Movies/: Lookup: name=".grab"
2023/04/10 08:46:11 DEBUG : /: Lookup: name="Movies"
2023/04/10 08:46:15 DEBUG : Movies/: >Lookup: node=<nil>, err=no such file or directory
2023/04/10 08:46:15 DEBUG : /: >Lookup: node=Movies/, err=<nil>
2023/04/10 08:46:15 DEBUG : Movies/: Attr:
2023/04/10 08:46:15 DEBUG : Movies/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2023/04/10 08:46:15 DEBUG : Movies/: Lookup: name=".grab"
2023/04/10 08:46:15 DEBUG : Movies/: >Lookup: node=<nil>, err=no such file or directory
2023/04/10 08:46:29 DEBUG : /: Lookup: name="Movies"
2023/04/10 08:46:29 DEBUG : /: >Lookup: node=Movies/, err=<nil>
2023/04/10 08:46:29 DEBUG : Movies/: Attr:
2023/04/10 08:46:29 DEBUG : Movies/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2023/04/10 08:46:29 DEBUG : Movies/: Lookup: name="Shazam! Fury of the Gods (2023)"
2023/04/10 08:46:29 DEBUG : Movies/: >Lookup: node=Movies/Shazam! Fury of the Gods (2023)/, err=<nil>
2023/04/10 08:46:29 DEBUG : Movies/Shazam! Fury of the Gods (2023)/: Attr:
2023/04/10 08:46:29 DEBUG : Movies/Shazam! Fury of the Gods (2023)/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2023/04/10 08:46:29 DEBUG : Movies/Shazam! Fury of the Gods (2023)/: Lookup: name="Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv"
2023/04/10 08:46:30 DEBUG : Movies/Shazam! Fury of the Gods (2023)/: >Lookup: node=Movies/Shazam! Fury of the Gods (2023)/Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv, err=<nil>
2023/04/10 08:46:30 DEBUG : Movies/Shazam! Fury of the Gods (2023)/Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv: Attr:
2023/04/10 08:46:30 DEBUG : Movies/Shazam! Fury of the Gods (2023)/Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv: >Attr: a=valid=1s ino=0 size=3490086494 mode=-rw-rw-r--, err=<nil>
2023/04/10 08:47:03 DEBUG : Movies/: Lookup: name="Shazam! Fury of the Gods (2023)"
2023/04/10 08:47:03 DEBUG : Movies/: >Lookup: node=Movies/Shazam! Fury of the Gods (2023)/, err=<nil>
2023/04/10 08:47:03 DEBUG : Movies/Shazam! Fury of the Gods (2023)/: Attr:
2023/04/10 08:47:03 DEBUG : Movies/Shazam! Fury of the Gods (2023)/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2023/04/10 08:47:03 DEBUG : Movies/Shazam! Fury of the Gods (2023)/: Lookup: name="Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv"
2023/04/10 08:47:03 DEBUG : Movies/Shazam! Fury of the Gods (2023)/: >Lookup: node=Movies/Shazam! Fury of the Gods (2023)/Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv, err=<nil>
2023/04/10 08:47:03 DEBUG : Movies/Shazam! Fury of the Gods (2023)/Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv: Attr:
2023/04/10 08:47:03 DEBUG : Movies/Shazam! Fury of the Gods (2023)/Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv: >Attr: a=valid=1s ino=0 size=3490086494 mode=-rw-rw-r--, err=<nil>
2023/04/10 08:47:03 DEBUG : Movies/Shazam! Fury of the Gods (2023)/Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv: Open: flags=OpenReadOnly
2023/04/10 08:47:03 DEBUG : Movies/Shazam! Fury of the Gods (2023)/Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv: Open: flags=O_RDONLY
2023/04/10 08:47:03 DEBUG : Movies/Shazam! Fury of the Gods (2023)/Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv: newRWFileHandle:
2023/04/10 08:47:03 DEBUG : Movies/Shazam! Fury of the Gods (2023)/Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv: >newRWFileHandle: err=<nil>
2023/04/10 08:47:03 DEBUG : Movies/Shazam! Fury of the Gods (2023)/Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv: >Open: fd=Movies/Shazam! Fury of the Gods (2023)/Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv (rw), err=<nil>
2023/04/10 08:47:03 DEBUG : Movies/Shazam! Fury of the Gods (2023)/Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv: >Open: fh=&{Movies/Shazam! Fury of the Gods (2023)/Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv (rw)}, err=<nil>
2023/04/10 08:47:03 DEBUG : &{Movies/Shazam! Fury of the Gods (2023)/Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv (rw)}: Read: len=65536, offset=0
2023/04/10 08:47:03 DEBUG : Movies/Shazam! Fury of the Gods (2023)/Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv(0xc0095078c0): _readAt: size=65536, off=0
2023/04/10 08:47:03 DEBUG : Movies/Shazam! Fury of the Gods (2023)/Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv(0xc0095078c0): openPending:
2023/04/10 08:47:03 DEBUG : Movies/Shazam! Fury of the Gods (2023)/Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv: vfs cache: checking remote fingerprint "3490086494,2023-06-15 00:00:00 +0000 UTC" against cached fingerprint "3490086494,2023-06-15 00:00:00 +0000 UTC"
2023/04/10 08:47:03 DEBUG : Movies/Shazam! Fury of the Gods (2023)/Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv: vfs cache: truncate to size=3490086494 (not needed as size correct)
2023/04/10 08:47:03 DEBUG : Movies/Shazam! Fury of the Gods (2023): Added virtual directory entry vAddFile: "Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv"
2023/04/10 08:47:03 DEBUG : Movies/Shazam! Fury of the Gods (2023)/Shazam! Fury of the Gods (2023) [imdb-tt10151854][WEBDL-2160p][HDR][10bit][x265][EAC3 Atmos 5.1]-MarkII.mkv(0xc0095078c0): >openPending: err=<nil>
2023/04/10 08:47:03 DEBUG : vfs cache: looking for range={Pos:0 Size:65536} in [{Pos:0 Size:89120768} {Pos:3489918976 Size:167518}] - present true