在执行命令如下:

  1. mount -t nfs localhost:/home/xuwq/minilinux/system /mnt

出现的错误:

  1. mount.nfs: access denied by server while mounting localhost:/home/xuwq/minilinux/system

用以下的命令查看了日志,结果如下:

  1. root@xuwq:/var/log# cat /var/log/syslog | grep mount
  2. Dec 2 13:12:10 xuwq rpc.mountd[2987]: Caught signal 15, un-registering and exiting.
  3. Dec 2 13:12:10 xuwq rpc.mountd[3635]: Version 1.2.8 starting
  4. Dec 2 13:14:32 xuwq rpc.mountd[3635]: No host name given with /home/xuwq/minilinux/*(rw,sync,no_root_sqush) (ro,sync,wdelay,hide,nocrossmnt,secure,root_squash,no_all_squash,no_subtree_check,secure_locks,acl,anonuid=65534,anongid=65534), suggest *(ro,sync,wdelay,hide,nocrossmnt,secure,root_squash,no_all_squash,no_subtree_check,secure_locks,acl,anonuid=65534,anongid=65534) to avoid warning
  5. Dec 2 13:14:32 xuwq rpc.mountd[3635]: refused mount request from 127.0.0.1 for /home/xuwq/minilinux/system (/): not exported
  6. Dec 2 13:20:49 xuwq rpc.mountd[3635]: refused mount request from 127.0.0.1 for /home/xuwq/minilinux/system (/): not exported
  7. Dec 2 13:22:10 xuwq rpc.mountd[3635]: refused mount request from 127.0.0.1 for /home/xuwq/minilinux/system (/): not exported
  8. Dec 2 13:23:01 xuwq rpc.mountd[3635]: refused mount request from 127.0.0.1 for /root/gongxiang (/): not exported
  9. Dec 2 13:24:43 xuwq rpc.mountd[3635]: refused mount request from 127.0.0.1 for /home/xuwq/minilinux/system (/): <span style="color:#FF0000;">not exported</span><u></u>

通过日志可以看出是因为/home/xuwq/minilinux/system目录没有被共享,通过对比/etc/export文件找出了原因,原来是/etc/export文件中的共享目录输入错误。

错误的/etc/exports文件内容:

  1. # /etc/exports: the access control list for filesystems which may be exported
  2. # to NFS clients. See exports(5).
  3. #
  4. # Example for NFSv2 and NFSv3:
  5. # /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subt
  6. ree_check)
  7. #
  8. # Example for NFSv4:
  9. # /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
  10. # /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
  11. #
  12.  
  13. <span style="color:#FF0000;">/home/xuwq/minilinux/*(rw,sync,no_root_sqush)</span>

正确的/etc/exports文件:

  1. # /etc/exports: the access control list for filesystems which may be exported
  2. # to NFS clients. See exports(5).
  3. #
  4. # Example for NFSv2 and NFSv3:
  5. # /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subt
  6. ree_check)
  7. #
  8. # Example for NFSv4:
  9. # /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
  10. # /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
  11. #
  12.  
  13. <span style="color:#FF0000;">/home/xuwq/minilinux/system/*(rw,sync,no_root_sqush)</span>

红色字体的为我的 共享目录。

重启nfs服务后再次执行如下命令,挂在成功:

  1. mount -t nfs localhost:/home/xuwq/minilinux/system /mnt

使用df命令可以看到已挂在成功:

  1. root@xuwq:/var/log# df
  2. 文件系统 1K-块 已用 可用 已用% 挂载点
  3. udev 482076 0 482076 0% /dev
  4. tmpfs 99888 5436 94452 6% /run
  5. /dev/sda1 37213744 13457468 21842832 39% /
  6. tmpfs 499432 148 499284 1% /dev/shm
  7. tmpfs 5120 4 5116 1% /run/lock
  8. tmpfs 499432 0 499432 0% /sys/fs/cgroup
  9. cgmfs 100 0 100 0% /run/cgmanager/fs
  10. tmpfs 99888 32 99856 1% /run/user/119
  11. tmpfs 99888 0 99888 0% /run/user/1000
  12. <span style="color:#FF0000;">localhost:/home/xuwq/minilinux/system 37213824 13457536 21842944 39% /mnt</span>

mount.nfs: access denied by server while mounting localhost:/home/xuwq/minilinux/system的更多相关文章

  1. OS + RedHat 6.3 x64 NFS / mount.nfs: access denied by server while mounting

    s Linux mount/unmount命令(转) https://www.cnblogs.com/xd502djj/p/3809375.html 问题2:NFS配置项no_root_squash和 ...

  2. 解决mount.nfs: access denied by server while mounting错误

    环境:oraclelinux6.7 以前在centos服务器上安装nfs.挂载NFS都没出现问题,今天在oraclelinux上安装后,在客户端mount的时候报mount.nfs: access d ...

  3. mount.nfs: access denied by server while mounting <SERVER IP>:<SERVER PATH>

    root@hipchat:~# mount -t nfs 192.168.10.220:/hipchat/share /home/share/nfs mount.nfs: access denied ...

  4. nfs mount 故障 mount.nfs: access denied by server while mounting 10.0.100.208:/backup_usb

    生产环境: 服务端centos7.2,客户端:ubuntu16.04 挂载出现的故障: root@HDCtrl100:/mnt# mount -t nfs 10.0.100.208:/backup_u ...

  5. 挂载nfs提示:mount.nfs: access denied by server while mounting...

    出现此类错误原因大致为: 权限问题 防火墙机制问题 共享配置文件问题 搭建好nfs服务后,在client端进行挂载时,提示: [root@web1 media]# mount -t nfs 192.1 ...

  6. 解决mount.nfs: access denied by server while mounting

    在linux下进行挂载时突然出现: mount.nfs: access denied by server while mounting  第一感觉是读取文件权限不够,准备去更改一下挂载点的权限,但又考 ...

  7. nfs挂载出错:mount.nfs: access denied by server while mounting

    这个问题就是服务器不允许客户端去挂载,那么修改服务端的权限 $ sudo vi /etc/hosts.deny 文本末添加 ### NFS DAEMONS portmap: ALL lockd: AL ...

  8. mount.nfs: access denied by server while mounting

    在利用centos7系统搭建NFS服务时出现如下问题,百度后才解决 因为当时在服务器端vim /etc/exports 时, 我只写了 这一行 /home/wjs-nfs  *(ro) (没想到偷懒出 ...

  9. [转]ubuntu11.04配置nfs--解决mount.nfs: access denied问题

    总算通过了nfs的localhost测试. 配置很简单,下面摘自网络,并且整理下: 1 安装nfs #apt-get install nfs-kernel-server #apt-get instal ...

随机推荐

  1. IOS 开发过程中的 消息通知 小红点

    大致分为两种方法:系统方法和自定义方法 系统方法: 系统自带的方法可以显示具体的消息数量,这个就是苹果设备常见的小红点.实现思路如下: NSArray *tabBarItems = self.navi ...

  2. C# 之 HttpWebResponse类

    提供 WebResponse 类的 HTTP 特定的实现.       继承层次结构 ,"System.Object→System.MarshalByRefObject→System.Net ...

  3. Comparing Your Heros拓扑序列的数量

    给出N行英雄的比较,每一行包含两个英雄的名字,代表第一个英雄比第二个英雄更受欢迎. 英雄的数目不超过16个.问有多少种可能的受欢迎程度的序列满足N行英雄的比较. 由于只有英雄数目不超过16个,可以用二 ...

  4. [HTML] Google IE-x.js 解决IEx与W3C标准的冲突

    如果分别用IE5.IE6.IE7浏览同一个网页,将可能出现不一样的效果.这是它们之间对CSS的解析选择器不一样或错误和个别bug所导致.为了解决这些错误和bug.我们不得不找到一个能平衡于它们之间的解 ...

  5. 2.1.6 用ProtectX实现扫描的反击与追踪

    ProtectX是一款在用户连接网络时保护电脑的工具,可以同时监视20个端口,还可以帮助追踪攻击者的来源.一旦有人尝试连接到用户的电脑,它即可发出声音警告并将入侵者的IP位址记录下来,可以防止黑客入侵 ...

  6. 【Android 界面效果21】Android ViewPager使用详解

    这是谷歌官方给我们提供的一个兼容低版本安卓设备的软件包,里面包囊了只有在安卓3.0以上可以使用的api.而viewpager就是其中之一利用它,我们可以做很多事情,从最简单的导航,到页面菜单等等.那如 ...

  7. 使用Spring Security实现权限管理

    使用Spring Security实现权限管理 1.技术目标 了解并创建Security框架所需数据表 为项目添加Spring Security框架 掌握Security框架配置 应用Security ...

  8. Oracle数据库SQL优化

    SQL优化的最终目的是用户体验-在最短时间内让用户在页面数据.因此,执行时间是SQL优化的重要指标.在SQL查询中,I/O操作最占系统性能的.I/O操作量越大,时间越久.减少I/O操作量是优化SQL的 ...

  9. 18个有用的 .htaccess 文件使用技巧

    .htaccess 是 Web 服务器 Apache 中特有的一个配置文件,操控着服务器上的许多行为,我们可以利用它来做许多事情,例如:设置访问权限,网址重定向,等等.本文向大家展示18条 .htac ...

  10. 反射调用与Lambda表达式调用

    想调用一个方法很容易,直接代码调用就行,这人人都会.其次呢,还可以使用反射.不过通过反射调用的性能会远远低于直接调用——至少从绝对时间上来看的确是这样.虽然这是个众所周知的现象,我们还是来写个程序来验 ...