I have an issue that sometimes occurs when copying data from SD/CF cards to internal drives, but also manifests when backing up a large archive of photos to external drives. Files are copied using windows explorer under win10, and the drives use NTFS.
Simply put, one in 100k files or so ends up being larger on the destination drive than on the source file. Comparing the contents in a hex editor shows that the larger file has identical contents, but the contents are then followed by zero fill to the next block boundary (e.g. size should be 0x3CBABEA bytes, size is actually 0x03D00000 bytes, and data in range 0x3CBABEA - 0x03D00000 is zero).
I suspect the file copy process internally allocates files in blocks and truncates the final block after copy is done, and this last step is silently failing, but I have no idea what the cause is and how to prevent it.
A verification step using FCIV detects these errors, but for obvious reasons I would like to prevent them from occuring in the first place.