Having an issue with a virtiofs share on a debian machine where, when attempting to checkout a repository for git, it fails every time with the error
Cloning into 'app'...
remote: Enumerating objects: 265423, done.
remote: Counting objects: 100% (4860/4860), done.
remote: Compressing objects: 100% (1261/1261), done.
remote: Total 265423 (delta 3750), reused 4510 (delta 3498), pack-reused 260563
Receiving objects: 100% (265423/265423), 508.88 MiB | 10.80 MiB/s, done.
Resolving deltas: 100% (195111/195111), done.
fatal: failed to read object 62f9e4fb63e2fc6be70d98e4dcf158a735a00bf9: Stale file handle
fatal: remote did not send all necessary objects
Simply changing the share from virtiofs to 9p and updating my fstab resolves the issue, of course at the cost of performance, however
development /mnt/development virtiofs rw,relatime 0 0
EDIT
On a hunch, since this share that does not explicitly have any benefit from being backed up, I changed it to being an exclusive share. Issue is now resolved, performance is good. I'm guessing since it wasn't an exclusive share (cache primary, array secondary), as the files were getting created in /mnt/user/development they were getting shifted over to /mnt/cache/development and the references were stale.