瀚高数据库
目录
环境
文档用途
详细信息
环境
系统平台:Linux x86-64 Red Hat Enterprise Linux 7
版本:4.5.7
文档用途
本文档用于db_ha集群所有节点重新开机操作步骤。
详细信息
1、查看集群状态streamingType=NONE为主库,ASYNC为异步流复制,SYNC为同步流复制,healthy=t节点状态正常。
复制代码
1
2
3
4
5
6
7
8
9
10
11
12/usr/local/db_ha/bin/db_ha select -f /usr/local/db_ha/conf/db_ha.conf connect monitor success cluster num = 3 secondary monitor is normal nodeip=192.168.80.228,nodetype=PRIMARY,replicationName=ha228 streamingType=NONE streamingState=none healthy=t agentState=NORMAL nodeip=192.168.80.229,nodetype=STANDBY,replicationName=ha229 streamingType=ASYNC streamingState=streaming healthy=t agentState=NORMAL nodeip=192.168.80.230,nodetype=STANDBY,replicationName=ha230 streamingType=ASYNC streamingState=streaming healthy=t agentState=NORMAL
2、查看主监控节点
复制代码
1
2
3
4
5
6ps -ef | grep -v grep|grep primary_monitor root 16238 1 5 17:42 ? 00:00:26 /usr/local/db_ha/bin/primary_monitor /usr/local/db_ha/conf/primary_monitor.conf Come_from_secondary root 16239 16238 0 17:42 ? 00:00:00 /usr/local/db_ha/bin/primary_monitor /usr/local/db_ha/conf/primary_monitor.conf Come_from_secondary
3、关机步骤,先关闭备节点,最后关闭主节点;关闭系统前先关闭本节点agent服务。
复制代码
1
2ha_ctl -a -f /usr/local/db_ha/conf/agent.conf stop
4、开机步骤,先开机主节点,再开机备节点和主监控节点。(主备监控不会开机自启,所以顺序不受影响)
5、主节点检查流复制状态
复制代码
1
2
3
4
5
6ps -ef | grep -v grep |grep walsend root 18264 17608 0 17:42 ? 00:00:00 postgres: walsender sysdba 192.168.80.229(44074) streaming 0/1D001158 root 18267 17608 0 17:42 ? 00:00:00 postgres: walsender sysdba 192.168.80.230(33520) streaming 0/1D001158
6、备节点检查流复制状态
复制代码
1
2
3ps -ef | grep -v grep |grep receiver root 3718 3711 0 5月24 ? 00:08:50 postgres: walreceiver streaming 0/1D0016C8
7、流复制状态正常之后,启动主监控。
复制代码
1
2/usr/local/db_ha/bin/primary_monitor /usr/local/db_ha/conf/primary_monitor.conf
8、检查集群状态
复制代码
1
2
3
4
5
6
7
8
9
10
11
12/usr/local/db_ha/bin/db_ha select -f /usr/local/db_ha/conf/db_ha.conf connect monitor success cluster num = 3 WARNING : secondary monitor is lost nodeip=192.168.80.228,nodetype=PRIMARY,replicationName=ha228 streamingType=NONE streamingState=none healthy=t agentState=NORMAL nodeip=192.168.80.229,nodetype=STANDBY,replicationName=ha229 streamingType=ASYNC streamingState=streaming healthy=t agentState=NORMAL nodeip=192.168.80.230,nodetype=STANDBY,replicationName=ha230 streamingType=ASYNC streamingState=streaming healthy=t agentState=NORMAL
注意:
主监控配置文件设置了备监控自启动,备监控无需手动启动
复制代码
1
2auto_start_new_secondary = on
最后
以上就是感性泥猴桃最近收集整理的关于db_ha集群所有节点重新开机的操作步骤的全部内容,更多相关db_ha集群所有节点重新开机内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复