Skip to content
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

I use notify to watch a path which is mount by nfs,notify didn't work and no error return #475

Closed
co0ontty opened this issue Apr 14, 2023 · 3 comments

Comments

@co0ontty
Copy link

What you did (as detailed as you can)

I use notify to watch a path which is mount by nfs,notify didn't work and no error return

What you expected

I want recive a error when notify can't watch this path

@0xpr03
Copy link
Member

0xpr03 commented Apr 14, 2023

You need to use the PollWatcher for network mounts. See also stackoverflow.

Notify can't tell whether this will work, as the kernel just doesn't send any events for the NFS mount. The "recommended" watcher, is the correct backend for your OS, but sadly that doesn't help with special file systems like NFS mounts.

@co0ontty
Copy link
Author

If possible, can you return an error when the nfs type appears in the directory?

@0xpr03
Copy link
Member

0xpr03 commented Apr 17, 2023

We don't know when something is NFS. As far as I know, we would have to scan your mounts and detect an NFS system, even across soft- and hard-links. (And fuse file systems won't tell you what it is in the mount points.) That seems out of scope to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants