检查节点状态,集群状态应为normal,Coordinator 节点状态正常,确认被替换节点
是纯Data 节点后设置被替换节点状态为unavailable 状态。
操作步骤
GBase 8a MPP Cluster 产品手册
4 管理员指南
文档版本953(2022-09-15)
南大通用数据技术股份有限公司
298
步骤1:检查节点状态,集群状态应为normal,Coordinator 节点状态正常,被替换
的节点为DATA NODE。
$gcadmin showcluster vc vc1
CLUSTER STATE:
ACTIVE
VIRTUAL CLUSTER MODE:
NORMAL
=======================================================
|
GBASE VIRTUAL CLUSTER INFORMATION
|
=======================================================
|
VcName
| DistributionId |
comment
|
-------------------------------------------------------
|
vc1
|
1
| comment message vc1 |
-------------------------------------------------------
=========================================================================
==========
|
VIRTUAL CLUSTER DATA NODE INFORMATION
|
=========================================================================
==========
| NodeName |
IpAddress
| DistributionId |
gnode
|syncserver|DataState |
-----------------------------------------------------------------------------------
|
node1
| 172.168.83.11
|
1
|
OPEN
|
OPEN
|
0
|
-----------------------------------------------------------------------------------
|
node2
| 172.168.83.12
|
1
|
OPEN
|
OPEN
|
0
|
-----------------------------------------------------------------------------------
|
node3
| 172.168.83.15
|
1
|
OPEN
|
OPEN
|
0
|
-----------------------------------------------------------------------------------
3 data node
步骤2:
设置被替换节点状态为unavailable:
在操作系统的DBA 用户
(demo.options
文件中dbauser 参数指定的用户)下运行gcadmin setnodestate 命令设置要替换的节
点状态为unavailable。
$ gcadmin setnodestate 172.168.83.15 unavailable
after set node state into unavailable,can not set the state into normal,
must run gcadmin replacenodes to replace this node ,after that command node state can return into
normal.
you realy want to set node state into unavailable(yes or no)?
yes
get node data state by ddl fevent log start ......
get node data state by ddl fevent log end ......
get node data state by dml fevent log start ......
get node data state by dml fevent log end ......
get node data state by dml storage fevent log start ......
get node data state by dml storage fevent log end ......
GBase 8a MPP Cluster 产品手册
4 管理员指南
文档版本953(2022-09-15)
南大通用数据技术股份有限公司
299
check data server node data state by fevent log start ......
check data server node data state by fevent log end ......
set node [172.168.83.15] state to unavailable successful
查看集群状态:
$gcadmin showcluster vc vc1
CLUSTER STATE:
ACTIVE
VIRTUAL CLUSTER MODE:
NORMAL
=======================================================
|
GBASE VIRTUAL CLUSTER INFORMATION
|
=======================================================
|
VcName
| DistributionId |
comment
|
-------------------------------------------------------
|
vc1
|
1
| comment message vc1 |
-------------------------------------------------------
=========================================================================
==========
|
VIRTUAL CLUSTER DATA NODE INFORMATION
|
=========================================================================
==========
| NodeName |
IpAddress
| DistributionId |
gnode
|syncserver|DataState |
-----------------------------------------------------------------------------------
|
node1
| 172.168.83.11
|
1
|
OPEN
|
OPEN
|
0
|
-----------------------------------------------------------------------------------
|
node2
| 172.168.83.12
|
1
|
OPEN
|
OPEN
|
0
|
-----------------------------------------------------------------------------------
|
node3
| 172.168.83.15
|
1
| UNAVAILABLE |
|
|
-----------------------------------------------------------------------------------
3 data node
步骤3:删除被替换节点的feventlog。
$ gcadmin rmfeventlog 172.168.83.15
after rmfeventlog 172.168.83.15, fevent log will be removed, must run gcadmin
replacenodes to replace this node.
you realy want to remove node 172.168.83.15 fevent log(yes or no)?
yes
delete ddl event log on node 172.168.83.15 start
delete ddl event log on node 172.168.83.15 end
delete dml event log on node 172.168.83.15 start
delete dml event log on node 172.168.83.15 end
delete dml storage event log on node 172.168.83.15 start
delete dml storage event log on node 172.168.83.15 end
GBase 8a MPP Cluster 产品手册
4 管理员指南
文档版本953(2022-09-15)
南大通用数据技术股份有限公司
300