Switching from Plexdrive to Rclone Cache - broken Mount

I had to double check so I tested it by staggering the launch:

Using rclone v1.40-047-g92cfb57fβ

Started rclone FUSE mount.
2018/04/06 20:51:20 NOTICE: Serving remote control on http://127.0.0.1:5572/
2018/04/06 20:51:21 ERROR : plex: websocket.Dial ws://127.0.0.1:32400/:/websockets/notifications?X-Plex-Token=: dial tcp 127.0.0.1:32400: connect: connection refused
2018/04/06 20:51:21 INFO  : media-cached: Cache DB path: /home/plex/.cache/rclone/cache-backend/media-cached.db
2018/04/06 20:51:21 INFO  : media-cached: Cache chunk path: /home/plex/.cache/rclone/cache-backend/media-cached
2018/04/06 20:51:21 INFO  : media-cached: Chunk Memory: true
2018/04/06 20:51:21 INFO  : media-cached: Chunk Size: 24M
2018/04/06 20:51:21 INFO  : media-cached: Chunk Total Size: 64G
2018/04/06 20:51:21 INFO  : media-cached: Chunk Clean Interval: 1m0s
2018/04/06 20:51:21 INFO  : media-cached: Workers: 8
2018/04/06 20:51:21 INFO  : media-cached: File Age: 672h0m0s
2018/04/06 20:51:21 INFO  : media-cached: Upload Temp Rest Time: 10m0s
2018/04/06 20:51:21 INFO  : media-cached: Upload Temp FS: /home/plex/.cache/rclone/cache-upload
2018/04/06 20:51:21 ERROR : plex: websocket.Dial ws://127.0.0.1:32400/:/websockets/notifications?X-Plex-Token=: dial tcp 127.0.0.1:32400: connect: connection refused
2018/04/06 20:51:21 INFO  : media-cached: Cache DB path: /home/plex/.cache/rclone/cache-backend/media-cached.db
2018/04/06 20:51:21 INFO  : media-cached: Cache chunk path: /home/plex/.cache/rclone/cache-backend/media-cached
2018/04/06 20:51:21 INFO  : media-cached: Chunk Memory: true
2018/04/06 20:51:21 INFO  : media-cached: Chunk Size: 24M
2018/04/06 20:51:21 INFO  : media-cached: Chunk Total Size: 64G
2018/04/06 20:51:21 INFO  : media-cached: Chunk Clean Interval: 1m0s
2018/04/06 20:51:21 INFO  : media-cached: Workers: 8
2018/04/06 20:51:21 INFO  : media-cached: File Age: 672h0m0s
2018/04/06 20:51:21 INFO  : media-cached: Upload Temp Rest Time: 10m0s
2018/04/06 20:51:21 INFO  : media-cached: Upload Temp FS: /home/plex/.cache/rclone/cache-upload
2018/04/06 20:51:22 INFO  : Encrypted drive 'media:': Modify window is 1ms
2018/04/06 20:53:31 INFO  : media-cached: Connected to Plex server: http://127.0.0.1:32400
2018/04/06 20:53:49 INFO  : dggdoar82340bl4k78kghr954c/3hvl7p5b1q28pv5dashfjqh040/p82rchsph95gb3n96oc2semjeimeugftsth18iio19h35igsv2igr8m28ub5n93afko5fa1lsdpri: confirmed reading by external reader

OK if I add --syslog and --log-level INFO to my systemd (copied from your systemd)

Then where do I find the log file?

If you use syslog, it’ll go to /var/log/syslog or maybe /var/log/messages depending on your OS.

You can always just use a preferred log file location.

Perfect, thanks.

I’ll send them to a new location

I just use a simple rsyslog config:

[felix@gemini rsyslog.d]$ cat 30-rclone.conf
# Example: Log mail server control messages to mail-queue.log
if $programname == ‘rclone’
then /var/log/rclone.log
& stop

Great. Thanks for that and all the other help.
Cheers

Hey all, I’ve been following this post and the one @Animosity022 posted on converting from plexdrive. So just to confirm, I only need the one mount point then? I’m just used to encrypted and decrypted mounts with plexdrive. I “think” it’s working, but how do I tell? I have logging set to INFO, but don’t see anything related to cache items in the logs. I also don’t see anything in the upload temp FS directory. Any help is appreciated.

What was decided on Chunk size? 5MB, 8, or 10MB?

I did see gcache connect to plex and now the token in populated in my .rclone.conf file.

last I get an error in the log, but it’s still working?

