在NFS客户端挂载rpc共享服务的时候出现这个问题

# mount -t nfs 192.168.20.6:/data /mnt

mount.nfs: Stale file handle

原因是当client端mount上了server端的directory之后,假如server端又将这个directory unshare了或者删除了,那么就会在client端出现这个错误。我前面确实删除过NFS服务端的/data目录,所以在再次挂载的时候出现了这个问题。那么应该怎么做呢?

解决方法:

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

刚好我在看老男孩linux的视频的时候学到一条可以解决这个问题的命令

umount

# umount -lf /mnt

# mount -t nfs 192.168.20.6:/data /mnt

# 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  1.2G   16G   8% /mnt

-lf /mnt

这样子就顺利解决了

mount.nfs: Stale file handle的解决方法的更多相关文章

  1. nfs客户端报错解决Stale file handle

    NFS故障: 场景:客户端挂载是好的.服务端磁盘满了,重新给挂了一快.客户端df -h nfs挂载消失. 客户端报错:Stale file handle 现象如下: [root@test63-spri ...

  2. [svc]nfs客户端报错解决Stale file handle

    NFS故障: 问题背景: 客户端挂载是好的.服务端磁盘满了,重新给挂了一快.客户端df -h 发现nfs挂载消失. 查看目录客户端报错:Stale file handle 现象如下: [root@n1 ...

  3. Linux系统Vsftp 传文件出现 553 Could Not Create File错误的解决方法

    解决方法: 登录出现了这个错误提示:553 Could not create file SELinux设置如下 查看SELinux设置 [root@localhost ~]# getsebool -a ...

  4. Ubuntu下 fatal error: Python.h: No such file or directory 解决方法

    参考: fatal error: Python.h: No such file or directory Ubuntu下 fatal error: Python.h: No such file or ...

  5. numa.h:No such file or directory 解决方法

    参考: numa.h:No such file or directory numa.h:No such file or directory 解决方法 Ubuntu: $ apt-get install ...

  6. Tex: The top-level auxiliary file: *.aux I couldn't open style file IEEEtran.bst 解决方法

    参考: Bibliography is not printed using Kile on Ubuntu Tex: The top-level auxiliary file: *.aux I coul ...

  7. salt-minion dead but pid file exists 正确解决方法

    说明: 看了网上很多关于alt-minion dead but pid file exists 的解决方法,千篇一律的写一个shell脚本 killproc salt-minion 见链接:http: ...

  8. Centos7解压.tar.bz2提示tar (child): bzip2: Cannot exec: No such file or directory解决方法

    Centos7解压.tar.bz2提示tar (child): bzip2: Cannot exec: No such file or directory解决方法 原因是因为该centos没有bzip ...

  9. nfs文件系统挂载错误及解决方法

    挂载nfs时出现如下错误: 原因: 没有安装nfs客户端相关 解决方法: apt-get install nfs-common 参考资料: http://askubuntu.com/questions ...

随机推荐

  1. Java List集合的介绍与常用方法

    List接口的介绍 List接口简介: java.util.List接口继承自Collection接口,是单列集合的一个重要分支,习惯性地会将实现了List接口的对象称为List集合. 在List集合 ...

  2. light题目讲解 7.25模拟赛T1

    心得:这一道题其实就是自己打暴力打出来的 没有想到正解真的就是暴力枚举 我的做法是这样的 就是枚举A字符串中长度为x的子串 看它是不是B串的子序列 接下来是我的绝望考试代码(100分AC) //lig ...

  3. 1z0-062 题库解析6

    You want execution of large database operations to suspend, and then resume, in the event of space a ...

  4. 一文熟练使用python mock

    mock作为python测试模拟对象工具,在单元测试当中使用较多,官方文档详细不够精简,这篇文章介绍mock常用的用法,以下为引用全文,留给自己和有需要的人查阅. https://realpython ...

  5. crawler碎碎念6 豆瓣爬取操作之获取数据

    import requests from lxml import etree s = requests.Session() for id in range(0,251,25): url ='https ...

  6. 20190925Java课堂记录(一)

    判断字符串是否回文 设计思想 利用递归,每次返回长度减二的字符串,最终返回结果 源程序代码 import java.util.Scanner; public class palindrome { st ...

  7. __init__.py在导包中起到的作用

    说明:__init__.py这个文件本人使用频率不高 例子: __init__.py文件作用:初始化这个包 1.v1.py def vi(): return 'views' 2.views->_ ...

  8. Qt Installer Framework翻译(3-0)

    终端用户使用流程 离线安装和在线安装对终端用户来说是相似的.安装程序将你的应用程序和维护工具一起打包,该工具由包管理器,更新程序和卸载程序组成.用户可以使用维护工具来添加,更新和删除组件.维护工具连接 ...

  9. JSON解析值富文本

    解析前端传递的JSON数据中可能如下 { "result": "<input value="Test" type="button&qu ...

  10. jquery的版本 纵多 , 各个版本的插件的融合 ,

    有些插件在哪些版本下没有 插件之间因为版本冲突 是得不偿失的事情