I am simply trying to rename files in my google drive mount using mv command . The issue is that as soon as i run that command , mount updates the filename for 1,2 seconds and then immediately reverts it back to the older name . It then takes a good 2,3 minutes for the filename to update . Google Drive app properly shows the updated filename immediately after the mv command without any issues .i have been facing this issue for quite some time now . Here's a small 90 sec screen recording of this issue - drive_mount_issue.mp4 - Google Drive . I have also attached the log at bottom . In this case , i simply rename a file named 9GB.bin to 1 GB.bin , mount shows the updated file ( 1GB.bin ) for 1,2 seconds and then reverts back to the older name and then filename doesn't update to 1GB.bin for good 2,3 minutes
What is your rclone version (output from rclone version)
I am sorry for the mistake , i mistakenly entered the rclone version from my android device while this issue was reproduced on my vps with drive mount using the latest rclone version , updated in post too
Actually before reproducing this issue , i had to clear the log file since it had become like 1gb+ in size as its continuously mounted . So i cleared log file totally . Ran mv command, reproduced and i grabbed the log
If the log prior to the reproduction of issue is also important , should i rather do this ? - clear log , restart mount systemd service , run mv command and reproduce issue and then send that log. Will this do the job ?
As of now , I couldn't reproduce this issue using this moveto command . So now i am curious whether rclone moveto command used above is any different than doing cd to the directory where file is present and then doing mv oldname newname because this issue i reported seems to be occurring with mv command only .
PS \ Even tho this moveto command becomes bit long , i am fine by using it in case simply using mv is not recommended or something , atleast i won't have that weird renaming issue
This issue seems to be quite random . It takes some attempts to reproduce it . I tried to rename multiple directories Test and Test2 to 'Test MID' & 'Test2 MID' respectively . The issue occured with renaming the first directory Test , Test2 got renamed properly while Test got reverted to its oldname and it got updated almost 2,3 mins later
Here's the debug log
Have a look at around Line 99 , it logged renaming the Test directory . Secondly check Line 282 , you see see that logging is displaying the old directory name . In mount it got updated checking with ls quite later ..
I think this is probably team drive listing caching which is a known problems.
Rclone does stuff to the team drive, it accepts it, but the listing doesn't update.
The sequences of events seems to be
dir looks OK
change notify notification comes in
rclone re-reads directory and reads old directory
So I suspect if the directory is reading the wrong item, if you clear the VFS cache (you can wait 5 minutes which is the default or send rclone a SIGHUP or use the rc then read it again, sooner or later it will read the correct directory.
Do you mean Test got updated to what it should be after 3 minutes?
If you make this bigger --poll-interval 15s it will make it much less likely according to the theory above... If you make it smaller it should happen more often.
Yes that's correct .. it took approx 2-3 mins
I continued the above process and waited for ls to list it correctly then grabbed the log file again , do you need that log file if it helps by any means ? ( Can say its a 2 minute extended log of the one i just sent here )
Sorry got bit delayed to report this
So now after testing extensively i can confirm that this issue occurs with rclone moveto/move command as well
Also unlike last time where i was guessing the time it takes to update file/folder name in mount , this time i have actually calculated the very exact time using timer and you would be surprised to know that in each of the tests it took exactly 5 minutes to update the name in mount
Now talking about the logs . I have reproduced it many times but sending you logs from 2 instances with explanation
Here i have renamed 2 folders using rclone move and 1 file using moveto command .. 2 of them got updated in mount instantly but 1 didn't . You can check in line 75 , there's a change notify . Now keep scrolling you will notice that rclone always read this folder from line 75 by its old name only . Only at around line 2753 ( exactly 5 mins later ) rclone finally read the folder with its updated name
Log - Untitled - Pastebin.com