Chen Levy See check-nfs. That works really well, except for the when the mount's source has whitespace in the path. You could also use alternative scheme: os. Community Bot 1 1 1 silver badge. Costa Costa 6 6 silver badges 12 12 bronze badges. Teddy Teddy 5, 3 3 gold badges 22 22 silver badges 35 35 bronze badges. Does this mean I should look for another solution? I guess it depends on your kernel. Teddy, actually, did you try your code?
Confirming Oz's observation - a hung NFS mount will hang this program indefinitely. I made a really hacked together code for this answer in python and managed to test it when I had a stale filesystem : github.
Show 4 more comments. UndeadKernel UndeadKernel 3 3 silver badges 13 13 bronze badges. Chris Adams Chris Adams 4, 28 28 silver badges 28 28 bronze badges. The file is already deleted, but the client doesn't know. Add a comment. Active Oldest Votes. Here is a super-hacky way that I do it. Improve this answer. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.
Are you trying reboot your machine? Add a comment. Active Oldest Votes. When the server is back and the client then umounts and tries to mount the nfs volume the server might respond with: mount. Improve this answer. Just want to add that this worked for me when the server is running Manjaro Linux and the client is running Ubuntu.
Furthermore, the conditions that led to this are that I moved a drive from one server to another, unmounting the device from the clients before the move, but one client ended up giving me the "stale file handle" error when I tried to mount the nfs share from the new server.
Executing the commands in this answer fixed it. Maybe some old pagecache, inode, dentry cache entries are exists on NFS server. Yurij Goncharuk Yurij Goncharuk 3, 2 2 gold badges 18 18 silver badges 35 35 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Ensure no processes are accessing the mount point s by using lsof and searching the stale mount point:.
Next, stop the instance and any other processes accessing the mount point.
0コメント