mount.nfs: Stale file handle of the solution

Appear in the NFS client mount rpc sharing service when the problem

[root@lnmp02 ~]# mount -t nfs 192.168.20.6:/data /mnt

mount.nfs: Stale file handle

The reason is that when the client-side mount on a directory server side, if the server-side turn up the directory unshare or delete, then this error will occur at the client. I really want to remove the front over the NFS server / data directory, so when re-mount the emergence of this problem. So how should you do it?

Solution:

 其实解决办法很简单,就是在client上把那个文档umount掉。可是其实做起来很难,因为经常会得到 is busy的错误。

I just learned a command can solve this problem in watching the video of when the old boy linux

umount

[root@lnmp02 ~]# umount -lf /mnt

[root@lnmp02 ~]# mount -t nfs 192.168.20.6:/data /mnt

[root@lnmp02 ~]# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/sda3 18G 1.2G 16G 8% /

tmpfs 504M 0 504M 0% /dev/shm

/dev/sda1 190M 48M 132M 27% /boot

192.168.20.6:/data 18G 16G 1.2G 8% / mnt

-lf / mnt

This way it is successfully resolved

Guess you like

Origin blog.csdn.net/weixin_43546282/article/details/90411256