Plex Gdrive using union mount

Hi. I’m trying to setup union mounts to combine a local collection of files, and a remote on Gdrive.
However I have tried everything, and I’m about to pull my hair out.
The union mount works, and plex is able to pick it up. However Plex can only play the local files. If I try to play files hosted on gdrive it just doesn’t play.
I will put my config and mount script here, I hope someone can see what’s wrong.

Rclone config:

[gdrive]
type = drive
scope = drive
token = {“access_token”:“XXXXXX”}

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

[moviesunion]
type = union
remotes = crypt:movies mnt/user/Movies

[showsunion]
type = union
remotes = crypt:shows mnt/user/Series

Script:

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

mkdir -p /mnt/disks/showsunion
rclone mount
–allow-other
–allow-non-empty
–dir-cache-time 24h
–vfs-cache-max-age 48h
–vfs-read-chunk-size 20M
–vfs-read-chunk-size-limit 1G
–buffer-size 0M
–rc
–log-level INFO
showsunion: /mnt/disks/showsunion &

I don’t see anything obviously wrong with your config…

So Plex can see all the files, but it can only play the local ones - is that right?

Can you see what errors you get in the rclone log when you try to play a remote file? The union backend is a new feature so may have bugs in still!

Can you also try using a non-zero buffer size?

I missed that - yes that could cause the problems…

I want to use Union as well, but I cannot select Union as a backend.

I’m running v1.43.1. Is there anything particular I should do to make this available?

Yes that is correct!

I’ve changed the buffer, so my new script now looks like this (same Rclone config)

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 64M
–log-level DEBUG
moviesunion: /mnt/disks/moviesunion &

mkdir -p /mnt/disks/showsunion
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 64M
–log-level DEBUG
showsunion: /mnt/disks/showsunion &

This is the DEBUG log from where I started the file in Plex

