mount.nfs: access denied by server while mounting localhost:/home/xuwq/minilinux/system
在执行命令如下:
mount -t nfs localhost:/home/xuwq/minilinux/system /mnt
出现的错误:
mount.nfs: access denied by server while mounting localhost:/home/xuwq/minilinux/system
用以下的命令查看了日志,结果如下:
root@xuwq:/var/log# cat /var/log/syslog | grep mount
Dec 2 13:12:10 xuwq rpc.mountd[2987]: Caught signal 15, un-registering and exiting.
Dec 2 13:12:10 xuwq rpc.mountd[3635]: Version 1.2.8 starting
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
Dec 2 13:14:32 xuwq rpc.mountd[3635]: refused mount request from 127.0.0.1 for /home/xuwq/minilinux/system (/): not exported
Dec 2 13:20:49 xuwq rpc.mountd[3635]: refused mount request from 127.0.0.1 for /home/xuwq/minilinux/system (/): not exported
Dec 2 13:22:10 xuwq rpc.mountd[3635]: refused mount request from 127.0.0.1 for /home/xuwq/minilinux/system (/): not exported
Dec 2 13:23:01 xuwq rpc.mountd[3635]: refused mount request from 127.0.0.1 for /root/gongxiang (/): not exported
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文件内容:
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subt
ree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
# <span style="color:#FF0000;">/home/xuwq/minilinux/*(rw,sync,no_root_sqush)</span>
正确的/etc/exports文件:
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subt
ree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
# <span style="color:#FF0000;">/home/xuwq/minilinux/system/*(rw,sync,no_root_sqush)</span>
红色字体的为我的 共享目录。
重启nfs服务后再次执行如下命令,挂在成功:
mount -t nfs localhost:/home/xuwq/minilinux/system /mnt
使用df命令可以看到已挂在成功:
root@xuwq:/var/log# df
文件系统 1K-块 已用 可用 已用% 挂载点
udev 482076 0 482076 0% /dev
tmpfs 99888 5436 94452 6% /run
/dev/sda1 37213744 13457468 21842832 39% /
tmpfs 499432 148 499284 1% /dev/shm
tmpfs 5120 4 5116 1% /run/lock
tmpfs 499432 0 499432 0% /sys/fs/cgroup
cgmfs 100 0 100 0% /run/cgmanager/fs
tmpfs 99888 32 99856 1% /run/user/119
tmpfs 99888 0 99888 0% /run/user/1000
<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的更多相关文章
- 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和 ...
- 解决mount.nfs: access denied by server while mounting错误
环境:oraclelinux6.7 以前在centos服务器上安装nfs.挂载NFS都没出现问题,今天在oraclelinux上安装后,在客户端mount的时候报mount.nfs: access d ...
- 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 ...
- 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 ...
- 挂载nfs提示:mount.nfs: access denied by server while mounting...
出现此类错误原因大致为: 权限问题 防火墙机制问题 共享配置文件问题 搭建好nfs服务后,在client端进行挂载时,提示: [root@web1 media]# mount -t nfs 192.1 ...
- 解决mount.nfs: access denied by server while mounting
在linux下进行挂载时突然出现: mount.nfs: access denied by server while mounting 第一感觉是读取文件权限不够,准备去更改一下挂载点的权限,但又考 ...
- nfs挂载出错:mount.nfs: access denied by server while mounting
这个问题就是服务器不允许客户端去挂载,那么修改服务端的权限 $ sudo vi /etc/hosts.deny 文本末添加 ### NFS DAEMONS portmap: ALL lockd: AL ...
- mount.nfs: access denied by server while mounting
在利用centos7系统搭建NFS服务时出现如下问题,百度后才解决 因为当时在服务器端vim /etc/exports 时, 我只写了 这一行 /home/wjs-nfs *(ro) (没想到偷懒出 ...
- [转]ubuntu11.04配置nfs--解决mount.nfs: access denied问题
总算通过了nfs的localhost测试. 配置很简单,下面摘自网络,并且整理下: 1 安装nfs #apt-get install nfs-kernel-server #apt-get instal ...
随机推荐
- java中静态的代码块,静态变量,静态方法
简单了解一下java虚拟机--jvm几个内存区域: 方法区:在java的虚拟机中有一块专门用来存放已经加载的类信息.常量.静态变量以及方法代码的内存区域, 常量池:常量池是方法区的一部分,主要用来存放 ...
- JSON3-翻译(不当之处,请指正)
http://bestiejs.github.io/json3/JSON 3 显示了两个功能:stringify():序列化一个javaScript值为一个JSON,和parse():将一个json字 ...
- iOS 修改网络图片的大小 宽和高
//image宽和高 好用 NSString *strTemplateHTML = [NSString stringWithFormat:@"<html><head> ...
- C#之结构化异常处理
1.异常处理4要素 一个表示异常详细信息的类类型: 一个向调用者引发异常类实例的成员: 调用者的一段调用异常成员的代码块: 调用者的一段处理将要发生异常的代码块:
- 【Shell脚本学习11】Shell注释
以“#”开头的行就是注释,会被解释器忽略. sh里没有多行注释,只能每一行加一个#号.只能像这样: #-------------------------------------------- # 这是 ...
- 不错的jQuery图表插件 .
很多时候我们需要在网页中显示数据统计报表,从而能很直观地了解数据的走向,更好地帮助决策分析.今天就给大家分享几个个人觉得好用的jQuery图表插件,这几个图表插件使用起来非常方便,而且挺灵活的,相信大 ...
- JVM 运行时内存结构
1.JVM内存模型 JVM运行时内存=共享内存区+线程内存区 1).共享内存区 共享内存区=持久带+堆 持久带=方法区+其他 堆=Old Space ...
- UML类图中的六大关系:泛化、实现、依赖、关联、聚合、组合关系
UML定义的关系主要有:泛化.实现.依赖.关联.聚合.组合,这六种关系紧密程度依次加强,分别看一下 1.泛化 概念:泛化是一种一般与特殊.一般与具体之间关系的描述,具体描述建立在一般描述的基础之上,并 ...
- Spring学习总结二——SpringIOC容器二
一:指定bean的依赖关系 例如examplebean对象依赖examplebean1对象,那么在创建examplebean对象之前就 需要先创建examplebean1对象. 1:创建Example ...
- 转: android apk 防止反编译技术(1~5连载)
转: android apk 防止反编译技术 做android framework方面的工作将近三年的时间了,现在公司让做一下android apk安全方面的研究,于是最近就在网上找大量的资料来学习. ...