FAT file systems (and similarly VFAT) do not actually store inodes on disk. Instead, Linux invents inode numbers on the fly for files as they are visible. These generated inode numbers are stored in the cache to try to keep them consistent, but this cache has a fixed size; once it is full, old entries will be discarded.
Presumably, the action of mounting your second file system is sufficient to make the input number cache in the VFAT file system forget about your files, causing the allocation of new inode numbers and presenting the problem you are observing.
Additional Information:
- Discussion about the error associated with this problem on the findutils mailing list
- Sources of the Linux kernel: fs / fat / inode.c (in particular, calling
iunique in fat_build_inode , which performs the assignment of the inode number).
source share