2018/04/07 17:03:59 mount helper error: fusermount: failed to open /etc/mtab: Permission denied

Log File below

2018/04/07 17:03:57 NOTICE: Serving remote control on http://localhost:5572/
2018/04/07 17:03:58 INFO : gcache: Cache DB path: /home/plex/.cache/rclone/cache-backend/gcache.db
2018/04/07 17:03:58 INFO : gcache: Cache chunk path: /home/plex/.cache/rclone/cache-backend/gcache
2018/04/07 17:03:58 INFO : gcache: Chunk Memory: true
2018/04/07 17:03:58 INFO : gcache: Chunk Size: 5M
2018/04/07 17:03:58 INFO : gcache: Chunk Total Size: 32G
2018/04/07 17:03:58 INFO : gcache: Chunk Clean Interval: 1m0s
2018/04/07 17:03:58 INFO : gcache: Workers: 8
2018/04/07 17:03:58 INFO : gcache: File Age: 168h0m0s
2018/04/07 17:03:58 INFO : gcache: Upload Temp Rest Time: 1h0m0s
2018/04/07 17:03:58 INFO : gcache: Upload Temp FS: /home/plex/rclone-cache
2018/04/07 17:03:58 INFO : gcache: Cache DB path: /home/plex/.cache/rclone/cache-backend/gcache.db
2018/04/07 17:03:58 INFO : gcache: Cache chunk path: /home/plex/.cache/rclone/cache-backend/gcache
2018/04/07 17:03:58 INFO : gcache: Chunk Memory: true
2018/04/07 17:03:58 INFO : gcache: Chunk Size: 5M
2018/04/07 17:03:58 INFO : gcache: Chunk Total Size: 32G
2018/04/07 17:03:58 INFO : gcache: Chunk Clean Interval: 1m0s
2018/04/07 17:03:58 INFO : gcache: Workers: 8
2018/04/07 17:03:58 INFO : gcache: File Age: 168h0m0s
2018/04/07 17:03:58 INFO : gcache: Upload Temp Rest Time: 1h0m0s
2018/04/07 17:03:58 INFO : gcache: Upload Temp FS: /home/plex/rclone-cache
2018/04/07 17:03:59 INFO : Encrypted drive ‘gmedia:’: Modify window is 1ms
2018/04/07 17:03:59 mount helper error: fusermount: failed to open /etc/mtab: Permission denied
2018/04/07 17:04:32 INFO : gcache: Connected to Plex server: http://127.0.0.1:32400

What’s your actual mount command you are using?

I’ve noticed no real different in chunk size during playback. I’ve toyed around with 5/10/15/20/25 and going too big seems to make a slower start. There was another post saying 1M was faster for scanning, but I haven’t tried that myself.

I’ve stuck at 5M for now and we’ll see as for me, it made sense to go a little smaller and see if that overall helps with starting.

Let me know if this looks correct.

rclone v1.40

  • os/arch: linux/amd64
  • go version: go1.10

+++.rclone.conf file

[gdrive]
type = drive
client_id = xxxx
client_secret = xxxx

[gcache]
type = cache
remote = gdrive:/encrypted
plex_url = http://127.0.0.1:32400
plex_username = xxxx
plex_password = xxxx
chunk_total_size = 32G
plex_token =

[gmedia]
type = crypt
remote = gcache:
filename_encryption = standard
password = xxxx
password2 = xxxx
directory_name_encryption = true

++Mount

#!/bin/bash
rclone mount
–config /home/plex/.rclone.conf
–dir-cache-time=160h
–cache-chunk-size=5M
–cache-info-age=168h
–cache-workers=8
–buffer-size=0M
–cache-tmp-upload-path /home/plex/rclone-cache
–cache-tmp-wait-time 60m
–attr-timeout=1s
–allow-non-empty
–allow-other
–rc
–log-level INFO
–log-file=/home/plex/log/rclonemount-gdrive.log
gmedia: /home/plex/gmedia &
exit

That looks good!

:slight_smile:

@Animosity022 appreciate the help. One last question and I believe I’m all configured. I was attempting to move this into systemd for autostart. What value do I utilize for unit portion as it relates to my plex startup script? Is it the name of the actual script?

My startup script for plex is plexmediaserver.service so is the value below correct?

I notice if plex is down and I manually start rclone it doesn’t appear to check this value…Is it only upon reboot?

[Unit]
Description=RClone Service
AssertPathIsDirectory=/home/plex
After=plexmediaserver.target network-online.target
Wants=network-online.target