Plex Gdrive using union mount

I’m really glad you’re helping. Unfortunately adding export didn’t work either. Still getting the same

The.Lord.Of.The.Rings.The.Fellowship.Of.The.Ring.2001.1080p.BluRay.h.265.HEVC-SiNNERS/The Lord of the Rings The Fellowship of the Ring (2001) - Bluray-720p CtrlHD.mkv.partial~: WriteFileHandle.Flush error: write /tmp/rclone-spool419779146/Lord of the Rings The Fellowship of the Ring, The (2001) -

I’m also getting another new error now, but I don’t know if they are related

2018/10/02 10:08:22 ERROR : Bull (2016)/Season 3/Bull.(2016).S03E02.Jury.Duty.HDTV-720p.KILLERS.mkv.partial~: Dir.Rename error: Fs “union root ‘’” can’t rename files (no server side Move or Copy)

that should work. You need to run that in the same shell you run the rclone mount in. Also you’ll probably want a leading / so export XDG_CACHE_HOME=/mnt/user/tmp

That is a different issue. The Union mount needs to implement the optional Methods Move, Copy, DirMove etc. It might be better to embed the fs for this…

Can you please make a new issue on github about this - it should be straight forward to fix.

Unfortunately the leading / didn’t fix it. Rclone just doesn’t use the new folder as the cache, but keeps the old one.
My script looks like this:

mkdir -p /mnt/user/tmp/rclone

export XDG_CACHE_HOME=/mnt/user/tmp/rclone

mkdir -p /mnt/disks/moviesunion
rclone mount
–allow-other
–allow-non-empty
–vfs-cache-max-age 24h
–vfs-read-chunk-size 32M
–vfs-read-chunk-size-limit 1G
–buffer-size 1G
–log-level INFO
moviesunion: /mnt/disks/moviesunion &

It doesn’t really show any errors when playing an item, that’s located in the cloud, but it doesn’t play.
Trying to write into the folder gives this error (which is caused by the use of /tmp/ ):

2018/10/02 11:40:40 ERROR : The Legend of Tarzan (2016)/The Legend of Tarzan (2016) - Bluray-1080p SPARKS.mkv.partial~: WriteFileHandle.New Rcat failed: write /tmp/rclone-spool849075579/The Legend of Tarzan (2016)/The Legend of Tarzan (2016) - Bluray-1080p SPARKS.mkv.partial~: no space left on device

An update:

I tried a hacky solution, by running a script on startup that deletes the mandatory cache folder, and afterwards symlinking it to another folder with more capacity. That fixed the transfer issues.

And then I mounted the union on a SMB share on windows, and tried to play a remote file through there, and it worked! Now it’s only plex who doesn’t play along. Plex still only plays the local files.

Does that somehow get us any further?

Ah, should have spotted that earlier… That is Rcat buffering the files in /tmp not the cache backend. So either set the TMPDIR environment variable or use --vfs-cache-mode writes and --cache-dir to say where you want the writes to go.

Does this mean without the writes cache-mode, it will still use /tmp/ even if cache-dir is specified because of the earlier mentioned bug?

Plex & Rclone Info logs?

Wow that moved the tmp folder, good job! And it almost works as well. It worked to the point where I ran into the error, that has to be fixed, and that I made an issue for on github. Is there a possible workaround until it’s fixed? (I mean, I can just upload to a crypt mount instead for now)

2018/10/02 19:24:49 INFO : The Legend of Tarzan (2016)/The Legend of Tarzan (2016) - Bluray-1080p Radarr.mkv.partial~: Copied (new)
2018/10/02 19:24:49 ERROR : The Legend of Tarzan (2016)/The Legend of Tarzan (2016) - Bluray-1080p Radarr.mkv.partial~: Dir.Rename error: Fs “union root ‘’” can’t rename files (no server side Move or Copy)
2018/10/02 19:24:49 ERROR : The Legend of Tarzan (2016)/The Legend of Tarzan (2016) - Bluray-1080p Radarr.mkv.partial~: Dir.Rename error: Fs “union root ‘’” can’t rename files (no server side Move or Copy)

It also posts this every time I run the script, even though I haven’t set a poll-interval

2018/10/02 19:45:32 INFO : union root ‘’: poll-interval is not supported by this remote

The playback works from changing that one command (I think there’s some issue with some subtitles, but I can figure that out myself). My God you’ve been helpful, thank you so much.

Yes it will still use /tmp but it is a different problem - namely the Rcat operation needing to make a temporary file.

Maybe Rcat should be storing it’s data somewhere else, I don’t know!

Great!

On the issue https://github.com/ncw/rclone/issues/2619 I posted a beta (which is really there now!) which should fix the problem.

That is normal - mount attempts to set up a poll-interval at the default 1m rate.

Perfect! I will help you fix the issue on Github.