暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

GBase 8a GCDW存算分离主机版安装使用-扩容

原创 手机用户6666 2022-08-01
722

扩容调度和计算资源

本次将10.0.2.211扩容为调度和计算节点。管理集群gcware当前版本不支持扩容。

注意,扩容调度资源,需要停集群服务。

准备

除了标准要求,安装foundationdb客户端外,还要将foundationdb的配置文件复制到新节点.

 scp /etc/foundationdb/fdb.cluster 10.0.2.212:/etc/foundationdb/

以新节点能运行fdbcli的status正常为准,参考前面的部分。

扩容配置文件

与953扩容相同,注意要增加数据库登录的用户名和密码,genDBUser和genDBPwd。

[gbase@rh7_210 gcinstall]$ cat demo_2.options
installPrefix= /opt
coordinateHost = 10.0.2.211
coordinateHostNodeID = 211
dataHost = 10.0.2.211
existCoordinateHost =10.0.2.210
existDataHost =10.0.2.210
existGcwareHost=10.0.2.210
#gcwareHost = 10.0.2.211
#gcwareHostNodeID = 211
dbaUser = gbase
dbaGroup = gbase
dbaPwd = 'gbase1234'
GCDW_S3_BUCKET=gbase8a
GCDW_S3_ENDPOINT=http://10.0.2.181:9000
GCDW_S3_ACCESS_KEY_ID=gbase8a
GCDW_S3_SECRET_KEY=XXXXXXXX
GCDW_S3_REGION=''
gcluster_instance_name=gbase8a
instance_root_name=gbase
instance_root_password=YYYYYYYY
rootPwd = '111111'
genDBUser=gbase
genDBPwd=YYYYYYYY
#rootPwdFile = rootPwd.json
#characterSet = utf8
#dbPort = 5258
#sshPort = 22
[gbase@rh7_210 gcinstall]$

扩容过程

[gbase@rh7_210 gcinstall]$ ./gcinstall.py --silent=demo_2.options
*********************************************************************************
Thank you for choosing GBase product!
。。。。。
*********************************************************************************
Do you accept the above licence agreement ([Y,y]/[N,n])? ^Cy
*********************************************************************************
                     Welcome to install GBase products
*********************************************************************************
Environmental Checking on cluster nodes.
checking rpms ...
checking gconfig service
CoordinateHost:
10.0.2.211
DataHost:
10.0.2.211
gcluster_instance_name:
gbase8a
instance_root_name:
gbase
Are you sure to install GCluster on these nodes ([Y,y]/[N,n])? y
。。。。。
10.0.2.210              install cluster on host 10.0.2.210 successfully.
10.0.2.211              install cluster on host 10.0.2.211 successfully.
adding new coordinator nodes message to foundationdb
adding new coordinator nodes message to foundationdb successfully
update and sync configuration file...
sync cluster conf file ...
Starting all gcluster nodes ...
sync coordinator system tables ...
check database user and password ...
check database user and password successful
adding new datanodes to gcware ...
[gbase@rh7_210 gcinstall]$ 

查看扩容后的集群

可以看到2个调度集群,1个FreeNode待用。

[gbase@rh7_210 gcinstall]$ gcadmin
CLUSTER STATE:         ACTIVE
====================================
| GBASE GCWARE CLUSTER INFORMATION |
====================================
| NodeName |  IpAddress   | gcware |
------------------------------------
| gcware1  |  10.0.2.210  |  OPEN  |
------------------------------------
====================================================
|      GBASE COORDINATOR CLUSTER INFORMATION       |
====================================================
|   NodeName   | IpAddress  | gcluster | DataState |
----------------------------------------------------
| coordinator1 | 10.0.2.210 |   OPEN   |     0     |
----------------------------------------------------
| coordinator2 | 10.0.2.211 |   OPEN   |     0     |
----------------------------------------------------
=======================================
|     GBASE WAREHOUSE INFORMATION     |
=======================================
|    WhName    |       comment        |
---------------------------------------
|    testwh    | a warehouse for test |
---------------------------------------
===========================================================
|        GBASE CLUSTER FREE DATA NODE INFORMATION         |
===========================================================
| NodeName  | IpAddress  | gnode | syncserver | DataState |
-----------------------------------------------------------
| FreeNode1 | 10.0.2.211 | OPEN  |    OPEN    |     0     |
-----------------------------------------------------------
1 warehouse: testwh
2 coordinator node
1 free data node

扩容warehouse

通过向现有warehouse增加节点来完成扩容过程。请参考后面扩容计算资源的对应章节。


扩容计算资源

在已有2个调度节点,2个计算节点的情况下,只扩容10.0.2.212为纯计算资源。前置要求一样,特别是foundationdb的客户端和其配置文件。参考前面准备章节。

配置文件

只增加了dataHost,其它的将现有的节点写上去就行了。

