返回首页

gbase数据、南大通用产品文档:GBase8a设置节点状态并清理feventlog

更新日期:2024年09月11日

检查节点状态,集群状态应为normal,Coordinator 节点状态正常,确认被替换节点
是纯Data 节点后设置被替换节点状态为unavailable 状态。
操作步骤

GBase 8a MPP Cluster 产品手册
4 管理员指南
文档版本953(2022-04-10)
南大通用数据技术股份有限公司
294
步骤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-04-10)
南大通用数据技术股份有限公司
295
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-04-10)
南大通用数据技术股份有限公司
296

要与 GBase 8s 一道安装 GBase 8s JDBC Driver,
对于您的特定操作系统,
请遵循 GBase 8s
安装指南 中的指导:

对于 UNIX™: 在 UNIX 和 Linux™ 上安装 GBase 8s 和客户机产品

对于 Windows™: 在 Windows 上安装 GBase 8s 和客户机产品
要单独安装 GBase 8s JDBC 驱动程序:

如果您从网站下载了 GBase 8s JDBC Driver .zip 文件,则请将文件提取至目录。

如果您正从 CD 安装驱动程序,则请将 CD 装入 CD-ROM 驱动器内。

获取帮助
启动调优程序之前,可以通过如下命令获取帮助信息:
gs_dbmind component xtuner --help
输出帮助信息结果如下:
usage: [-h] [--db-name DB_NAME] [--db-user DB_USER] [--port PORT] [--host HOST]
[--host-user HOST_USER]
[--host-ssh-port HOST_SSH_PORT] [-f DB_CONFIG_FILE] [-x TUNER_CONFIG_FILE]
[-v]
{train,tune,recommend}
X-Tuner: a self-tuning tool integrated by openGauss. positional arguments:
{train,tune,recommend}
Train a reinforcement learning model or tune database
by model. And also can recommend best_knobs according to your workload.
optional arguments:
-h, --help
show this help message and exit
-f DB_CONFIG_FILE, --db-config-file DB_CONFIG_FILE
You can pass a path of configuration file otherwise you should enter database information by
command arguments manually. Please see the template file share/server.json.template.

GBase 8c V5 开发者手册
南大通用数据技术股份有限公司
381
-x TUNER_CONFIG_FILE, --tuner-config-file TUNER_CONFIG_FILE This is the path of the
core configuration file of the X-Tuner. You can specify the path of the new configuration file.
The default path is xtuner.conf. You can modify the configuration file to control the tuning
process.
-v, --version show program's version number and exit
Database Connection Information:
--db-name DB_NAME The name of database where your workload running on.
--db-user DB_USER
Use this user to login your database. Note that the user must have
sufficient permissions.
--port PORT Use this port to connect with the database.
--host HOST The IP address of your database installation host.
--host-user HOST_USER
The login user of your database installation host.
--host-ssh-port HOST_SSH_PORT
The SSH port of your database installation host.