Temporary local FS to spool file: how to set the path

hi there,
i’m using

[~] # rclone -V
rclone v1.42
- os/arch: linux/amd64
- go version: go1.11

and i’m trying to copy to mega some files.
I’m having some troubles with my tests, i mounted the partition with this command line

/opt/bin/rclone --config /conf/rclone.conf mount --cache-dir /rclone_cache --dir-cache-time 240m --cache-chunk-size=10M --cache-info-age=168h --cache-workers=5 --cache-tmp-upload-path /rclone_upload --cache-tmp-wait-time 60m --buffer-size 0M --umask 002 --rc --log-level DEBUG mega:/ /mega/ --log-file=/rcloneMega.log

but when i try to copy a file to /mega i get

cp: writing `/mega/test/testFile.big': Input/output error

in my rcloneMega.log i can find:

2018/10/13 15:03:12 DEBUG : test/: Lookup: name=“testFile.big”
2018/10/13 15:03:12 DEBUG : test/: >Lookup: node=, err=no such file or directory
2018/10/13 15:03:12 DEBUG : test/: Lookup: name=“testFile.big”
2018/10/13 15:03:12 DEBUG : test/: >Lookup: node=, err=no such file or directory
2018/10/13 15:03:12 DEBUG : test/: Create: name=“testFile.big”
2018/10/13 15:03:12 DEBUG : test/testFile.big: Open: flags=O_WRONLY|O_CREATE|O_EXCL
2018/10/13 15:03:12 DEBUG : test/testFile.big: >Open: fd=test/testFile.big (w), err=
2018/10/13 15:03:12 DEBUG : test/: >Create: node=test/testFile.big, handle=&{test/testFile.big (w)}, err=
2018/10/13 15:03:12 DEBUG : test/testFile.big: Attr:
2018/10/13 15:03:12 DEBUG : test/testFile.big: >Attr: a=valid=1s ino=0 size=0 mode=-rw-rw-r–, err=
2018/10/13 15:03:12 DEBUG : &{test/testFile.big (w)}: Write: len=131072, offset=0
2018/10/13 15:03:12 DEBUG : mega root ‘’: Target remote doesn’t support streaming uploads, creating temporary local FS to spool file
2018/10/13 15:03:12 DEBUG : &{test/testFile.big (w)}: >Write: written=131072, err=
2018/10/13 15:03:12 DEBUG : &{test/testFile.big (w)}: Write: len=131072, offset=131072

2018/10/13 15:03:14 DEBUG : &{test/testFile.big (w)}: Write: len=131072, offset=65536000
2018/10/13 15:03:14 DEBUG : &{test/testFile.big (w)}: >Write: written=131072, err=
2018/10/13 15:03:14 DEBUG : &{test/testFile.big (w)}: Write: len=131072, offset=65667072
2018/10/13 15:03:14 DEBUG : &{test/testFile.big (w)}: >Write: written=131072, err=
2018/10/13 15:03:14 DEBUG : &{test/testFile.big (w)}: Write: len=131072, offset=65798144
2018/10/13 15:03:14 DEBUG : &{test/testFile.big (w)}: >Write: written=131072, err=
2018/10/13 15:03:14 DEBUG : &{test/testFile.big (w)}: Write: len=131072, offset=65929216
2018/10/13 15:03:14 NOTICE: test/testFile.big: Removing partially written file on error: write /tmp/rclone-spool475094108/test/testFile.big: no space left on device
2018/10/13 15:03:14 ERROR : test/testFile.big: WriteFileHandle.New Rcat failed: write /tmp/rclone-spool475094108/test/testFile.big: no space left on device
2018/10/13 15:03:14 ERROR : test/testFile.big: WriteFileHandle.Write error: io: read/write on closed pipe
2018/10/13 15:03:14 DEBUG : &{test/testFile.big (w)}: >Write: written=0, err=io: read/write on closed pipe
2018/10/13 15:03:14 DEBUG : &{test/testFile.big (w)}: Flush:
2018/10/13 15:03:14 ERROR : test/testFile.big: WriteFileHandle.Flush error: write /tmp/rclone-spool475094108/test/testFile.big: no space left on device
2018/10/13 15:03:14 DEBUG : &{test/testFile.big (w)}: >Flush: err=write /tmp/rclone-spool475094108/test/testFile.big: no space left on device
2018/10/13 15:03:14 DEBUG : &{test/testFile.big (w)}: Release:
2018/10/13 15:03:14 DEBUG : test/testFile.big: WriteFileHandle.Release nothing to do
2018/10/13 15:03:14 DEBUG : &{test/testFile.big (w)}: >Release: err=

and it does make sense: my /tmp only has around 60MB and the test file is around 1GB.
is there any way i can set this path somewhere i decide?

thanks a lot

If you set the environment variable TMPDIR you can redirect where that goes.

Or you could use --vfs-cache-mode writes which has a few advantages and that will cache in --cache-dir

it worked like a charm!
thanks a lot

1 Like