rocks 集群 手动安装挂载 nas存储

nas挂载
nfs 是一种网络文件系统,需要依赖rpc进行过程调度

注意nfs只验证id,验证用户名,并且只能在类unix os上进行文件共享服务,由于它的脆弱的验证机制,所以不适宜在internet上工作,在内网使用是非常可行的。

nfs服务端需要确定这两个包正确安装 nfs-utils rpcbind

若是ubuntu服务器,则是nfs-common,nfs-kernel-server两个包,rpcbind是默认安装的。

yum -y install nfs-utils rpcbind
编辑共享目录配置文件 /etc/exports
/export/data1  10.1.1.0/24(rw,async,no_root_squash) 


参数:ro表示只读,rw表示可读写,sync同步写*即同时写入内存和硬盘,async异步*暂存于内存,no_root_squash表示如果客户端连接过来的用户是root,则对服务端的目录同样是root权限****请不要开启,好危险的,root_squash表示客户端是root则将其转为匿名用户的权限***建议开启。

启动nfs服务,并设为开机自启动
systemctl start rpcbind.service		#或则 systemctl start rpcbind
systemctl start nfs-server.service		#或则 systemctl start nfs
#设置开机启动
systemctl enable rpcbind.service 
systemctl enable nfs-server.service
配置防火墙,放行响应端口或服务
firewall-cmd --permanent --add-service=nfs
firewall-cmd --permanent --add-service=rpc-bind
firewall-cmd --permanent --add-service=mountd
firewall-cmd --reload
firewall-cmd --list-all		#查看firewalld方向的资源
客户端挂载
showmount -e 10.1.1.2 # 查看nfs服务端的可用挂载点


https://blog.csdn.net/weixin_62668932/article/details/121845010



  • 发表于 2022-02-11 13:53
  • 阅读 ( 1240 )
  • 分类:linux

相关问题

0 条评论

请先 登录 后评论
omicsgene
omicsgene

生物信息

654 篇文章

作家榜 »

  1. omicsgene 654 文章
  2. 安生水 325 文章
  3. Daitoue 167 文章
  4. 生物女学霸 120 文章
  5. 红橙子 78 文章
  6. CORNERSTONE 72 文章
  7. rzx 67 文章
  8. xun 66 文章