GBase 8a从V86版本升级到V953版本操作记录

GBase 8a V86版本已经推出有6年以上,当前(2024-01-24)尚不支持直接升级到最新的V953版本,需要用V952版本中转一下。预计后续版本可能支持直接升级,到时会更新这个文章。本文介绍从V86升级到V952,最终升级到V953的操作过程。

环境

单节点862Buld43集群

[root@anolios86-1 ~]# gcadmin
CLUSTER STATE:  ACTIVE
CLUSTER MODE:   NORMAL

=================================================================
|             GBASE COORDINATOR CLUSTER INFORMATION             |
=================================================================
|   NodeName   |     IpAddress     |gcware |gcluster |DataState |
-----------------------------------------------------------------
| coordinator1 |    10.0.2.181     | OPEN  |  OPEN   |    0     |
-----------------------------------------------------------------
=============================================================
|              GBASE DATA CLUSTER INFORMATION               |
=============================================================
|NodeName |     IpAddress     |gnode |syncserver |DataState |
-------------------------------------------------------------
|  node1  |    10.0.2.181     | OPEN |   OPEN    |    0     |
-------------------------------------------------------------
[root@anolios86-1 ~]#

升级到V952版本

临时版本为9.5.2.43.5

停止V86集群

[root@anolios86-1 ~]# service gcware stop
Stopping GCMonit success!
Signaling GCRECOVER (gcrecover) to terminate:              [  OK  ]
Waiting for gcrecover services to unload:...               [  OK  ]
Signaling GCSYNC (gc_sync_server) to terminate:            [  OK  ]
Waiting for gc_sync_server services to unload:             [  OK  ]
Signaling GCLUSTERD  to terminate:                         [  OK  ]
Waiting for gclusterd services to unload:..........        [  OK  ]
Signaling GBASED  to terminate:                            [  OK  ]
Waiting for gbased services to unload:...                  [  OK  ]
Signaling GCWARE (gcware) to terminate:                    [  OK  ]
Waiting for gcware services to unload:.                    [  OK  ]
[root@anolios86-1 ~]

编写V952升级配置

[root@anolios86-1 gcinstall_95243.5]# cat demo.options
installPrefix= /opt
coordinateHost = 10.0.2.181
coordinateHostNodeID = 234,235,237
dataHost = 10.0.2.181
#existCoordinateHost =
#existDataHost =
dbaUser = gbase
dbaGroup = gbase
dbaPwd = 'gbase1234'
rootPwd = '111111'
#dbRootPwd = ''
#rootPwdFile = rootPwd.json
[root@anolios86-1 gcinstall_95243.5]#

升级到V952.43

[gbase@anolios86-1 gcinstall_95243.5]$ ./gcinstall.py  -U --silent=demo.options
*********************************************************************************
Thank you for choosing GBase product!

*********************************************************************************
Do you accept the above licence agreement ([Y,y]/[N,n])? y
*********************************************************************************
                     Welcome to install GBase products
*********************************************************************************
start gcadmin successfully on 10.0.2.181
Environmental Checking on gcluster nodes.
CoordinateHost:
10.0.2.181
DataHost:
10.0.2.181
Are you sure to upgrade GCluster on these nodes ([Y,y]/[N,n])?

10.0.2.181              Upgrade gcluster.
10.0.2.181              install cluster on host 10.0.2.181 successfully.
Starting all gcluster nodes...
Init Cluster Status Monit Plugin...
upgrade Successfully.
[gbase@anolios86-1 gcinstall_95243.5]$ source /home/gbase/.gbase_profile
[gbase@anolios86-1 gcinstall_95243.5]$ gcadmin
CLUSTER STATE:         ACTIVE
VIRTUAL CLUSTER MODE:  NORMAL

=============================================================
|           GBASE COORDINATOR CLUSTER INFORMATION           |
=============================================================
|   NodeName   | IpAddress  | gcware | gcluster | DataState |
-------------------------------------------------------------
| coordinator1 | 10.0.2.181 |  OPEN  |   OPEN   |     0     |
-------------------------------------------------------------
=========================================================================================================
|                                    GBASE DATA CLUSTER INFORMATION                                     |
=========================================================================================================
| NodeName |                IpAddress                 | DistributionId | gnode | syncserver | DataState |
---------------------------------------------------------------------------------------------------------
|  node1   |                10.0.2.181                |       1        | OPEN  |    OPEN    |     0     |
---------------------------------------------------------------------------------------------------------

[gbase@anolios86-1 gcinstall_95243.5]$ gccli

GBase client 9.5.2.43.5124aede18e. Copyright (c) 2004-2024, GBase.  All Rights Reserved.

gbase> select version();
+----------------------+
| version()            |
+----------------------+
| 9.5.2.43.5124aede18e |
+----------------------+
1 row in set (Elapsed: 00:00:00.00)

gbase> select * from testdb.td;
+---------------------+
| d                   |
+---------------------+
| 2024-01-04 10:47:49 |
+---------------------+
1 row in set (Elapsed: 00:00:00.05)

gbase> ^CAborted
[gbase@anolios86-1 gcinstall_95243.5]$

