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
Detect a folder re-appearing more quickly (e.g. on re-mount) #9457
Comments
I think this is expected. There is no magic to instantly detect the presence of a previously-failed folder, we need to actually look at it which happens in the scheduled scan. We probably get the removed event "for free" because we're watching the folder for changes and it flags some kind of change. When it's not there any more there is nothing to watch and we don't get any events. I suppose it would be possible to specifically do something operating system specific to watch for mount events, if there is such a thing, or possibly add a watch on the parent dir and see if we get anything from there, but I don't really see it worth the effort to be honest... |
Maybe we can have a global setting to set an interval to rescan the folder when something fails. Then we can keep the regular interval intact, but recheck the folder every 5 minutes on fail to take it back. I guess this is easier to do than watching some file system events. By the way, I just switched from resilio-sync, it can detect it immediately when I put the HDD back. I don't know how it managed to do that. |
I found a bigger problem. It seems that after the HDD disappears and appears again after several hours, Syncthing starts to reindex the whole disk. I remember if it just disappears for a little while, the indexing is very fast, and won’t do it all over again. This HDD needs days to be fully indexed. Do you have any idea about this problem? I’m trying to reproduce it again to confirm. |
That clearly shouldn't happen, and I am somewhat confident saying can't happen without external interventation/failure (OS, hardware, user). Lets take debugging of this to the forum please, as that's where we do support (e.g. due to lengthy exchanges that shouldn't cause notifications in github): https://forum.syncthing.net/ As for the original request: I am somewhat certain this came up before, but I can't find any issue for it. |
Thank you for your reply! The title change is good. Yep, you need to knock the folder more when it's missing. That's exactly what I want. Making it configurable is just optional. I'll post the indexing problem in the forum later today. |
I think we maybe have a larger point of possible improvement in the handling of rescan intervals... now we just set the one rescan interval which is used all the time, and we tweak what that interval is depending on wether we expect to use filesystem notifications or not. I think it would be better to have two intervals, one (longer) that is used when the folder is healthy and notifications are online, and a different (shorter) one that is used when the folder is unhealthy or the watcher is offline... |
I posted https://forum.syncthing.net/t/syncthing-tries-to-index-an-unmounted-volume/21784 (Update: index problem resolved) |
What happened?
I'm syncing the root of a removable HDD with another computer. After unmounted the HDD, Syncthing immediately knew there was something wrong and told me "Folder path missing".
But after I put the HDD back, Syncthing couldn't detect there was a change but continued to tell me "Folder path missing". Even though the folder exists now. The only thing I can do is to rescan or set the rescan timer to a short interval.
Syncthing version
v1.27.4
Platform & operating system
M1 MacBook Air macOS Sonoma 14.3.1
Browser version
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: