New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mount: issue with renames on mount with azureblob - excess kernel caching #4977
Comments
I have managed to replicate this in the beta I ran
Then
Very clearly in the log we can see that the second
This problem does not replicate with It replicates in a simpler way with
With the same underlying cause of reading the wrong object. I can prove this is due to kernel caching, as if I execute this as root after the second
Then repeating the
Lots of digging around in the source and logs later I find that when the fuse library creates directories, it sets their valid time to 60 seconds. The
I haven't found a way to decrease this yet. I've also been trying to invalidate the entry in the kernel cache, but I haven't succeeded with that yet either! |
|
Did you do this after the rename but before the
I don't think that will help. The caching is in the kernel and in the fuse library. |
Yes. Its renamed and I get the error. |
I think it is because of the rclone cache. I can run your mentioned command but rclone still have the old directory. |
It was discovered `rclone mount` (but not `rclone cmount`) cached directories after rename which it shouldn't have done. This caused strange empty listings of directories after rename and IO errors when trying to access files in renamed directories. This turned out to be the kernel caching the directories as basil/fuse sets their expiry time to 60s for some reason. This fix invalidates the relevant kernel cache entries in the for the directories which fixes the problem. Fixes: #4977 See: https://forum.rclone.org/t/after-a-directory-renmane-using-mv-files-are-not-visible-any-longer/22797
I think I've managed to fix this. Can you have a go with v1.55.0-beta.5303.b48137c9b.fix-4977-mount-caching on branch fix-4977-mount-caching (uploaded in 15-30 mins) |
It was discovered `rclone mount` (but not `rclone cmount`) cached directories after rename which it shouldn't have done. This caused IO errors when trying to access files in renamed directories on bucket based file systems. This turned out to be the kernel caching the directories as basil/fuse sets their expiry time to 60s for some reason. This fix invalidates the relevant kernel cache entries in the for the directories which fixes the problem. Fixes: #4977 See: https://forum.rclone.org/t/after-a-directory-renmane-using-mv-files-are-not-visible-any-longer/22797
It was discovered `rclone mount` (but not `rclone cmount`) cached directories after rename which it shouldn't have done. This caused IO errors when trying to access files in renamed directories on bucket based file systems. This turned out to be the kernel caching the directories as basil/fuse sets their expiry time to 60s for some reason. This fix invalidates the relevant kernel cache entries in the for the directories which fixes the problem. Fixes: #4977 See: https://forum.rclone.org/t/after-a-directory-renmane-using-mv-files-are-not-visible-any-longer/22797
I've merged this to master now which means it will be in the latest beta in 15-30 mins and released in v1.55 |
It was discovered `rclone mount` (but not `rclone cmount`) cached directories after rename which it shouldn't have done. This caused IO errors when trying to access files in renamed directories on bucket based file systems. This turned out to be the kernel caching the directories as basil/fuse sets their expiry time to 60s for some reason. This fix invalidates the relevant kernel cache entries in the for the directories which fixes the problem. Fixes: rclone#4977 See: https://forum.rclone.org/t/after-a-directory-renmane-using-mv-files-are-not-visible-any-longer/22797
What is the problem you are having with rclone?
Reference: https://forum.rclone.org/t/rclone-mount-vfs-azureblob/21503/22
The issue is, that rclone somehow does not handle renames properly. Internally it still uses the old names. As soon as this internal cache is gone, it cannot find the data as it searches at the old places instead of the new one.
What is your rclone version (output from
rclone version
)Tested on:
1.53.2
1.53.3
1.53.4
and latest Betas
Which OS you are using and how many bits (e.g. Windows 7, 64 bit)
Suse Linux Enterprise 12 SP5
Which cloud storage system are you using? (e.g. Google Drive)
Azure Blob
The command you were trying to run (e.g.
rclone copy /tmp remote:tmp
)rename from util-linux 2.33.2
A log from the command with the
-vv
flag (e.g. output fromrclone -vv copy /tmp remote:tmp
)Can be found in rclone forum post
The text was updated successfully, but these errors were encountered: