RH236配置IP故障转移–配置NFS Ganesha
本章节学习配置NFS Ganesha解决高可用问题。
RHCA专栏地址:https://blog.youkuaiyun.com/qq_41765918/category_11532281.html
文章目录
-
- RH236配置IP故障转移--配置NFS Ganesha
- 章节实验
-
-
- 1. 在serverc和serverd上安装所需的软件,并在这些机器上的防火墙上打开此设置所需的任何端口。
- 2. 停止ctdbmeta卷,然后在serverc和serverd上设置相关的启动和停止触发程序,以便为CTDB使用ctdbmeta卷。还为两个节点上的Samba启用集群。
- 3. 启动ctdbmeta卷,然后配置 CTDB使用您的serverc和serverd系统进行iP故障转移,使用172.25.250.18/24作为浮动iP地址。
- 4. 确保使用Samba导出custdata卷。记住为smbuser用户设置一个redhat Samba密码。
- 5. 在您的workstation系统上,使用Samba通过浮动IP地址在/mnt/custdata上持久地挂载custdata卷。
- 6. 脚本评分
- 7. 重置环境
-
- 总结
NFS-Ganesha特征
NFS-ganesha是NFS的用户模式文件服务器。它支持NFSv3、NFSv4、NFSv4.1和pNFS(作为技术预览)。使用Corosync和Pacemaker提供的集群基础设施,NFS-Ganesha可以实现高可用性。
Red Hat Gluster存储的内置NFS服务器只支持NFSv3。如果需要NFSv4、Kerberos身份验证或加密,或者IP故障转移,管理员应该使用NFS-Ganesha。
重要:NFS-Ganesha不能与内置的NFSv3服务器同时运行。应该在所有将运行NFS- ganesha的节点上禁用NFS。
可参考官网进行导出的学习:
https://www.gluster.org/glusterfs-and-nfs-ganesha-integration/
https://docs.gluster.org/en/latest/Administrator-Guide/NFS-Ganesha-GlusterFS-Integration/
课本练习(以练习来进行了解)
[root@workstation ~]# lab ganesha setup
1. 在servera和serverb上安装所需的包。
# systemctl stop glusterd
# killall glusterfs
# killall glusterfsd
# yum -y install glusterfs-ganesha
2. 更新servera和serverb上的防火墙。
以允许pacemaker/corosync、NFS、portmapper以及mountd。
# firewall-cmd --permanent --add-service=high-availability --add-service=nfs --add-service=rpc-bind --add-service=mountd
success
# firewall-cmd --reload
success
3. 按要求修改配置文件。
[root@servera ~]# cp /etc/ganesha/ganesha-ha.conf.sample /etc/ganesha/ganesha-ha.conf
[root@servera ~]# vim /etc/ganesha/ganesha-ha.conf
[root@servera ~]# egrep -v ^# /etc/ganesha/ganesha-ha.conf
HA_NAME="gls-ganesha"
HA_VOL_SERVER="servera"
HA_CLUSTER_NODES="servera.lab.example.com,serverb.lab.example.com"
VIP_servera_lab_example_com="172.25.250.16"
VIP_serverb_lab_example_com="172.25.250.17"
[root@servera ~]# scp /etc/ganesha/ganesha-ha.conf serverb:/etc/ganesha/
4. 按要求设置集群。
通过启用正确的服务、设置集群用户密码和彼此进行身份验证,准备好servera和serverb作为集群成员。
# systemctl enable pacemaker.service
Created symlink from /etc/systemd/system/multi-user.target.wants/pacemaker.service to /usr/lib/systemd/system/pacemaker.service.
# systemctl enable pcsd.service
Created symlink from /etc/systemd/system/multi-user.target.wants/pcsd.service to /usr/lib/systemd/system/pcsd.service.
# systemctl start pcsd.service
# echo redhat | passwd --stdin hacluster
Changing password for user hacluster.
passwd: all authentication tokens updated successfully.
从servera系统,验证所有节点之间的pc通信。
[root@servera ~]# pcs cluster auth -u hacluster -p redhat servera.lab.example.com serverb.lab.example.com
servera.lab.example.com: Authorized
serverb.lab.example.com: Authorized

最低0.47元/天 解锁文章
7052

被折叠的 条评论
为什么被折叠?



