在日常集群维护中,我们经常需要对现有 GBase 8A 集群进行扩容以满足业务增长需求。本文将详细介绍如何为现有集群添加 GNode 复合节点的完整操作流程。
环境准备
操作步骤
步骤 1:停止集群服务
首先需要在现有集群的所有节点上停止服务,确保扩容过程中数据一致性。
# 在所有现有节点上执行gcadmin all stop
步骤 2:配置新节点网络
新增机器并配置静态 IP,确保集群内各节点可以互相通信。
# 检查网络连通性[root@localhost gbase]# ping 172.16.5.172PING 172.16.5.172(172.16.5.172) 56(84) bytes of data.64 bytes from 172.16.5.172: icmp_seq=1 ttl=64 time=0.656 ms64 bytes from 172.16.5.172: icmp_seq=2 ttl=64 time=0.730 ms64 bytes from 172.16.5.172: icmp_seq=3 ttl=64 time=0.840 ms64 bytes from 172.16.5.172: icmp_seq=4 ttl=64 time=0.748 ms
操作截图示例:
步骤 3:系统环境配置
在新节点上完成必要的系统环境设置:
步骤 4:修改安装配置文件
编辑 demo.options 文件,为新节点进行正确配置:
# 新节点配置示例NEW_NODE_IP=172.16.5.178NODE_ROLE=gnodeCLUSTER_NAME=my_gcluster
安装过程中的关键交互确认:
Do you accept the above licence agreement([Y,y]/[N,n])? y*******************************************************Welcome to install GBase productsEnvironmental checking on cluster nodes.checking rpms...checking Cgconfig serviceCoordinateHost:172.16.5.178DataHost:172.16.5.178Are you sure to install Gcluster on these nodes{[Y,y]/[N,n]}? y
操作截图示例:
步骤 5:执行安装并加入集群
安装程序会自动完成软件部署和配置,安装成功后需要将新节点正式加入集群:
# 将节点加入集群gcadmin addNode --host=172.16.5.178 --role=gnode# 验证节点状态gcadmin show cluster
关键注意事项
验证扩容结果
扩容完成后,通过以下命令验证集群状态:
# 检查集群状态gcadmin all status# 验证节点连接gcadmin show nodes# 测试数据分布gbase -e "show distribution"
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69979120/viewspace-3103586/ ,如需转载,请注明出处,否则将追究法律责任。