0.实验前的环境检查与配置
[student@workstation ~]$ lab volopts setup
1.配置防火墙
firewall-cmd --add-service=rpc-bind --add-service=nfs放行服务。 firewall-cmd --runtime-to-permanent永久放行。
[root@servera ~]# firewall-cmd --add-service=rpc-bind --add-service=nfs
Warning: ALREADY_ENABLED
[root@servera ~]# firewall-cmd --runtime-to-permanent
success
2.设置选项
gluster volume set galactica server.root-squash on将server.root-squash选项开启。gluster volume set help可以查看全部的选项介绍帮忙材料。
stat-prefetch控制存储中元数据缓存的使用。
storage.batch-fsync-delay-usec控制聚合发送的请求数量。
auth.allow允许地址或主机的连接,以逗号分隔,开启后默认允许。
auth.reject拒绝地址或主机的连接,以逗号分隔,开启后默认为拒绝,与auth.allow同时开启时会覆盖auth.allow。
nfs.rpc-auth-allow允许地址或主机的连接,以逗号分隔,允许用户为特定导出卷组定义规则。
nfs.rpc-auth-reject拒绝地址或主机的连接,以逗号分隔,不允许用户为特定导出卷组定义规则。
nfs.disable用来关闭nfs服务。
features.read-only用来控制卷组只读。
server.root-squash对用户和用户组通过映射进行转换。
[root@servera ~]# gluster volume set galactica server.root-squash on
volume set: success
[root@servera ~]# gluster volume set help
[root@servera ~]# gluster volume set help | grep stat-prefetch -A2
Option: performance.stat-prefetch
Default Value: on
Description: enable/disable meta-data caching translator in the volume.
[