在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. Spring(一)开篇

    目录 1.Spring 介绍 2.Spring 框架的演变 3.Spring 整体架构 Core Container Data Access/Integration Web AOP Test 最后 1 ...

  2. python的list()函数

    list()函数将其它序列转换为 列表 (就是js的数组). 该函数不会改变   其它序列 效果图一: 代码一: # 定义一个元组序列 tuple_one = (123,','abc') print( ...

  3. map + 前缀和

    B. Balanced Substring time limit per test 1 second memory limit per test 256 megabytes input standar ...

  4. 点分治 (等级排) codeforces 321C

    Now Fox Ciel becomes a commander of Tree Land. Tree Land, like its name said, has n cities connected ...

  5. Redis高可用方案-哨兵与集群

    Redis高可用方案 一.名词解释   二.主从复制 Redis主从复制模式可以将主节点的数据同步给从节点,从而保障当主节点不可达的情况下,从节点可以作为 后备顶上来,并且可以保障数据尽量不丢失(主从 ...

  6. 曹工说Spring Boot源码(11)-- context:component-scan,你真的会用吗(这次来说说它的奇技淫巧)

    写在前面的话 相关背景及资源: 曹工说Spring Boot源码(1)-- Bean Definition到底是什么,附spring思维导图分享 曹工说Spring Boot源码(2)-- Bean ...

  7. python爬虫——selenium+firefox使用代理

    本文中的知识点: python selenium库安装 firefox geckodriver的下载与安装 selenium+firefox使用代理 进阶学习 搭建开发环境: selenium库 fi ...

  8. [bzoj1297] [洛谷P4159] [SCOI2009] 迷路

    Description windy在有向图中迷路了. 该有向图有 N 个节点,windy从节点 0 出发,他必须恰好在 T 时刻到达节点 N-1. 现在给出该有向图,你能告诉windy总共有多少种不同 ...

  9. influxdb的命令们

    InfluxDB是一个开源的时序数据库,使用GO语言开发,特别适合用于处理和分析资源监控数据这种时序相关数据.而InfluxDB自带的各种特殊函数如求标准差,随机取样数据,统计数据变化比等,使数据统计 ...

  10. 玩转Django2.0---Django笔记建站基础五(模板)

    第五章 模板 Django作为web框架,需要一种很便利的方法去动态地生成HTML网页,因此有了模板这个概念.模板包含所需HTML的部分代码以及一些特殊语法 Django可以配置一个或多个模板引擎(甚 ...