设为首页 加入收藏

TOP

阿里云服务器Ubuntu 14.04.2和centos7.5实现nfs挂载(二)
2019-09-03 01:49:45 】 浏览:43
Tags:阿里 服务器 Ubuntu 14.04.2 centos7.5 实现 nfs 挂载
   100227    3   tcp   2049  nfs_acl

    100003    3   udp   2049  nfs

    100003    4   udp   2049  nfs

    100227    3   udp   2049  nfs_acl

    100021    1   udp  31206  nlockmgr

    100021    3   udp  31206  nlockmgr

    100021    4   udp  31206  nlockmgr

    100021    1   tcp  31241  nlockmgr

    100021    3   tcp  31241  nlockmgr

    100021    4   tcp  31241  nlockmgr

客户端iptables配置策略如下(需要开放的端口请参考以上查询到的rpc进程信息)


iptables -I INPUT -p tcp -s x.x.x.x --dport 111 -j ACCEPT(x.x.x.x为服务端ip地址)
iptables -I INPUT -p udp -s x.x.x.x --dport 111 -j ACCEPT
iptables -I INPUT -p tcp -s x.x.x.x --dport 2049 -j ACCEPT
iptables -I INPUT -p udp -s x.x.x.x --dport 2049 -j ACCEPT

iptables -I INPUT -p tcp -s x.x.x.x --dport 20048 -j ACCEPT
iptables -I INPUT -p udp -s x.x.x.x --dport 20048 -j ACCEPT
iptables -I INPUT -p tcp -s x.x.x.x --dport 31206 -j ACCEPT
iptables -I INPUT -p udp -s x.x.x.x --dport 31206 -j ACCEPT

挂载命令:mount -t nfs 服务端ip地址:/home/nfs /home/nfs

执行df -h查询目录是否挂载成功

 

如系统版本较高导致挂载失败问题可以参考如下:

https://blog.csdn.net/qq_30951423/article/details/85890581

Ubuntu 18.04 nfs 默认为协议3和协议4,但是默认启动的是协议2的形式
如:/data/sharestore *(insecure,rw,no_root_squash,no_all_squash,async)
若想要求 nfs 支持协议2,就在/etc/default/nfs-kernel-server末尾加一句:
RPCNFSDOPTS="--nfs-version 2,3,4 --debug --syslog"

vim /etc/default/nfs-kernel-server
RPCNFSDOPTS="--nfs-version 2,3,4 --debug --syslog"

首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇fs.inotify.max_user_watches默认.. 下一篇mysql传统主从配置与主从监控

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目