mount.nfs: access denied by server while mounting localhost:/home/xuwq/minilinux/system
来源:互联网 发布:搭接网络时间参数计算 编辑:程序博客网 时间:2024/06/06 18:44
在执行命令如下:
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 startingDec 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 warningDec 2 13:14:32 xuwq rpc.mountd[3635]: refused mount request from 127.0.0.1 for /home/xuwq/minilinux/system (/): not exportedDec 2 13:20:49 xuwq rpc.mountd[3635]: refused mount request from 127.0.0.1 for /home/xuwq/minilinux/system (/): not exportedDec 2 13:22:10 xuwq rpc.mountd[3635]: refused mount request from 127.0.0.1 for /home/xuwq/minilinux/system (/): not exportedDec 2 13:23:01 xuwq rpc.mountd[3635]: refused mount request from 127.0.0.1 for /root/gongxiang (/): not exportedDec 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_subtree_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_subtree_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% /devtmpfs 99888 5436 94452 6% /run/dev/sda1 37213744 13457468 21842832 39% /tmpfs 499432 148 499284 1% /dev/shmtmpfs 5120 4 5116 1% /run/locktmpfs 499432 0 499432 0% /sys/fs/cgroupcgmfs 100 0 100 0% /run/cgmanager/fstmpfs 99888 32 99856 1% /run/user/119tmpfs 99888 0 99888 0% /run/user/1000<span style="color:#FF0000;">localhost:/home/xuwq/minilinux/system 37213824 13457536 21842944 39% /mnt</span>
0 0
- mount.nfs: access denied by server while mounting localhost:/home/xuwq/minilinux/system
- 解决mount.nfs:access denied by server while mounting
- mount.nfs:access denied by server while mounting问题解决
- mount.nfs: access denied by server while mounting 一个解决办法
- mount.nfs:access denied by server while mounting **原因
- mount.nfs: access denied by server while mounting
- mount.nfs: access denied by server while mounting 一个解决办法
- mount.nfs: access denied by server while mounting 一个解决办法
- mount.nfs: access denied by server while mounting 一个解决办法
- mount.nfs: access denied by server while mounting 一个解决办法
- mount.nfs: access denied by server while mounting 解决办法
- mount.nfs: access denied by server while mounting 一个解决办法
- mount.nfs: access denied by server while mounting 一个解决办法
- mount.nfs: access denied by server while mounting
- mount.nfs: access denied by server while mounting 一个解决办法
- mount.nfs: access denied by server while mounting 一个解决办法
- ubuntu 使用nfs服务报错:mount.nfs:access denied by server while mounting
- [NFS服务器] mount.nfs: access denied by server while mounting问题解决
- 数据结构(Java)——Set和Map的应用
- Apache POI
- 299. Bulls and Cows
- 谨慎的覆盖clone
- 欢迎使用CSDN-markdown编辑器
- mount.nfs: access denied by server while mounting localhost:/home/xuwq/minilinux/system
- JMS简介与ActiveMQ实战
- Xmlns与targetNamespace 的区别
- Xcode不同版本的下载地址
- Hibernate的generator属性
- hdu 1258 深度优先搜索+步长+序列和+输出+虚拟节点+文件操作
- 【哈工大C语言作业实验题】:13-2作业
- 主题:Selenium 使用介绍
- Loadrunner 调用 Webservice 接口 进行 性能测试 时的方法及优化总结