Dug in a little more and did testing with vfs-cache writes as that’s what I’m currently using.
My mount:
/home/felix/go/bin/rclone cmount gcrypt: /gmedia --allow-other --dir-cache-time 48h --vfs-read-chunk-size 32M --vfs-read-chunk-size-limit 2G --cache-dir /data/rclone --vfs-cache-mode writes --buffer-size 512M --syslog --umask 002 --bind 192.168.1.30 -o auto_cache -o sync_read --log-level INFO
I noticed that shows seem quite fine as they copy but I get some duplicates hanging around for larger movies that lock things up.
I tested by grabbing a bunch of movies before I went to bed last night and got a lot partials:
felix@gemini:/gmedia$ find . -name *partial*
./Radarr_Movies/Blade (1998)/Blade (1998).mkv.partial~
./Radarr_Movies/Blade II (2002)/Blade II (2002).mkv.partial~
./Radarr_Movies/Blade Trinity (2004)/Blade Trinity (2004).mkv.partial~
./Radarr_Movies/Ghost Rider (2007)/Ghost Rider (2007).mkv.partial~
./Radarr_Movies/Hulk (2003)/Hulk (2003).mkv.partial~
./Radarr_Movies/I Feel Pretty (2018)/I Feel Pretty (2018).mkv.partial~
./Radarr_Movies/Peter Rabbit (2018)/Peter Rabbit (2018).mkv.partial~
./Radarr_Movies/Punisher War Zone (2008)/Punisher War Zone (2008).mkv.partial~
./Radarr_Movies/Super Troopers 2 (2018)/Super Troopers 2 (2018).mkv.partial~
./Radarr_Movies/The Punisher (2004)/The Punisher (2004).mkv.partial~
./Radarr_Movies/Thor The Dark World (2013)/Thor The Dark World (2013).mkv.partial~
./Radarr_Movies/Traffik (2018)/Traffik (2018).mkv.partial~
./Radarr_Movies/Welcome to Curiosity (2018)/Welcome to Curiosity (2018).mkv.partial~
You can see the file gets copied twice as the partial goes along with the final file as well:
Jul 13 05:14:08 gemini rclone[2384]: Radarr_Movies/Welcome to Curiosity (2018)/Welcome to Curiosity (2018).mkv.partial~: Copied (new)
Jul 13 05:22:11 gemini rclone[2384]: Radarr_Movies/Welcome to Curiosity (2018)/Welcome to Curiosity (2018).mkv: Copied (new)
Jul 13 05:33:34 gemini rclone[2384]: TV/Little Big Shots/Little.Big.Shots.S03E12.mkv.partial~: Copied (new)
Jul 13 06:05:32 gemini rclone[2384]: Radarr_Movies/Peter Rabbit (2018)/Peter Rabbit (2018).mkv.partial~: Copied (new)
Jul 13 06:38:29 gemini rclone[2384]: TV/Nashville/Nashville.2012.S06E14.mkv.partial~: Copied (new)
Jul 13 06:47:36 gemini rclone[2384]: TV/Marvel's.Cloak.&.Dagger/Marvels.Cloak.and.Dagger.S01E07.mkv.partial~: Copied (new)
Jul 13 06:49:10 gemini rclone[2384]: Radarr_Movies/Peter Rabbit (2018)/Peter Rabbit (2018).mkv: Copied (new)
Jul 13 07:08:18 gemini rclone[2384]: Radarr_Movies/Spinning Man (2018)/Spinning Man (2018).mkv.partial~: Copied (new)
Jul 13 07:26:51 gemini rclone[2384]: Radarr_Movies/Spinning Man (2018)/Spinning Man (2018).mkv: Copied (new)
Lots of mono locks along the way as well:
felix@gemini:/gmedia$ dmesg | grep mono
[33954.525329] INFO: task mono:4611 blocked for more than 120 seconds.
[33954.525407] mono D 0 4611 1 0x00000004
[34075.356973] INFO: task mono:4611 blocked for more than 120 seconds.
[34075.357131] mono D 0 4611 1 0x00000004
[34558.683166] INFO: task mono:4611 blocked for more than 120 seconds.
[34558.683233] mono D 0 4611 1 0x00000004
[35404.503861] INFO: task mono:4611 blocked for more than 120 seconds.
[35404.503931] mono D 0 4611 1 0x00000004
[36854.481064] INFO: task mono:4611 blocked for more than 120 seconds.
[36854.481153] mono D 0 4611 1 0x00000004
[36975.312587] INFO: task mono:4611 blocked for more than 120 seconds.
[36975.312765] mono D 0 4611 1 0x00000004
[54737.539331] INFO: task mono:4604 blocked for more than 120 seconds.
[54737.539393] mono D 0 4604 1 0x00000004
[54858.370758] INFO: task mono:4604 blocked for more than 120 seconds.
[54858.370816] mono D 0 4604 1 0x00000004
[54979.202237] INFO: task mono:4604 blocked for more than 120 seconds.
[54979.202396] mono D 0 4604 1 0x00000004
[55100.033636] INFO: task mono:4604 blocked for more than 120 seconds.
[55100.033689] mono D 0 4604 1 0x00000004
It’s easy enough to clean up with:
find . -name *partial* -delete
So from my take, it seems like it copies it locally to the cache-write area, which I can see complete.
2018/07/13 09:28:54 DEBUG : /test.partial: >Write: n=2558
2018/07/13 09:28:54 DEBUG : /test.partial: Flush: fh=0x0
2018/07/13 09:28:54 DEBUG : test.partial(0xc4204ec240): close:
After that it goes to move/write the file to the GD.
2018/07/13 09:28:56 DEBUG : s1otfrmsl9lriifem1hcggi2f8: Sending chunk 8388608 length 8388608
2018/07/13 09:28:56 DEBUG : s1otfrmsl9lriifem1hcggi2f8: Sending chunk 16777216 length 8388608
2018/07/13 09:29:02 DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:1125899906842624 Bfree:1125888060224748 Bavail:1125899906842624 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0
2018/07/13 09:29:03 DEBUG : s1otfrmsl9lriifem1hcggi2f8: Sending chunk 117440512 length 8388608
2018/07/13 09:29:03 DEBUG : s1otfrmsl9lriifem1hcggi2f8: Sending chunk 125829120 length 8388608
I tried to replicate the mv that Radarr/Sonarr does and I just lock on the mv as the file is still copying:
felix@gemini:/test$ mv test.partial test.mkv
Once the file gets finished sending to the remote, it processes and lets me rename the file:
2018/07/13 09:32:10 INFO : test.partial: Copied (new)
2018/07/13 09:32:10 DEBUG : test.partial: transferred to remote
2018/07/13 09:32:10 DEBUG : test.partial(0xc4204ec240): >close: err=<nil>
2018/07/13 09:32:10 DEBUG : /test.partial: >Flush: errc=0
2018/07/13 09:32:10 DEBUG : /test.partial: Rename: newPath="/test.mkv"
2018/07/13 09:32:11 DEBUG : test.partial: Updating file with test.mkv 0xc4204448c0
2018/07/13 09:32:11 DEBUG : /test.partial: >Rename: errc=0
2018/07/13 09:32:11 DEBUG : /test.mkv: Release: fh=0x0
2018/07/13 09:32:11 DEBUG : /test.mkv: Getattr: fh=0xFFFFFFFFFFFFFFFF
2018/07/13 09:32:11 DEBUG : /test.mkv: >Getattr: errc=0
2018/07/13 09:32:11 DEBUG : test.partial(0xc4204ec240): RWFileHandle.Release nothing to do
2018/07/13 09:32:11 DEBUG : /test.mkv: >Release: errc=0
@B4dM4n - any thoughts ?