【我和openGauss的故事】为集群增加VIP

【我和openGauss的故事】为集群增加VIP

lqkitten openGauss 2023-08-04 18:01 发表于四川

openGauss发布以来,原生支持一主多备,RTO<10S,高可用性能大大增强。自openGauss3.0开始,更新了集群管理套件CM,易用性也得到了提高。但对于客户端来说,数据库端的切换,需要手工完成。

openGauss增加VIP后,客户端的连接就如连接ORACLE RAC的scan VIP一样,对于服务端的切换无感知。

要使用VIP,可以在安装前规划,在配置文件中指定,也可以对已安装的集群进行手工增加。下面就测试手工增加方法。

1.已安装集群的相关信息

数据库版本
 gsql -V
gsql (openGauss 5.0.0 build a07d57c3) compiled at 2023-03-29 03:37:13 commit 0 last mr

集群状态

[omm@db1 srv]$ cm_ctl query -Cv
[  CMServer State   ]
​
node   instance state
-----------------------
1  db1 1        Primary
2  db2 2        Standby
3  db3 3        Standby
​
[   Cluster State   ]
​
cluster_state   : Normal
redistributing  : No
balanced        : Yes
current_az      : AZ_ALL
​
[  Datanode State   ]
​
node   instance state            | node   instance state            | node   instance state
---------------------------------------------------------------------------------------------------------
1  db1 6001     P Primary Normal | 2  db2 6002     S Standby Normal | 3  db3 6003     S Standby Normal
​
​
[omm@db1 srv]$ gs_om -t status --detail
[  CMServer State   ]
​
node   node_ip         instance                                 state
-----------------------------------------------------------------------
1  db1 192.168.56.11   1    /opt/huawei/data/cmserver/cm_server Primary
2  db2 192.168.56.12   2    /opt/huawei/data/cmserver/cm_server Standby
3  db3 192.168.56.13   3    /opt/huawei/data/cmserver/cm_server Standby
​
[   Cluster State   ]
​
cluster_state   : Normal
redistributing  : No
balanced        : Yes
current_az      : AZ_ALL
​
[  Datanode State   ]
​
node   node_ip         instance                         state
-------------------------------------------------------------------------
1  db1 192.168.56.11   6001 /opt/huawei/install/data/dn P Primary Normal
2  db2 192.168.56.12   6002 /opt/huawei/install/data/dn S Standby Normal
3  db3 
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值