openGauss修改CM集群某个节点IP

文章详细记录了在OpenGauss数据库集群环境下,如何停止集群,修改主机IP,更新/etc/hosts文件,修复子用户互信,修改数据库配置文件(postgresql.conf和pg_hba.conf),以及重新生成和处理静态配置文件,最终成功启动集群的过程。

说明

环境信息

#操作系统信息
[omm@testosa ~]$ arch 
x86_64
[omm@testosa ~]$ uname -a
Linux testosa 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
[omm@testosa ~]$ cat /etc/os-release 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
 
[omm@testosa ~]$ cat /etc/redhat-release 
CentOS Linux release 7.6.1810 (Core) 
[omm@testosa ~]$ 


#集群信息
[omm@testosa ~]$ cm_ctl query -Cvdip
[  CMServer State   ]

node       node_ip         instance                           state
---------------------------------------------------------------------
1  testosa 192.168.1.80    1    /opengauss/cmserver/cm_server Primary
2  testosb 192.168.1.81    2    /opengauss/cmserver/cm_server Standby
3  testosc 192.168.1.82    3    /opengauss/cmserver/cm_server Standby
4  testosd 192.168.1.83    4    /opengauss/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  testosa 192.168.1.80    6001 12345  /opengauss/data/dn P Primary Normal
2  testosb 192.168.1.81    6002 12345  /opengauss/data/dn S Standby Normal
3  testosc 192.168.1.82    6003 12345  /opengauss/data/dn S Standby Normal
4  testosd 192.168.1.83    6004 12345  /opengauss/data/dn C Cascade Standby Normal
[omm@testosa ~]$ 


#版本信息
[omm@testosa ~]$ gs_ssh -c "gsql -d postgres -p 12345 -c \"select regexp_substr(version(),'.*\d{2} ') as version\""
Successfully execute command on all nodes.

Output:
[SUCCESS] testosa:
                              version                              
-------------------------------------------------------------------
 (openGauss 3.0.3 build 46134f73) compiled at 2022-12-30 20:48:06 
(1 row)

[SUCCESS] testosb:
                              version                              
-------------------------------------------------------------------
 (openGauss 3.0.3 build 46134f73) compiled at 2022-12-30 20:48:06 
(1 row)

[SUCCESS] testosc:
                              version                              
-------------------------------------------------------------------
 (openGauss 3.0.3 build 46134f73) compiled at 2022-12-30 20:48:06 
(1 row)

[SUCCESS] testosd:
                              version                              
-------------------------------------------------------------------
 (openGauss 3.0.3 build 46134f73) compiled at 2022-12-30 20:48:06 
(1 row)


[omm@testosa ~]$ 


[omm@testosa ~]$ gs_ssh -c "gaussdb -V"
Successfully execute command on all nodes.

Output:
[SUCCESS] testosa:
gaussdb (openGauss 3.0.3 build 46134f73) compiled at 2022-12-30 20:48:06 commit 0 last mr  
[SUCCESS] testosb:
gaussdb (openGauss 3.0.3 build 46134f73) compiled at 2022-12-30 20:48:06 commit 0 last mr  
[SUCCESS] testosc:
gaussdb (openGauss <
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值