在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. 1、纯python编写学生信息管理系统

    1.效果图 2.python code: class studentSys(object): ''' _init_(self) 被称为类的构造函数或初始化方法, self 代表类的实例,self 在定 ...

  2. Spring Boot2 系列教程 (十四) | 统一异常处理

    如题,今天介绍 SpringBoot 是如何统一处理全局异常的.SpringBoot 中的全局异常处理主要起作用的两个注解是 @ControllerAdvice 和 @ExceptionHandler ...

  3. CAS是什么

    CAS是什么? 比较并交换 例子1: public class ABADemo1 { public static void main(String[] args) { AtomicInteger at ...

  4. __call__ 方法

    对象() 或 类()() 调用 __call__里面的方法 class Call: def __call__(self, *args, **kwargs): print("Hello __c ...

  5. centos7的新特性

    1.修改主机名方式改变 centos6在/etc/ centos7使用命令hostnamectl set-hostname 主机名2.修改时间方式改变3.查看IP地址ifconfig不再支持改用ip4 ...

  6. Firebase REST API

    use firebase and firesharp to do a Library management system . look github.com/ziyasal/FireSharp

  7. 插入数据值 设置标签属性的值 来自 精通ASP-NET-MVC-5-弗瑞曼

  8. 基于Bootstrap和Knockout.js的ASP.NET MVC开发实战 关于 拦截器的 学习 部分

    先贴一段: 下面贴代码: 上面这段代码呢,有几个点迷糊.可以找找看

  9. ASENET MVC 5 with Bootstrap and Knockout.js 第一弹

     A Basic Example Now that the Knockout library is installed, let’s get right to an example of using ...

  10. 时间序列数据库(TSDB)初识与选择

    时间序列数据库(TSDB)初识与选择 本文作者由 MageByte 团队的 「借来方向」编写,关注公众号 给你更多硬核技术 背景 这两年互联网行业掀着一股新风,总是听着各种高大上的新名词.大数据.人工 ...