I managed to reproduce this like this
$ mkdir -p /mnt/tmp/FileTest/diraa/dira/
$ echo hello > /mnt/tmp/FileTest/diraa/dira/test.txt
$ mkdir -p /mnt/tmp/FileTest/diraa/dirb #/test.txt
$ echo hello2 > /mnt/tmp/FileTest/diraa/dirb/test.txt
$ find /mnt/tmp/FileTest -name "*.txt"
/mnt/tmp/FileTest/diraa/dira/test.txt
/mnt/tmp/FileTest/diraa/dirb/test.txt
$ mv /mnt/tmp/FileTest/diraa /mnt/tmp/FileTest/dira
$ find /mnt/tmp/FileTest -name "*.txt"
$ rclone lsl s3:rclone/FileTest
6 2021-03-16 09:32:50.656651287 dira/dira/test.txt
7 2021-03-16 09:33:38.557192131 dira/dirb/test.txt
The log from the rename is
mv first finds the things it is operating on and checks the destination doesn't exist
2021/03/16 09:34:57 DEBUG : fuse: <- Lookup [ID=0x6e Node=0x1 Uid=1000 Gid=1000 Pid=3514212] "FileTest"
2021/03/16 09:34:57 DEBUG : /: Lookup: name="FileTest"
2021/03/16 09:34:57 DEBUG : /: >Lookup: node=FileTest/, err=<nil>
2021/03/16 09:34:57 DEBUG : FileTest/: Attr:
2021/03/16 09:34:57 DEBUG : FileTest/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/03/16 09:34:57 DEBUG : fuse: -> [ID=0x6e] Lookup 0x2 gen=0 valid=1s attr={valid=1s ino=12907864677946988754 size=0 mode=drwxrwxr-x}
2021/03/16 09:34:57 DEBUG : fuse: <- Lookup [ID=0x70 Node=0x2 Uid=1000 Gid=1000 Pid=3514212] "diraa"
2021/03/16 09:34:57 DEBUG : FileTest/: Lookup: name="diraa"
2021/03/16 09:34:57 DEBUG : FileTest/: >Lookup: node=FileTest/diraa/, err=<nil>
2021/03/16 09:34:57 DEBUG : FileTest/diraa/: Attr:
2021/03/16 09:34:57 DEBUG : FileTest/diraa/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/03/16 09:34:57 DEBUG : fuse: -> [ID=0x70] Lookup 0x3 gen=0 valid=1s attr={valid=1s ino=12767495182912600437 size=0 mode=drwxrwxr-x}
2021/03/16 09:34:57 DEBUG : fuse: <- Lookup [ID=0x72 Node=0x2 Uid=1000 Gid=1000 Pid=3514212] "dira"
2021/03/16 09:34:57 DEBUG : FileTest/: Lookup: name="dira"
2021/03/16 09:34:57 DEBUG : FileTest/: >Lookup: node=<nil>, err=no such file or directory
2021/03/16 09:34:57 DEBUG : fuse: -> [ID=0x72] Lookup error=ENOENT
2021/03/16 09:34:57 DEBUG : fuse: <- Lookup [ID=0x74 Node=0x2 Uid=1000 Gid=1000 Pid=3514212] "dira"
2021/03/16 09:34:57 DEBUG : FileTest/: Lookup: name="dira"
2021/03/16 09:34:57 DEBUG : FileTest/: >Lookup: node=<nil>, err=no such file or directory
2021/03/16 09:34:57 DEBUG : fuse: -> [ID=0x74] Lookup error=ENOENT
2021/03/16 09:34:57 DEBUG : fuse: <- Lookup [ID=0x76 Node=0x2 Uid=1000 Gid=1000 Pid=3514212] "dira"
2021/03/16 09:34:57 DEBUG : FileTest/: Lookup: name="dira"
2021/03/16 09:34:57 DEBUG : FileTest/: >Lookup: node=<nil>, err=no such file or directory
2021/03/16 09:34:57 DEBUG : fuse: -> [ID=0x76] Lookup error=ENOENT
Then mv does the rename which involves server side copying the objects
2021/03/16 09:34:57 DEBUG : fuse: <- Rename [ID=0x78 Node=0x2 Uid=1000 Gid=1000 Pid=3514212] from "diraa" to dirnode 0x2 "dira"
2021/03/16 09:34:57 DEBUG : FileTest/: Rename: oldName="diraa", newName="dira", newDir=FileTest/
2021/03/16 09:34:57 DEBUG : FileTest/diraa/dira/test.txt: MD5 = b1946ac92492d2347c6235b4d2611184 OK
2021/03/16 09:34:57 INFO : FileTest/diraa/dira/test.txt: Copied (server-side copy) to: FileTest/dira/dira/test.txt
2021/03/16 09:34:57 DEBUG : FileTest/diraa/dirb/test.txt: MD5 = a10edbbb8f28f8e98ee6b649ea2556f4 OK
2021/03/16 09:34:57 INFO : FileTest/diraa/dirb/test.txt: Copied (server-side copy) to: FileTest/dira/dirb/test.txt
2021/03/16 09:34:57 INFO : FileTest/diraa/dira/test.txt: Deleted
2021/03/16 09:34:57 INFO : FileTest/diraa/dirb/test.txt: Deleted
2021/03/16 09:34:57 DEBUG : FileTest/diraa: Updating dir with FileTest/dira 0xc000b18180
2021/03/16 09:34:57 DEBUG : FileTest/diraa: forgetting directory cache
2021/03/16 09:34:57 DEBUG : FileTest/diraa/dirb: forgetting directory cache
2021/03/16 09:34:57 DEBUG : FileTest/diraa/dirb: Removed virtual directory entry vAddFile: "test.txt"
2021/03/16 09:34:57 DEBUG : FileTest/diraa/dira: forgetting directory cache
2021/03/16 09:34:57 DEBUG : FileTest/diraa/dira: Removed virtual directory entry vAddFile: "test.txt"
2021/03/16 09:34:57 DEBUG : FileTest: Added virtual directory entry vDel: "diraa"
2021/03/16 09:34:57 DEBUG : FileTest: Added virtual directory entry vAddDir: "dira"
2021/03/16 09:34:57 DEBUG : FileTest/: >Rename: err=<nil>
2021/03/16 09:34:57 DEBUG : fuse: -> [ID=0x78] Rename
That all looked good
2021/03/16 09:35:02 DEBUG : fuse: <- Lookup [ID=0x7a Node=0x1 Uid=1000 Gid=1000 Pid=3514213] "FileTest"
2021/03/16 09:35:02 DEBUG : /: Lookup: name="FileTest"
2021/03/16 09:35:02 DEBUG : /: >Lookup: node=FileTest/, err=<nil>
2021/03/16 09:35:02 DEBUG : FileTest/: Attr:
2021/03/16 09:35:02 DEBUG : FileTest/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/03/16 09:35:02 DEBUG : fuse: -> [ID=0x7a] Lookup 0x2 gen=0 valid=1s attr={valid=1s ino=12907864677946988754 size=0 mode=drwxrwxr-x}
2021/03/16 09:35:02 DEBUG : fuse: <- Open [ID=0x7c Node=0x2 Uid=1000 Gid=1000 Pid=3514213] dir=true fl=OpenReadOnly+OpenDirectory+OpenNonblock+0x20000
2021/03/16 09:35:02 DEBUG : fuse: -> [ID=0x7c] Open 0x2 fl=0
2021/03/16 09:35:02 DEBUG : fuse: <- Read [ID=0x7e Node=0x2 Uid=1000 Gid=1000 Pid=3514213] 0x2 4096 @0x0 dir=true fl=0 owner=0 ffl=OpenReadOnly+OpenDirectory+OpenNonblock+0x20000
2021/03/16 09:35:02 DEBUG : FileTest/: ReadDirAll:
2021/03/16 09:35:02 DEBUG : FileTest/: >ReadDirAll: item=3, err=<nil>
2021/03/16 09:35:02 DEBUG : fuse: -> [ID=0x7e] Read 96
2021/03/16 09:35:02 DEBUG : fuse: <- Read [ID=0x80 Node=0x2 Uid=1000 Gid=1000 Pid=3514213] 0x2 4096 @0x60 dir=true fl=0 owner=0 ffl=OpenReadOnly+OpenDirectory+OpenNonblock+0x20000
2021/03/16 09:35:02 DEBUG : fuse: -> [ID=0x80] Read 0
2021/03/16 09:35:02 DEBUG : fuse: <- Lookup [ID=0x82 Node=0x2 Uid=1000 Gid=1000 Pid=3514213] "dira"
2021/03/16 09:35:02 DEBUG : FileTest/: Lookup: name="dira"
2021/03/16 09:35:02 DEBUG : FileTest/: >Lookup: node=FileTest/dira/, err=<nil>
2021/03/16 09:35:02 DEBUG : FileTest/dira/: Attr:
2021/03/16 09:35:02 DEBUG : FileTest/dira/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/03/16 09:35:02 DEBUG : fuse: -> [ID=0x82] Lookup 0x3 gen=0 valid=1s attr={valid=1s ino=7751488938101355606 size=0 mode=drwxrwxr-x}
2021/03/16 09:35:02 DEBUG : fuse: <- Open [ID=0x84 Node=0x3 Uid=1000 Gid=1000 Pid=3514213] dir=true fl=OpenReadOnly+OpenDirectory+OpenNonblock+0x20000
2021/03/16 09:35:02 DEBUG : fuse: -> [ID=0x84] Open 0x1 fl=0
2021/03/16 09:35:02 DEBUG : fuse: <- Read [ID=0x86 Node=0x3 Uid=1000 Gid=1000 Pid=3514213] 0x1 4096 @0x0 dir=true fl=0 owner=0 ffl=OpenReadOnly+OpenDirectory+OpenNonblock+0x20000
2021/03/16 09:35:02 DEBUG : FileTest/dira/: ReadDirAll:
2021/03/16 09:35:02 DEBUG : FileTest/dira: Removed virtual directory entry vAddDir: "dira"
2021/03/16 09:35:02 DEBUG : FileTest/dira: Removed virtual directory entry vAddDir: "dirb"
2021/03/16 09:35:02 DEBUG : FileTest/dira/: >ReadDirAll: item=4, err=<nil>
2021/03/16 09:35:02 DEBUG : fuse: -> [ID=0x86] Read 128
2021/03/16 09:35:02 DEBUG : fuse: <- Read [ID=0x88 Node=0x3 Uid=1000 Gid=1000 Pid=3514213] 0x1 4096 @0x80 dir=true fl=0 owner=0 ffl=OpenReadOnly+OpenDirectory+OpenNonblock+0x20000
2021/03/16 09:35:02 DEBUG : fuse: -> [ID=0x88] Read 0
Here is where the problem is. The client looks up FileTest/dira/ but gets a node back which has a path FileTest/diraa/dira in which is the old path.
2021/03/16 09:35:02 DEBUG : fuse: <- Lookup [ID=0x8a Node=0x3 Uid=1000 Gid=1000 Pid=3514213] "dira"
2021/03/16 09:35:02 DEBUG : FileTest/dira/: Lookup: name="dira"
2021/03/16 09:35:02 DEBUG : FileTest/dira/: >Lookup: node=FileTest/diraa/dira/, err=<nil>
2021/03/16 09:35:02 DEBUG : FileTest/diraa/dira/: Attr:
2021/03/16 09:35:02 DEBUG : FileTest/diraa/dira/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/03/16 09:35:02 DEBUG : fuse: -> [ID=0x8a] Lookup 0x4 gen=0 valid=1s attr={valid=1s ino=13655602113203163872 size=0 mode=drwxrwxr-x}
2021/03/16 09:35:02 DEBUG : fuse: <- Open [ID=0x8c Node=0x4 Uid=1000 Gid=1000 Pid=3514213] dir=true fl=OpenReadOnly+OpenDirectory+OpenNonblock+0x20000
2021/03/16 09:35:02 DEBUG : fuse: -> [ID=0x8c] Open 0x3 fl=0
2021/03/16 09:35:02 DEBUG : fuse: <- Read [ID=0x8e Node=0x4 Uid=1000 Gid=1000 Pid=3514213] 0x3 4096 @0x0 dir=true fl=0 owner=0 ffl=OpenReadOnly+OpenDirectory+OpenNonblock+0x20000
2021/03/16 09:35:02 DEBUG : FileTest/diraa/dira/: ReadDirAll:
2021/03/16 09:35:02 DEBUG : FileTest/diraa/dira/: >ReadDirAll: item=2, err=<nil>
2021/03/16 09:35:02 DEBUG : fuse: -> [ID=0x8e] Read 64
2021/03/16 09:35:02 DEBUG : fuse: <- Read [ID=0x90 Node=0x4 Uid=1000 Gid=1000 Pid=3514213] 0x3 4096 @0x40 dir=true fl=0 owner=0 ffl=OpenReadOnly+OpenDirectory+OpenNonblock+0x20000
2021/03/16 09:35:02 DEBUG : fuse: -> [ID=0x90] Read 0
2021/03/16 09:35:02 DEBUG : fuse: <- Release [ID=0x92 Node=0x4 Uid=0 Gid=0 Pid=0] 0x3 fl=OpenReadOnly+OpenDirectory+OpenNonblock+0x20000 rfl=0 owner=0
2021/03/16 09:35:02 DEBUG : fuse: -> [ID=0x92] Release
2021/03/16 09:35:02 DEBUG : fuse: <- Lookup [ID=0x94 Node=0x3 Uid=1000 Gid=1000 Pid=3514213] "dirb"
2021/03/16 09:35:02 DEBUG : FileTest/dira/: Lookup: name="dirb"
2021/03/16 09:35:02 DEBUG : FileTest/dira/: >Lookup: node=FileTest/diraa/dirb/, err=<nil>
2021/03/16 09:35:02 DEBUG : FileTest/diraa/dirb/: Attr:
2021/03/16 09:35:02 DEBUG : FileTest/diraa/dirb/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=<nil>
2021/03/16 09:35:02 DEBUG : fuse: -> [ID=0x94] Lookup 0x6 gen=0 valid=1s attr={valid=1s ino=13655605411738048505 size=0 mode=drwxrwxr-x}
2021/03/16 09:35:02 DEBUG : fuse: <- Open [ID=0x96 Node=0x6 Uid=1000 Gid=1000 Pid=3514213] dir=true fl=OpenReadOnly+OpenDirectory+OpenNonblock+0x20000
2021/03/16 09:35:02 DEBUG : fuse: -> [ID=0x96] Open 0x3 fl=0
2021/03/16 09:35:02 DEBUG : fuse: <- Read [ID=0x98 Node=0x6 Uid=1000 Gid=1000 Pid=3514213] 0x3 4096 @0x0 dir=true fl=0 owner=0 ffl=OpenReadOnly+OpenDirectory+OpenNonblock+0x20000
2021/03/16 09:35:02 DEBUG : FileTest/diraa/dirb/: ReadDirAll:
2021/03/16 09:35:02 DEBUG : FileTest/diraa/dirb/: >ReadDirAll: item=2, err=<nil>
2021/03/16 09:35:02 DEBUG : fuse: -> [ID=0x98] Read 64
2021/03/16 09:35:02 DEBUG : fuse: <- Read [ID=0x9a Node=0x6 Uid=1000 Gid=1000 Pid=3514213] 0x3 4096 @0x40 dir=true fl=0 owner=0 ffl=OpenReadOnly+OpenDirectory+OpenNonblock+0x20000
2021/03/16 09:35:02 DEBUG : fuse: -> [ID=0x9a] Read 0
2021/03/16 09:35:02 DEBUG : fuse: <- Release [ID=0x9c Node=0x6 Uid=0 Gid=0 Pid=0] 0x3 fl=OpenReadOnly+OpenDirectory+OpenNonblock+0x20000 rfl=0 owner=0
2021/03/16 09:35:02 DEBUG : fuse: -> [ID=0x9c] Release
2021/03/16 09:35:02 DEBUG : fuse: <- Release [ID=0x9e Node=0x3 Uid=0 Gid=0 Pid=0] 0x1 fl=OpenReadOnly+OpenDirectory+OpenNonblock+0x20000 rfl=0 owner=0
2021/03/16 09:35:02 DEBUG : fuse: -> [ID=0x9e] Release
2021/03/16 09:35:02 DEBUG : fuse: <- Release [ID=0xa0 Node=0x2 Uid=0 Gid=0 Pid=0] 0x2 fl=OpenReadOnly+OpenDirectory+OpenNonblock+0x20000 rfl=0 owner=0
2021/03/16 09:35:02 DEBUG : fuse: -> [ID=0xa0] Release
I'm pretty sure this is the same issue as
It doesn't reproduce with rclone cmount instead of rclone mount
Also if you do sync; echo 2 > /proc/sys/vm/drop_caches just before the mv it works properly.