I’ve always liked “If at first you don’t succeed, try again. Then quit. No use being a fool about it.”
My dad used to say that if brute force and ignorance weren’t working, you should get a bigger hammer.
I’ve always liked “If at first you don’t succeed, try again. Then quit. No use being a fool about it.”
My dad used to say that if brute force and ignorance weren’t working, you should get a bigger hammer.
Thanks everyone in this thread. I’ve done additional testing and found some interesting results. Most importantly, Plex doesn’t do this on Ubuntu with identical files and mount, it’s a Windows only issue.
First, I tested downloading and renaming a folder to be fully compliant and match, doing this doesn’t change the scanning of all items in the folder and loading from remote when a new item is added. You do have fewer items in each folder so it’s helpful in that way. Naming/matching doesn’t seem to be the issue.
Next, I tested making a fresh install on Ubuntu 18.04 with Plex in docker. GDrive mounted directly with rclone. (Note: already tried a different machine with fresh plex install using all defaults with Windows and same issues as my main machine) With Ubuntu, the major difference, is there’s no need to access the all files so updating is instantaneous. In the logs, Plex goes through the exact same actions it seems with it seeing and path matching every file in the folder, but it doesn’t cause rclone to read from the remote like we saw on Windows.
Jul 05, 2020 09:14:57.114 [0x7f34a6e16740] DEBUG - Looking for path match for [/mnt/me3_unencrypted/test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/007 The Bowling Alley Cat [1942].avi]
Jul 05, 2020 09:14:57.115 [0x7f34a6e16740] DEBUG - Path matched, we're reusing media item 159551
rclone log at end
Additionally, I tested a large movie folder with 10k files in it. Neither have any file changes and all naming and match detection is identical. On Ubuntu, a scan is instant. On Windows it’s hours.
Given these results, do any of you have any additional thoughts?
Full re-scan log for rclone:
2020/07/05 09:14:51 DEBUG : Google drive root '': Checking for changes on remote
2020/07/05 09:14:56 DEBUG : test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/009 Sufferin' Cats! [1943].avi: Open: flags=OpenReadOnly
2020/07/05 09:14:56 DEBUG : test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/009 Sufferin' Cats! [1943].avi: Open: flags=O_RDONLY
2020/07/05 09:14:56 DEBUG : test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/009 Sufferin' Cats! [1943].avi: >Open: fd=test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/009 Sufferin' Cats! [1943].avi (r), err=<nil>
2020/07/05 09:14:56 DEBUG : test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/009 Sufferin' Cats! [1943].avi: >Open: fh=&{test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/009 Sufferin' Cats! [1943].avi (r)}, err=<nil>
2020/07/05 09:14:56 DEBUG : &{test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/009 Sufferin' Cats! [1943].avi (r)}: Flush:
2020/07/05 09:14:56 DEBUG : &{test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/009 Sufferin' Cats! [1943].avi (r)}: >Flush: err=<nil>
2020/07/05 09:14:56 DEBUG : &{test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/009 Sufferin' Cats! [1943].avi (r)}: Release:
2020/07/05 09:14:56 DEBUG : &{test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/009 Sufferin' Cats! [1943].avi (r)}: >Release: err=<nil>
2020/07/05 09:14:56 DEBUG : test/: ReadDirAll:
2020/07/05 09:14:56 DEBUG : test/: >ReadDirAll: item=2, err=<nil>
2020/07/05 09:14:56 DEBUG : test/: ReadDirAll:
2020/07/05 09:14:56 DEBUG : test/: >ReadDirAll: item=2, err=<nil>
2020/07/05 09:14:56 DEBUG : test/: ReadDirAll:
2020/07/05 09:14:56 DEBUG : test/: >ReadDirAll: item=2, err=<nil>
2020/07/05 09:14:56 DEBUG : test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/: ReadDirAll:
2020/07/05 09:14:56 DEBUG : test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/: >ReadDirAll: item=135, err=<nil>
2020/07/05 09:14:56 DEBUG : test/: ReadDirAll:
2020/07/05 09:14:56 DEBUG : test/: >ReadDirAll: item=2, err=<nil>
2020/07/05 09:14:56 DEBUG : test/: ReadDirAll:
2020/07/05 09:14:56 DEBUG : test/: >ReadDirAll: item=2, err=<nil>
2020/07/05 09:14:57 DEBUG : test/: Lookup: name=".grab"
2020/07/05 09:14:57 DEBUG : test/: >Lookup: node=<nil>, err=no such file or directory
2020/07/05 09:14:57 DEBUG : test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/009 Sufferin' Cats! [1943].avi: Open: flags=OpenReadOnly
2020/07/05 09:14:57 DEBUG : test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/009 Sufferin' Cats! [1943].avi: Open: flags=O_RDONLY
2020/07/05 09:14:57 DEBUG : test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/009 Sufferin' Cats! [1943].avi: >Open: fd=test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/009 Sufferin' Cats! [1943].avi (r), err=<nil>
2020/07/05 09:14:57 DEBUG : test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/009 Sufferin' Cats! [1943].avi: >Open: fh=&{test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/009 Sufferin' Cats! [1943].avi (r)}, err=<nil>
2020/07/05 09:14:57 DEBUG : &{test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/009 Sufferin' Cats! [1943].avi (r)}: Flush:
2020/07/05 09:14:57 DEBUG : &{test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/009 Sufferin' Cats! [1943].avi (r)}: >Flush: err=<nil>
2020/07/05 09:14:57 DEBUG : &{test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/009 Sufferin' Cats! [1943].avi (r)}: Release:
2020/07/05 09:14:57 DEBUG : &{test/Tom and Jerry Cartoons Complete Collection (1940-2007) [DVDRip]/009 Sufferin' Cats! [1943].avi (r)}: >Release: err=<nil>
Full re-scan log for Plex:
Plex Media Scanner.log (74.1 KB)
Use Linux? 
My guess is that Plex is doing the same file ops in both cases, especially since it’s logging the same decision. It would be amazing if a Plex dev could confirm that.
I wonder if Plex is doing a stat() on the file, or an open() and then close() without reading anything. Even if it’s doing the same thing, that could trigger different behavior on Linux+rclone vs. Windows+rclone.
No antivirus on Windows? Any other changes in rclone settings between the installations?
Your best bet might be to duplicate the behavior outside of Plex, and then ask the rclone folks.
Are there rclone logging/debugging/verbosity options that you could increase?
I’m just getting interested in using rclone myself, so this is all ignorant conjecture. 
Sorry for the silence, didn’t get a chance to do much additional testing. I turned off Windows anti-virus with no change. rClone is at it’s max logging as is Plex unfortunately.
I had a thought that perhaps being mounted as a folder on an NTFS file system might cause Windows to read files differently than a drive mounted where Windows knows the file system is perhaps a network drive. I planned to test this on my test machine by switching it over but suddenly, it’s working perfectly with no re-opening of files. No changes have been made or updates applied. It’s baffling. I wish it was better on my actual server though, re-scan time is all over the place. It took an hour last week for the TV library and now it’s been going for 13+ with almost no new content.
This leads me to believe as we originally thought, that it’s not normal behaviour for Plex to do this when a file is added to a folder that was previously scanned. I just have no idea why it was suddenly corrected on my test machine but not my actual server. Both are connected to the same drives/content and I’m running the same versions of rclone, plex and windows.
Just wanted to update that the newly released Movie scanner brings the scans down from several hours to a consistent 5 minutes. I hope the same can be done with the TV scanner in time.
It’s bonkers how much faster the new scanner and agent are.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.