升级到V953版本

停服务,编写配置文件和升级,验证过程就一起放在下面了。

[gbase@anolios86-1 gcinstall_95243.5]$ gcluster_services all stop
Stopping GCMonit success!
Stopping gcrecover :                                       [  OK  ]
Stopping gcluster :                                        [  OK  ]
Stopping gcware :                                          [  OK  ]
Stopping gbase :                                           [  OK  ]
Stopping syncserver :                                      [  OK  ]
[gbase@anolios86-1 gcinstall_95243.5]$


[gbase@anolios86-1 gcinstall_95328.12]$ cat demo.options
installPrefix= /opt
coordinateHost = 10.0.2.181
coordinateHostNodeID = 181
dataHost = 10.0.2.181
#existCoordinateHost =
#existDataHost =
#existGcwareHost=
gcwareHost = 10.0.2.181
gcwareHostNodeID = 234,235,237
dbaUser = gbase
dbaGroup = gbase
dbaPwd = 'gbase1234'
rootPwd = '111111'
#dbRootPwd = ''
#rootPwdFile = rootPwd.json
#characterSet = utf8
#sshPort = 22
[gbase@anolios86-1 gcinstall_95328.12]$ ./gcinstall.py --silent=demo.options -U --generalDBUser=root --generalDBPwd=''
*********************************************************************************
Thank you for choosing GBase product!


*********************************************************************************
Do you accept the above licence agreement ([Y,y]/[N,n])? y
*********************************************************************************
                     Welcome to install GBase products
*********************************************************************************
Refreshing snapshot,please wait...
240124 09:44:10 [GCWARE] connect to 10.0.2.181 error:connect 10.0.2.181:5919 error, Connection refused

240124 09:44:11 [GCWARE] connect to 10.0.2.181 error:connect 10.0.2.181:5919 error, Connection refused

240124 09:44:12 [GCWARE] gbccs_service_connect fail to get process id

240124 09:44:12 [GCWARE] connect to 10.0.2.181 error:connect 10.0.2.181:5919 error, Connection refused

240124 09:44:13 [GCWARE] gbccs_service_connect fail to get process id

240124 09:44:13 [GCWARE] connect to 10.0.2.181 error:connect 10.0.2.181:5919 error, Connection refused

240124 09:44:14 [GCWARE] gbccs_service_connect fail to get process id

Connection gcware successfully,get all nodes status end.
Refresh snapshot successfully.
Environmental Checking on cluster nodes.
checking rpms ...
checking Cgconfig service
parse extendCfg.xml
CoordinateHost:
10.0.2.181
DataHost:
10.0.2.181
GcwareHost:
10.0.2.181
Are you sure to upgrade GCluster on these nodes ([Y,y]/[N,n])?

10.0.2.181              install gcware and cluster on host 10.0.2.181 successfully.
Starting all gcluster nodes ...
check database user and password ...
check database user and password successful
Init Cluster Status Monit Plugin...
upgrade Successfully.
[gbase@anolios86-1 gcinstall_95328.12]$

[gbase@anolios86-1 gcinstall_95328.12]$ source /home/gbase/.gbase_profile
[gbase@anolios86-1 gcinstall_95328.12]$ gcadmin
CLUSTER STATE:         ACTIVE
VIRTUAL CLUSTER MODE:  NORMAL

====================================
| GBASE GCWARE CLUSTER INFORMATION |
====================================
| NodeName |  IpAddress   | gcware |
------------------------------------
| gcware1  |  10.0.2.181  |  OPEN  |
------------------------------------
====================================================
|      GBASE COORDINATOR CLUSTER INFORMATION       |
====================================================
|   NodeName   | IpAddress  | gcluster | DataState |
----------------------------------------------------
| coordinator1 | 10.0.2.181 |   OPEN   |     0     |
----------------------------------------------------
=========================================================================================================
|                                    GBASE DATA CLUSTER INFORMATION                                     |
=========================================================================================================
| NodeName |                IpAddress                 | DistributionId | gnode | syncserver | DataState |
---------------------------------------------------------------------------------------------------------
|  node1   |                10.0.2.181                |       1        | OPEN  |    OPEN    |     0     |
---------------------------------------------------------------------------------------------------------

[gbase@anolios86-1 gcinstall_95328.12]$ gccli

GBase client 9.5.3.28.12509af275af. Copyright (c) 2004-2024, GBase.  All Rights Reserved.

gbase> select version();
+-----------------------+
| version()             |
+-----------------------+
| 9.5.3.28.12509af275af |
+-----------------------+
1 row in set (Elapsed: 00:00:00.00)

gbase> select * from testdb.td;
+---------------------+
| d                   |
+---------------------+
| 2024-01-04 10:47:49 |
+---------------------+
1 row in set (Elapsed: 00:00:00.02)

gbase> ^CAborted
[gbase@anolios86-1 gcinstall_95328.12]$

总结

从86版本,经过952的临时中转,二次升级到953版本。其中952的版本建议9.5.2.41以上。

后续如果8a支持从86直接升级到953,将更新本文,指向一个新的文章。