The file is sucessfully created here
2022/04/06 15:11:09 DEBUG : test/testfile: Open: flags=O_RDWR|O_CREATE|O_EXCL
2022/04/06 15:11:09 DEBUG : test/testfile: newRWFileHandle:
2022/04/06 15:11:09 DEBUG : test/testfile(0xc00051c380): openPending:
2022/04/06 15:11:09 DEBUG : test/testfile: vfs cache: truncate to size=0
2022/04/06 15:11:09 DEBUG : test: Added virtual directory entry vAddFile: "testfile"
2022/04/06 15:11:09 DEBUG : test/testfile(0xc00051c380): >openPending: err=<nil>
2022/04/06 15:11:09 DEBUG : test/testfile: >newRWFileHandle: err=<nil>
2022/04/06 15:11:09 DEBUG : test: Added virtual directory entry vAddFile: "testfile"
2022/04/06 15:11:09 DEBUG : test/testfile: >Open: fd=test/testfile (rw), err=<nil>
2022/04/06 15:11:09 DEBUG : /test/testfile: >CreateEx: errc=0, fh=0x0
And then a bit later the file is created again
2022/04/06 15:11:09 DEBUG : /test/testfile: CreateEx: flags=0x502, mode=0770
2022/04/06 15:11:09 DEBUG : test/testfile: Open: flags=O_RDWR|O_CREATE|O_EXCL
2022/04/06 15:11:09 DEBUG : test/testfile: newRWFileHandle:
2022/04/06 15:11:09 DEBUG : test/testfile: >newRWFileHandle: err=file already exists
2022/04/06 15:11:09 DEBUG : test/testfile: File.openRW failed: file already exists
2022/04/06 15:11:09 DEBUG : test/testfile: >Open: fd=<nil *RWFileHandle>, err=file already exists
2022/04/06 15:11:09 DEBUG : /test/testfile: >CreateEx: errc=-17, fh=0xFFFFFFFFFFFFFFFF
However this time the creation fails because O_EXCL
was passed in which means only create this if it doesn't exist, and it already does.
So this looks at first glance to be application doing the copying doing something strange.
Which application are you copying the file to the mount with?