ClusterStorage-7-配置灾备地址( NFS Ganesha )

本文详细介绍了如何配置NFS Ganesha以实现高可用的灾备地址。首先,停止并卸载相关服务,然后安装glusterfs-ganesha软件包。接着配置防火墙,允许相关服务通过。之后,创建并编辑Ganesha配置文件,设置集群节点和虚拟IP。接着配置Pacemaker和pcs服务,创建hacluster用户,并授权集群节点。生成密钥文件并复制到所有节点,确保安全连接。启动glusterd服务并启用共享存储。在Ganesha配置中添加MNT_Port以配置端口。最后,启动NFS-Ganesha服务,启用ganesha功能,并配置挂载点进行测试。通过lab ganesha grade验证配置成功。
摘要由CSDN通过智能技术生成

0.实验前的环境检查与配置

[student@workstation ~]$ lab ganesha setup
 

1.配置环境

systemctl stop glusterd停止服务。killall glusterfs关闭进程。killall glusterfsd关闭进程。 yum -y install glusterfs-ganesha安装软件包。serverb参照servera操作。

[root@servera ~]# systemctl stop glusterd
[root@servera ~]# killall glusterfs
[root@servera ~]# killall glusterfsd

[root@servera ~]# yum -y install glusterfs-ganesha
[root@serverb ~]# systemctl stop glusterd
[root@serverb ~]# killall glusterfs
[root@serverb ~]# killall glusterfsd

[root@serverb ~]# yum -y install glusterfs-ganesha
 

2.配置防火墙

firewall-cmd --add-service放行服务。firewall-cmd --runtime-to-permanent让防火墙配置永久生效。serverb参照servera操作。

[root@servera ~]# firewall-cmd --add-service=high-availability \
> --add-service=nfs \
> --add-service=rpc-bind \
> --add-service=mountd
success
[root@servera ~]# firewall-cmd --runtime-to-permanent
success
[root@serverb ~]# firewall-cmd --add-service=high-availability \
> --add-service=nfs \
> --add-service=rpc-bind \
> --add-service=mountd
success
[root@serverb ~]# firewall-cmd --runtime-to-permanent
success
 

3.配置Ganesha

cp /etc/ganesha/ganesha-ha.conf{.sample,}从样本创建配置文件。 vim /etc/ganesha/ganesha-ha.conf编辑配置文件。grep -v ^# /etc/ganesha/ganesha-ha.conf查看配置文件。

[root@servera ~]# ll /etc/ganesha/ganesha*
-rw-r--r--. 1 root root 1170 Dec 16  2015 /etc/ganesha/ganesha.conf
-rw-r--r--. 1 root root  867 Feb  8  2016 /etc/ganesha/ganesha-ha.conf.sample
[root@servera ~]# cp /etc/ganesha/ganesha-ha.conf{.sample,}
[root@servera ~]# ll /etc/ganesha/ganesha*
-rw-r--r--. 1 root root 1170 Dec 16  2015 /etc/ganesha/ganesha.conf
-rw-r--r--. 1 root root  867 Jan 29 11:00 /etc/ganesha/ganesha-ha.conf
-rw-r--r--. 1 root root  867 Feb  8  2016 /etc/ganesha/ganesha-ha.conf.sample
[root@servera ~]# vim /etc/ganesha/ganesha-ha.conf
[root@servera ~]# grep -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/
The authenticity of host 'serverb (172.25.250.11)' can't be established.
ECDSA key fingerprint is f3:3a:20:c9:5a:cc:cc:f0:44:f7:00:90:03:18:b1:8d.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Perma

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值