GBase8c单机版500升级步骤

GBase8c单机版500升级步骤

1、检查版本及状态
# 现版本为GBase8cV5 S5.0.0B09
[gbase@gbase8c ~]$ gsql -V
gsql (single_node GBase8cV5 S5.0.0B09 build 5054ff66) compiled at 2023-06-12 15:08:36 commit 0 last mr 182
[gbase@gbase8c ~]$ gs_om -t status --detail
[   Cluster State   ]

cluster_state   : Normal
redistributing  : No
current_az      : AZ_ALL

[  Datanode State   ]

    node   node_ip         port      instance                              state
------------------------------------------------------------------------------------------------
1  gbase8c 192.168.140.23  15400      6001 /opt/database/install/data/dn   P Primary Normal

在这里插入图片描述

2、上传新包,并解压
[root@gbase8c ~]# cd /opt/gbase8c_install/
[root@gbase8c gbase8c_install]# ls
GBase8cV5_S5.0.0B24_centos7.8_x86_64.tar.gz
[root@gbase8c gbase8c_install]# tar -xvf GBase8cV5_S5.0.0B24_centos7.8_x86_64.tar.gz
[root@gbase8c gbase8c_install]# tar -xf GBase8cV5_S5.0.0B24_CentOS_x86_64_om.tar.gz

在这里插入图片描述

3、拷贝旧的安装模板,重新预安装
[root@gbase8c gbase8c_install]# cp ../gbase/gbase.xml ./
[root@gbase8c gbase8c_install]# script/gs_preinstall -U gbase -G gbase -X gbase.xml
Parsing the configuration file.
Successfully parsed the configuration file.
Installing the tools on the local node.
Successfully installed the tools on the local node.
Setting host ip env
Successfully set host ip env.
Are you sure you want to create the user[gbase] (yes/no)? yes
Preparing SSH service.
Successfully prepared SSH service.
Checking OS software.
Successfully check os software.
Creating cluster's path.
Successfully created cluster's path.
Set and check OS parameter.
Setting OS parameters.
Successfully set OS parameters.
Set and check OS parameter completed.
Preparing CRON service.
Successfully prepared CRON service.
Setting user environmental variables.
Successfully set user environmental variables.
Setting the dynamic link library.
Successfully set the dynamic link library.
Setting Core file
Successfully set core path.
Setting pssh path
Successfully set pssh path.
Setting Cgroup.
Successfully set Cgroup.
Set ARM Optimization.
No need to set ARM Optimization.
Fixing server package owner.
Setting finish flag.
Successfully set finish flag.
Preinstallation succeeded.

在这里插入图片描述

4、执行升级,会自动停数据库(auto-upgrade就地升级)
[root@gbase8c ~]$ su - gbase
[gbase@gbase8c gbase8c_install]$ cd /opt/gbase8c_install/
[gbase@gbase8c gbase8c_install]$ gs_upgradectl -t auto-upgrade -X gbase.xml
Static configuration matched with old static configuration files.
Performing inplace rollback.
Rollback succeeded.
Checking upgrade environment.
Successfully checked upgrade environment.
Successfully started cluster.
Start to do health check.
Successfully checked cluster status.
Backing up current application and configurations.
Successfully backed up current application and configurations.
Stop cluster with gs_om successfully.
Backing up cluster configuration.
Successfully backup hotpatch config file.
Successfully backed up cluster configuration.
Installing new binary.
Restoring cluster configuration.
Successfully restored cluster configuration.
Successfully started cluster.
Start check CMS parameter.
Stop cluster with gs_om successfully.
Modifying the socket path.
Successfully modified socket path.
Successfully started cluster.
copy certs from /opt/database/install/app_5054ff66 to /opt/database/install/app_973db353.
Successfully copy certs from /opt/database/install/app_5054ff66 to /opt/database/install/app_973db353.
Stop cluster with gs_om successfully.
Switch symbolic link to new binary directory.
Successfully switch symbolic link to new binary directory.
Successfully started cluster.
Stop cluster with gs_om successfully.
Successfully started cluster.
Waiting for the cluster status to become normal.
.
The cluster status is normal.
Start to do health check.
Successfully checked cluster status.
Upgrade main process has been finished, user can do some check now.
Once the check done, please execute following command to commit upgrade:

    gs_upgradectl -t commit-upgrade -X /opt/gbase8c_install/gbase.xml

[gbase@gbase8c gbase8c_install]$ gs_om -t status --detail
[   Cluster State   ]

cluster_state   : Normal
redistributing  : No
current_az      : AZ_ALL

[  Datanode State   ]

    node   node_ip         port      instance                              state
------------------------------------------------------------------------------------------------
1  gbase8c 192.168.140.23  15400      6001 /opt/database/install/data/dn   P Primary Normal

在这里插入图片描述

5、执行命令提交升级
[gbase@gbase8c gbase8c_install]$ gs_upgradectl -t commit-upgrade -X /opt/gbase8c_install/gbase.xml
NOTICE: Start to commit binary upgrade.
Start to check whether can be committed.
Can be committed.
Start to set commit flag.
Set commit flag succeeded.
Start to do operations that cannot be rollback.
Cancel the upgrade status succeeded.
Start to clean temp files for upgrade.
Clean up backup catalog files.
Successfully cleaned old install path.
Stop cluster with gs_om successfully.
Successfully started cluster.
Clean temp files for upgrade succeeded.
NOTICE: Commit binary upgrade succeeded.

在这里插入图片描述

6、检查版本及状态
[gbase@gbase8c ~]$ gsql -V
gsql (single_node GBase8cV5 S5.0.0B24 build 973db353) compiled at 2024-03-01 13:42:35 commit 0 last mr 484
[gbase@gbase8c ~]$ gs_om -t status --detail
[   Cluster State   ]

cluster_state   : Normal
redistributing  : No
current_az      : AZ_ALL

[  Datanode State   ]

    node   node_ip         port      instance                              state
------------------------------------------------------------------------------------------------
1  gbase8c 192.168.140.23  15400      6001 /opt/database/install/data/dn   P Primary Normal

在这里插入图片描述

  • 8
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值