[gbase@rh7_210 gcinstall]$ cat demo_3.options
installPrefix= /opt
coordinateHost =
coordinateHostNodeID = 211
dataHost = 10.0.2.212
existCoordinateHost =10.0.2.210,10.0.2.211
existDataHost =10.0.2.210,10.0.2.211
existGcwareHost=10.0.2.210
#gcwareHost = 10.0.2.211
#gcwareHostNodeID = 211
dbaUser = gbase
dbaGroup = gbase
dbaPwd = 'gbase1234'
GCDW_S3_BUCKET=gbase8a
GCDW_S3_ENDPOINT=http://10.0.2.181:9000
GCDW_S3_ACCESS_KEY_ID=gbase8a
GCDW_S3_SECRET_KEY=XXXXXXXX
GCDW_S3_REGION=''
gcluster_instance_name=gbase8a
instance_root_name=gbase
instance_root_password=YYYYYYYY
rootPwd = '111111'
genDBUser=gbase
genDBPwd=YYYYYYYY
#rootPwdFile = rootPwd.json
#characterSet = utf8
#dbPort = 5258
#sshPort = 22
[gbase@rh7_210 gcinstall]$

扩容过程

./gcinstall.py --silent=demo_3.options -a
。。。
10.0.2.212              install cluster on host 10.0.2.212 successfully.
update and sync configuration file...
sync cluster conf file ...
Starting all gcluster nodes ...
adding new datanodes to gcware ...
[gbase@rh7_210 gcinstall]$
[gbase@rh7_210 gcinstall]$ gcadmin
CLUSTER STATE:         ACTIVE
====================================
| GBASE GCWARE CLUSTER INFORMATION |
====================================
| NodeName |  IpAddress   | gcware |
------------------------------------
| gcware1  |  10.0.2.210  |  OPEN  |
------------------------------------
====================================================
|      GBASE COORDINATOR CLUSTER INFORMATION       |
====================================================
|   NodeName   | IpAddress  | gcluster | DataState |
----------------------------------------------------
| coordinator1 | 10.0.2.210 |   OPEN   |     0     |
----------------------------------------------------
| coordinator2 | 10.0.2.211 |   OPEN   |     0     |
----------------------------------------------------
================================================
|         GBASE WAREHOUSE INFORMATION          |
================================================
|    WhName    |            comment            |
------------------------------------------------
|   testwh2    | a warehouse for test to nodes |
------------------------------------------------
===========================================================
|        GBASE CLUSTER FREE DATA NODE INFORMATION         |
===========================================================
| NodeName  | IpAddress  | gnode | syncserver | DataState |
-----------------------------------------------------------
| FreeNode1 | 10.0.2.212 | OPEN  |    OPEN    |     0     |
-----------------------------------------------------------
1 warehouse: testwh2
2 coordinator node
1 free data node
[gbase@rh7_210 gcinstall]$

扩容warehouse

通过gcadmin addnodes将计算节点加入现有warehouse

创建配置文件

[gbase@rh7_210 gcinstall]$ cp gcChangeInfo.xml  gcChangeInfo_extend_212.xml
[gbase@rh7_210 gcinstall]$ vi gcChangeInfo_extend_212.xml
[gbase@rh7_210 gcinstall]$ cat gcChangeInfo_extend_212.xml
<?xml version="1.0" encoding="utf-8"?>
<servers>
    <rack>
        <node ip="10.0.2.212"/>
    </rack>
</servers>
[gbase@rh7_210 gcinstall]$

将新扩容的计算节点加入现有warehouse

[gbase@rh7_210 gcinstall]$ gcadmin addnodes gcChangeInfo_extend_212.xml testwh
gcadmin add nodes ...

flush statemachine success

gcadmin addnodes to wh [testwh] success

[gbase@rh7_210 gcinstall]$ gcadmin
CLUSTER STATE:         ACTIVE

====================================
| GBASE GCWARE CLUSTER INFORMATION |
====================================
| NodeName |  IpAddress   | gcware |
------------------------------------
| gcware1  |  10.0.2.210  |  OPEN  |
------------------------------------
====================================================
|      GBASE COORDINATOR CLUSTER INFORMATION       |
====================================================
|   NodeName   | IpAddress  | gcluster | DataState |
----------------------------------------------------
| coordinator1 | 10.0.2.210 |   OPEN   |     0     |
----------------------------------------------------
| coordinator2 | 10.0.2.211 |   OPEN   |     0     |
----------------------------------------------------
===================================================
|           GBASE WAREHOUSE INFORMATION           |
===================================================
|    WhName    |             comment              |
---------------------------------------------------
|    testwh    | a warehouse for test three nodes |
---------------------------------------------------

1 warehouse: testwh
2 coordinator node
0 free data node

[gbase@rh7_210 gcinstall]$ gcadmin showcluster wh testwh
CLUSTER STATE:         ACTIVE

===================================================
|           GBASE WAREHOUSE INFORMATION           |
===================================================
|    WhName    |             comment              |
---------------------------------------------------
|    testwh    | a warehouse for test three nodes |
---------------------------------------------------
===============================================================
|               WAREHOUSE DATA NODE INFORMATION               |
===============================================================
| NodeName |                IpAddress                 | gnode |
---------------------------------------------------------------
|  node1   |                10.0.2.210                | OPEN  |
---------------------------------------------------------------
|  node2   |                10.0.2.211                | OPEN  |
---------------------------------------------------------------
|  node3   |                10.0.2.212                | OPEN  |
---------------------------------------------------------------

3 data node

[gbase@rh7_210 gcinstall]$
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论