2018/10/01 17:15:37 DEBUG : : Statfs:
2018/10/01 17:15:37 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2018/10/01 17:15:37 DEBUG : : Statfs:
2018/10/01 17:15:37 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2018/10/01 17:15:37 DEBUG : : Statfs:
2018/10/01 17:15:37 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2018/10/01 17:15:37 DEBUG : : Statfs:
2018/10/01 17:15:37 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2018/10/01 17:15:37 DEBUG : /: Lookup: name=“Bancroft”
2018/10/01 17:15:37 DEBUG : /: >Lookup: node=, err=no such file or directory
2018/10/01 17:15:37 DEBUG : : Statfs:
2018/10/01 17:15:37 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2018/10/01 17:15:37 DEBUG : : Statfs:
2018/10/01 17:15:37 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2018/10/01 17:15:37 DEBUG : : Statfs:
2018/10/01 17:15:37 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2018/10/01 17:15:37 DEBUG : : Statfs:
2018/10/01 17:15:37 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2018/10/01 17:15:37 DEBUG : /: Lookup: name=“New Amsterdam (2018)”
2018/10/01 17:15:37 DEBUG : /: >Lookup: node=, err=no such file or directory
2018/10/01 17:15:37 DEBUG : : Statfs:
2018/10/01 17:15:37 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2018/10/01 17:15:37 DEBUG : : Statfs:
2018/10/01 17:15:37 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2018/10/01 17:15:37 DEBUG : : Statfs:
2018/10/01 17:15:37 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2018/10/01 17:15:37 DEBUG : : Statfs:
2018/10/01 17:15:37 DEBUG : : >Statfs: stat={Blocks:274877906944 Bfree:274877906944 Bavail:274877906944 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=

There’s a lot more errors in the DEBUG log. They all look pretty much the same, like this:

2018/10/01 17:16:58 DEBUG : iZombie/Season 4/: Lookup: name=“iZombie.S04E09.Mac-Liv-Moore.WEBDL-720p.bamboozle.en.srt”
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/: >Lookup: node=iZombie/Season 4/iZombie.S04E09.Mac-Liv-Moore.WEBDL-720p.bamboozle.en.srt, err=
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/iZombie.S04E09.Mac-Liv-Moore.WEBDL-720p.bamboozle.en.srt: Attr:
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/iZombie.S04E09.Mac-Liv-Moore.WEBDL-720p.bamboozle.en.srt: >Attr: a=valid=1s ino=0 size=52525 mode=-rw-rw-rw-, err=
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/: Lookup: name=“iZombie.S04E09.Mac-Liv-Moore.WEBDL-720p.bamboozle.mkv”
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/: >Lookup: node=iZombie/Season 4/iZombie.S04E09.Mac-Liv-Moore.WEBDL-720p.bamboozle.mkv, err=
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/iZombie.S04E09.Mac-Liv-Moore.WEBDL-720p.bamboozle.mkv: Attr:
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/iZombie.S04E09.Mac-Liv-Moore.WEBDL-720p.bamboozle.mkv: >Attr: a=valid=1s ino=0 size=1111225158 mode=-rw-rw-rw-, err=
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/: Lookup: name=“iZombie.S04E10.Yipee.Ki.Brain,.Motherscratcher.WEBDL-720p.BAMBOOZLE.en.srt”
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/: >Lookup: node=iZombie/Season 4/iZombie.S04E10.Yipee.Ki.Brain,.Motherscratcher.WEBDL-720p.BAMBOOZLE.en.srt, err=
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/iZombie.S04E10.Yipee.Ki.Brain,.Motherscratcher.WEBDL-720p.BAMBOOZLE.en.srt: Attr:
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/iZombie.S04E10.Yipee.Ki.Brain,.Motherscratcher.WEBDL-720p.BAMBOOZLE.en.srt: >Attr: a=valid=1s ino=0 size=50592 mode=-rw-rw-rw-, err=
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/: Lookup: name=“iZombie.S04E10.Yipee.Ki.Brain,.Motherscratcher.WEBDL-720p.BAMBOOZLE.mkv”
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/: >Lookup: node=iZombie/Season 4/iZombie.S04E10.Yipee.Ki.Brain,.Motherscratcher.WEBDL-720p.BAMBOOZLE.mkv, err=
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/iZombie.S04E10.Yipee.Ki.Brain,.Motherscratcher.WEBDL-720p.BAMBOOZLE.mkv: Attr:
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/iZombie.S04E10.Yipee.Ki.Brain,.Motherscratcher.WEBDL-720p.BAMBOOZLE.mkv: >Attr: a=valid=1s ino=0 size=1112846087 mode=-rw-rw-rw-, err=
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/: Lookup: name=“iZombie.S04E11.Insane.in.the.Germ.Brain.WEBDL-720p.bamboozle.en.srt”
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/: >Lookup: node=iZombie/Season 4/iZombie.S04E11.Insane.in.the.Germ.Brain.WEBDL-720p.bamboozle.en.srt, err=
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/iZombie.S04E11.Insane.in.the.Germ.Brain.WEBDL-720p.bamboozle.en.srt: Attr:
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/iZombie.S04E11.Insane.in.the.Germ.Brain.WEBDL-720p.bamboozle.en.srt: >Attr: a=valid=1s ino=0 size=48108 mode=-rw-rw-rw-, err=
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/: Lookup: name=“iZombie.S04E11.Insane.in.the.Germ.Brain.WEBDL-720p.bamboozle.mkv”
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/: >Lookup: node=iZombie/Season 4/iZombie.S04E11.Insane.in.the.Germ.Brain.WEBDL-720p.bamboozle.mkv, err=
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/iZombie.S04E11.Insane.in.the.Germ.Brain.WEBDL-720p.bamboozle.mkv: Attr:
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/iZombie.S04E11.Insane.in.the.Germ.Brain.WEBDL-720p.bamboozle.mkv: >Attr: a=valid=1s ino=0 size=1113293435 mode=-rw-rw-rw-, err=
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/: Lookup: name=“iZombie.S04E12.You’ve.Got.to.Hide.Your.Liv.Away.WEBDL-720p.bamboozle.en.srt”
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/: >Lookup: node=iZombie/Season 4/iZombie.S04E12.You’ve.Got.to.Hide.Your.Liv.Away.WEBDL-720p.bamboozle.en.srt, err=
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/iZombie.S04E12.You’ve.Got.to.Hide.Your.Liv.Away.WEBDL-720p.bamboozle.en.srt: Attr:
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/iZombie.S04E12.You’ve.Got.to.Hide.Your.Liv.Away.WEBDL-720p.bamboozle.en.srt: >Attr: a=valid=1s ino=0 size=48225 mode=-rw-rw-rw-, err=
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/: Lookup: name=“iZombie.S04E12.You’ve.Got.to.Hide.Your.Liv.Away.WEBDL-720p.bamboozle.mkv”
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/: >Lookup: node=iZombie/Season 4/iZombie.S04E12.You’ve.Got.to.Hide.Your.Liv.Away.WEBDL-720p.bamboozle.mkv, err=
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/iZombie.S04E12.You’ve.Got.to.Hide.Your.Liv.Away.WEBDL-720p.bamboozle.mkv: Attr:
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/iZombie.S04E12.You’ve.Got.to.Hide.Your.Liv.Away.WEBDL-720p.bamboozle.mkv: >Attr: a=valid=1s ino=0 size=1111943409 mode=-rw-rw-rw-, err=
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/: Lookup: name=“iZombie.S04E13.And.He.Shall.Be.a.Good.Man.WEBDL-720p.bamboozle.en.srt”
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/: >Lookup: node=iZombie/Season 4/iZombie.S04E13.And.He.Shall.Be.a.Good.Man.WEBDL-720p.bamboozle.en.srt, err=
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/iZombie.S04E13.And.He.Shall.Be.a.Good.Man.WEBDL-720p.bamboozle.en.srt: Attr:
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/iZombie.S04E13.And.He.Shall.Be.a.Good.Man.WEBDL-720p.bamboozle.en.srt: >Attr: a=valid=1s ino=0 size=48524 mode=-rw-rw-rw-, err=
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/: Lookup: name=“iZombie.S04E13.And.He.Shall.Be.a.Good.Man.WEBDL-720p.bamboozle.mkv”
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/: >Lookup: node=iZombie/Season 4/iZombie.S04E13.And.He.Shall.Be.a.Good.Man.WEBDL-720p.bamboozle.mkv, err=
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/iZombie.S04E13.And.He.Shall.Be.a.Good.Man.WEBDL-720p.bamboozle.mkv: Attr:
2018/10/01 17:16:58 DEBUG : iZombie/Season 4/iZombie.S04E13.And.He.Shall.Be.a.Good.Man.WEBDL-720p.bamboozle.mkv: >Attr: a=valid=1s ino=0 size=1112447893 mode=-rw-rw-rw-, err=

Something is definitely wrong!
I’ve pasted the rest of the DEBUG log (from launch of my server) to pastebin. It looks like it begins throwing the errors when plex is started (the service, not the playback): https://pastebin.com/NBUHnKE0

None of this seems to be an actual error.

Can you increase the buffer-size to something like 512M or 1G (if you have the memory) and get the log after removing the debug log level?

Can you also post the plex logs from when it starts playback?.

Thanks for helping me out! It still doesn’t work with the changing of the buffer.
Also for some reason I now can’t write to the mount (Radarr tried writing ant-man to the mount), but let’s do one issue at a time.

The script is now this:

#!/bin/bash

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 &

mkdir -p /mnt/disks/showsunion
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
showsunion: /mnt/disks/showsunion &

Log from the script (INFO level)

Script Starting Mon, 01 Oct 2018 18:51:51 +0200

Full logs for this script are available at /tmp/user.scripts/tmpScripts/Union/log.txt

Script Finished Mon, 01 Oct 2018 18:51:51 +0200

Full logs for this script are available at /tmp/user.scripts/tmpScripts/Union/log.txt

2018/10/01 18:51:53 INFO : union root ‘’: poll-interval is not supported by this remote
2018/10/01 18:51:53 INFO : union root ‘’: poll-interval is not supported by this remote
2018/10/01 18:58:23 NOTICE: Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: Removing partially written file on error: write /tmp/rclone-spool763339868/Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: no space left on device
2018/10/01 18:58:24 ERROR : Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: WriteFileHandle.New Rcat failed: write /tmp/rclone-spool763339868/Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: no space left on device
2018/10/01 18:58:24 ERROR : Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: WriteFileHandle.Write error: io: read/write on closed pipe
2018/10/01 18:58:24 ERROR : Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: WriteFileHandle.Flush error: write /tmp/rclone-spool763339868/Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: no space left on device
2018/10/01 19:00:32 NOTICE: Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: Removing partially written file on error: write /tmp/rclone-spool326675979/Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: no space left on device
2018/10/01 19:00:32 ERROR : Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: WriteFileHandle.New Rcat failed: write /tmp/rclone-spool326675979/Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: no space left on device
2018/10/01 19:00:32 ERROR : Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: WriteFileHandle.Write error: io: read/write on closed pipe
2018/10/01 19:00:32 ERROR : Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: WriteFileHandle.Flush error: write /tmp/rclone-spool326675979/Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: no space left on device
2018/10/01 19:02:07 NOTICE: Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: Removing partially written file on error: write /tmp/rclone-spool142807022/Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: no space left on device
2018/10/01 19:02:07 ERROR : Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: WriteFileHandle.New Rcat failed: write /tmp/rclone-spool142807022/Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: no space left on device
2018/10/01 19:02:07 ERROR : Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: WriteFileHandle.Write error: io: read/write on closed pipe
2018/10/01 19:02:07 ERROR : Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: WriteFileHandle.Flush error: write /tmp/rclone-spool142807022/Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: no space left on device
2018/10/01 19:04:13 NOTICE: Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: Removing partially written file on error: write /tmp/rclone-spool115736181/Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: no space left on device
2018/10/01 19:04:13 ERROR : Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: WriteFileHandle.New Rcat failed: write /tmp/rclone-spool115736181/Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: no space left on device
2018/10/01 19:04:13 ERROR : Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: WriteFileHandle.Write error: io: read/write on closed pipe
2018/10/01 19:04:13 ERROR : Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: WriteFileHandle.Flush error: write /tmp/rclone-spool115736181/Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: no space left on device
2018/10/01 19:05:47 NOTICE: Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: Removing partially written file on error: write /tmp/rclone-spool526022992/Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: no space left on device
2018/10/01 19:05:47 ERROR : Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: WriteFileHandle.New Rcat failed: write /tmp/rclone-spool526022992/Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: no space left on device
2018/10/01 19:05:47 ERROR : Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: WriteFileHandle.Write error: io: read/write on closed pipe
2018/10/01 19:05:47 ERROR : Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: WriteFileHandle.Flush error: write /tmp/rclone-spool526022992/Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: no space left on device
2018/10/01 19:07:14 NOTICE: Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: Removing partially written file on error: write /tmp/rclone-spool646266479/Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: no space left on device
2018/10/01 19:07:14 ERROR : Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: WriteFileHandle.New Rcat failed: write /tmp/rclone-spool646266479/Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: no space left on device
2018/10/01 19:07:14 ERROR : Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: WriteFileHandle.Write error: io: read/write on closed pipe
2018/10/01 19:07:14 ERROR : Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: WriteFileHandle.Flush error: write /tmp/rclone-spool646266479/Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: no space left on device

Plex-log after starting playback:
https://pastebin.com/NkK0da14

This looks like a simple issue. Can you try changing the cache-dir to some other directory? Its probably picking /tmp by default which doesn’t have sufficient space.

That would be amazing if it worked. Do I just do

mkdir -p /mnt/disks/moviesunion
rclone mount
–allow-other
–allow-non-empty
*> --cache-dir /mnt/disks/rclonetmp *
–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 &

Because doing that didn’t seem to change the cache folder. Am I doing it wrong?

Yeah, that should be it actually. Does the folder exist and are the permissions ok?

Yeah it should be right. However using the option doesn’t change anything. It still shows the old temp folder

2018/10/01 21:41:51 ERROR : Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: WriteFileHandle.New Rcat failed: write /tmp/rclone-spool322899173/Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: no space left on device

Maybe it’s some other option when using vfs?

No, shouldn’t be. I am using the same option and its working fine for me.

Can you make sure the same option is not present in rclone.conf? Also, try launching with the debug output and paste the initial lines. Perhaps they will give some hints.

Well the rclone config hasn’t changed, so it still looks like this

[gdrive]
type = drive
scope = drive
token = {“access_token”:“XXXXXX”}

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

[moviesunion]
type = union
remotes = crypt:movies mnt/user/Movies

[showsunion]
type = union
remotes = crypt:shows mnt/user/Series

This is the start of the debug, it looks fine to me

2018/10/01 22:20:07 DEBUG : rclone: Version “v1.43-119-g59e14c25-beta” starting with parameters [“rcloneorig” “–config” “/boot/config/plugins/rclone-beta/.rclone.conf” “mount” “–allow-other” “–allow-non-empty” “–cache-dir” “/mnt/user/tmp” “–vfs-cache-max-age” “24h” “–vfs-read-chunk-size” “32M” “–vfs-read-chunk-size-limit” “1G” “–buffer-size” “1G” “–log-level” “DEBUG” “moviesunion:” “/mnt/disks/moviesunion”]
2018/10/01 22:20:07 DEBUG : Using config file from “/boot/config/plugins/rclone-beta/.rclone.conf”
2018/10/01 22:20:09 INFO : union root ‘’: poll-interval is not supported by this remote
2018/10/01 22:20:09 DEBUG : union root ‘’: Mounting on “/mnt/disks/moviesunion”
2018/10/01 22:20:09 INFO : union root ‘’: poll-interval is not supported by this remote
2018/10/01 22:20:09 DEBUG : Adding path “vfs/forget” to remote control registry
2018/10/01 22:20:09 DEBUG : Adding path “vfs/refresh” to remote control registry
2018/10/01 22:20:09 DEBUG : Adding path “vfs/poll-interval” to remote control registry
2018/10/01 22:20:09 DEBUG : : Root:
2018/10/01 22:20:09 DEBUG : : >Root: node=/, err=
2018/10/01 22:21:07 NOTICE: Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: Removing partially written file on error: write /tmp/rclone-spool210980343/Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: no space left on device

I really can’t tell why it keeps to /tmp/rclone, but I’m glad we’ve narrowed the issue down to that. But I have no idea how to change it. Hmmmmm

There looks to be an issue for this: https://github.com/ncw/rclone/issues/2604

Potential fix: Cach-chunk-path ignored when vfs set

Try if this works.

Wow, thank you for finding that!

How would I go about setting XDG_CACHE_HOME?
Is it just add “XDG_CACHE_HOME=/mnt/user/tmp” to the script?

Yeah, that should be it.

Well I could just wait for the bug-fix, since I still can’t write or play anything from the mount.
I’m running unraid so maybe setting XDG_CACHE_HOME is a different command?

My script is now

#!/bin/bash
mkdir -p mnt/user/tmp

XDG_CACHE_HOME=mnt/user/tmp

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

mkdir -p /mnt/disks/showsunion
rclone mount
–allow-other
–cache-db-purge
–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
showsunion: /mnt/disks/showsunion &

The log still shows this, when writing to it:

2018/10/02 07:33:33 ERROR : Ant-Man and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL1080p
FAS.mkv.partial~: WriteFileHandle.New Rcat failed: write /tmp/rclone-spool132999955/AntMan
and the Wasp (2018)/Ant-Man and the Wasp (2018) - WEBDL-1080p FAS.mkv.partial~: no space
left on device

@ncw Any thoughts on how to solve this?

Try this: export XDG_CACHE_HOME=mnt/user/tmp instead of simply assigning to the variable.