nfs客户端挂载出错 mount.nfs access denied by server while mounting
来源:互联网 发布:淘宝问答 编辑:程序博客网 时间:2024/05/29 11:12
1
2
3
4
5
[root@nginx-01 ~]
# cat /etc/issue
CentOS release 6.5 (Final)
Kernel \r on an \m
[root@nginx-01 ~]
# uname -r
2.6.32-431.el6.x86_64
1
2
3
4
[root@nginx-01 ~]
# yum -y install nfs-utils rpcbind
[root@nginx-01 ~]
# service rpcbind start
[root@nginx-01 ~]
# service nfs start
[root@nginx-01 ~]
# chkconfig nfs on
1
2
[root@nginx-01 ~]
# vim /etc/exports
/home/tomcat/img/
192.168.207.128(insecure,rw,
sync
,anonuid=500,anongid=500)
1
2
3
4
5
6
7
[root@nginx-01 ~]
# ss -tnlp | grep mountd
LISTEN 0 128 *:50288 *:*
users
:((
"rpc.mountd"
,5354,8))
LISTEN 0 128 *:33842 *:*
users
:((
"rpc.mountd"
,5354,16))
LISTEN 0 128 :::54325 :::*
users
:((
"rpc.mountd"
,5354,14))
LISTEN 0 128 *:43992 *:*
users
:((
"rpc.mountd"
,5354,12))
LISTEN 0 128 :::50657 :::*
users
:((
"rpc.mountd"
,5354,10))
LISTEN 0 128 :::33795 :::*
users
:((
"rpc.mountd"
,5354,18))
1
[root@nginx-01 ~]
# exportfs -r
1
2
3
[root@nginx-01 ~]
# showmount -e localhost
Export list
for
localhost:
/home/tomcat/img
192.168.207.128
1
2
3
4
root@rabbit-0:~
# cat /etc/issue
Debian GNU
/Linux
8 \n \l
root@rabbit-0:~
# uname -r
3.16.0-4-amd64
1
root@rabbit-0:~
# aptitude -y install nfs-client
1
2
3
root@rabbit-0:~
# showmount -e 192.168.207.129
Export list
for
192.168.207.129:
/home/tomcat/img
192.168.207.128
1
2
3
root@rabbit-0:~
# su - tomcat -c "mkdir ~/img"
root@rabbit-0:~
# ls /home/tomcat/img/ -ld
drwxr-xr-x 2 tomcat tomcat 4096 12月 4 15:23
/home/tomcat/img/
1
2
3
4
Dec 4 15:21:04 nginx-01 rpc.mountd[2178]: Version 1.2.3 starting
Dec 4 15:21:04 nginx-01 kernel: NFSD: Using
/var/lib/nfs/v4recovery
as the NFSv4 state recovery directory
Dec 4 15:21:04 nginx-01 kernel: NFSD: starting 90-second grace period
Dec 4 15:21:58 nginx-01 kernel: svc: 192.168.207.128, port=748: unknown version (4
for
prog 100003, nfsd)
1
2
3
4
5
6
7
[root@nginx-01 ~]
# vim /etc/sysconfig/nfs
# Optional arguments passed to rpc.nfsd. See rpc.nfsd(8)
# Turn off v2 and v3 protocol support
RPCNFSDARGS=
"-N 2 -N 3"
----->启用
# Turn off v4 protocol support
RPCNFSDARGS=
"-N 4"
---->启用
1
[root@nginx-01 ~]
# service nfs restart
1
2
root@rabbit-0:~
# mount -t nfs 192.168.207.129:/home/tomcat/img /home/tomcat/img -o proto=tcp -o nolock
root@rabbit-0:~
#
1
2
3
root@rabbit-0:~
# ls /home/tomcat/img/
#之前有两个文件存在
fstab
test
1
2
3
root@rabbit-0:~
# touch /home/tomcat/img/nfs.txt
root@rabbit-0:~
# ls -l /home/tomcat/img/nfs.txt
-rw-r--r-- 1 500 500 0 12月 4 15:24
/home/tomcat/img/nfs
.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
root@rabbit-0:~
# cat /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
mount
-t nfs 192.168.207.129:
/home/tomcat/img
/home/tomcat/img
-o proto=tcp -o nolock
exit
0
阅读全文
0 0
- nfs客户端挂载出错 mount.nfs access denied by server while mounting
- linux中nfs挂载问题(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 一个解决办法
- mount.nfs: access denied by server while mounting 一个解决办法
- 转备忘录 linux开启防火墙挂载nfs 与 mount.nfs: access denied by server while mounting 一个解决办法
- 商城项目实战20:使用FastDFS-Client客户端进行上传图片的测试
- node-oracledb安装记录
- Android 样式—— Shape篇
- Oracle数据库12c安装中出现的问题及解决
- const char*p, char const*p, char*const p,的区别问题
- nfs客户端挂载出错 mount.nfs access denied by server while mounting
- tablayout
- Mybatis学习第一天
- 进程与进程间的通信(一)——Aidl
- PostgreSQL 9.5 学习
- vim的常用命令
- YTU 3172: 最公正的裁判
- Andorid实现简单计算器功能
- 欢迎使用CSDN-markdown编辑器