菜单

服务器或客户端升级

下载

注意事项

  • 仅支持3.0.1及其之后的版本使用本升级工具
  • 本升级工具适用于完整包升级以及fix包升级;同时也适用于所有发行版本
  • 升级工具会自动备份当前unispace目录下所有内容
  • 如果当前安装目录下日志文件较大,建议将日志清空或者mv出来
  • 升级工具运行的目录需要有当前软件安装目录使用空间3倍以上的剩余空间
    • 如软件安装目录/opt/unispace的使用空间为2G,则运行升级工具的目录剩余空间至少为6G
  • 升级完成后不会自动清理升级目录下的备份文件,如有需要需手动清理
  • 安装包需与upgrade.sh位于同一级目录下
  • 以下步骤以使用3.0.1完整安装包升级为例

安装前准备

解压缩升级工具

复制代码
cd /pkg
tar -xf upgrade-3.0.1.tar

解压缩后会生成upgrade-3.0.1目录

复制代码
drwxrwxr-x 6 root  root         291  4月  3 10:45 upgrade-3.0.1
-rw-rw-r-- 1 coder coder      71680  4月  3 10:40 upgrade-3.0.1.tar

确认升级参数

upgrade-3.0.1目录中的upgrade.cfg文件配置了升级相关的参数

复制代码
root@z6g4:/pkgt/upgrade-3.0.1# cat upgrade.cfg
SUPPORTED_BASE_RELEASE_ID=10
SUPPORTED_BASE_RELEASE_VERSION=2.6
SUPPORTED_UPGRADE_ID=14
SUPPORTED_UPGRADE_VERSION=3.0.1
US_BASE_DIR=/opt/unispace
VENDOR=us
UPGRADE_TYPE=release

以下三个参数需要根据实际情况修改,其余参数每个发行版本为固定值,无需修改:

  • US_BASE_DIR:当前软件的安装目录,如果不是默认的/opt/unispace则需要填写实际的值
  • VENDOR:发行版本信息,us-通用版本;其他专用版本联系技术支持团队获取专用的升级包
  • UPGRADE_TYPE:本次升级使用的安装包:release-完整的发行包,包名不带fix;fix-补丁包,包名带fix

准备升级包

将安装包拷贝到升级目录下

复制代码
cp [xxx]-[server-or-agent]-3.0.1-[os]-[platform].tar upgrade-3.0.1
  • xxx:是upgrade.cfg中配置的VENDOR
  • server-or-agent:server-服务器升级包,agent-客户端和存储节点升级包
  • os:是操作系统值,如KylinOSV10

执行升级

需确认upgrade.sh与升级包位于同一目录下。

复制代码
drwxrwxr-x  2 root  root          53  4月  3 09:35 configs
-rwxrwxr-x  1 root  root           0  4月  3 09:35 console
-rwxrwxr-x  1 root  root       24128  4月  3 09:35 exec-fix.sh
-rwxrwxr-x  1 root  root       20732  4月  3 09:35 exec-release.sh
-rw-rw-r--  1 coder coder 1268096593  4月  3 09:59 us-server-3.0.1-KylinOSV10-x8664.tar
-rwxrwxr-x  1 root  root          20  4月  3 09:35 postsh.lst
-rwxrwxr-x  1 root  root          25  4月  3 09:35 postsql.lst
-rwxrwxr-x  1 root  root           0  4月  3 09:35 presh.lst
-rwxrwxr-x  1 root  root          37  4月  3 09:35 presql.lst
drwxrwxr-x  2 root  root          34  4月  3 09:35 scripts
drwxrwxr-x  2 root  root          83  4月  3 09:35 sqls
-rwxrwxr-x  1 root  root         180  4月  3 09:35 upgrade.cfg
-rw-r--r--  1 root  root        4949  4月  3 10:45 upgrade.log
-rwxrwxr-x  1 root  root         830  4月  3 09:35 upgrade.sh

执行升级脚本

复制代码
cd upgrade-3.0.1
./upgrade.sh

附录

管理节点升级输出

复制代码
Get UPGRADE_TYPE:release
Will upgrade release packages.
2025年 04月 03日 星期四 10:42:34 CST: Get supported base relase id:10
2025年 04月 03日 星期四 10:42:34 CST: Get supported upgrade id:14
2025年 04月 03日 星期四 10:42:34 CST: Get supported base release version:2.6
2025年 04月 03日 星期四 10:42:34 CST: Get supported upgrade version:3.0.1
2025年 04月 03日 星期四 10:42:34 CST: Get supported US_BASE_DIR:/opt/unispace
2025年 04月 03日 星期四 10:42:34 CST: Get VENDOR:us
2025年 04月 03日 星期四 10:42:34 CST: Get supported VENDOR:us
2025年 04月 03日 星期四 10:42:34 CST: Check unispace base folder under:/opt/unispace
2025年 04月 03日 星期四 10:42:34 CST: Detect installed launchd:/opt/unispace/bin/launchd
2025年 04月 03日 星期四 10:42:34 CST: Try to get installed agents on this server under:/opt/unispace !
2025年 04月 03日 星期四 10:42:34 CST: It's meta server!
2025年 04月 03日 星期四 10:42:34 CST: Try to stop service startup from:/opt/unispace !
2025年 04月 03日 星期四 10:42:34 CST: Shut down meta server service, please wait !
Stopping unispace server...
2025年 04月 03日 星期四 10:42:40 CST: Creat backup folder:/home/coder/upgrade-3.0.1/03.
2025年 04月 03日 星期四 10:42:40 CST: Backup folder:/opt/unispace to /home/coder/upgrade-3.0.1/03
2025年 04月 03日 星期四 10:43:08 CST: Dump current database to /home/coder/upgrade-3.0.1/03/init.sql
2025年 04月 03日 星期四 10:43:08 CST: Try to get current software version under:/opt/unispace:/opt/unispace/bin/launchd !
2025年 04月 03日 星期四 10:43:08 CST: Got current version uder:/opt/unispace:2.6.7
2025年 04月 03日 星期四 10:43:08 CST: Bins under base dir are expected version: 2.6.7 VS 2.6!
2025年 04月 03日 星期四 10:43:08 CST: Check upgrade packages !
2025年 04月 03日 星期四 10:43:08 CST: Create unpack foder:/home/coder/upgrade-3.0.1/unpack.
2025年 04月 03日 星期四 10:43:18 CST: Unpack packages for meta server
2025年 04月 03日 星期四 10:43:35 CST: Try to get upgrade version from upgrade package:/home/coder/upgrade-3.0.1 : /home/coder/upgrade-3.0.1/unpack/us-server-3.0.1/bin/launchd !
2025年 04月 03日 星期四 10:43:35 CST: Got upgrade version under:/home/coder/upgrade-3.0.1:3.0.1
2025年 04月 03日 星期四 10:43:35 CST: Bins under package are expected version: 3.0.1 VS 3.0.1!
2025年 04月 03日 星期四 10:43:35 CST: Try to upgrade meta server under:/opt/unispace from 2.6.7 to 3.0.1
2025年 04月 03日 星期四 10:43:35 CST: Check sql list for upgrading !
2025年 04月 03日 星期四 10:43:35 CST: Great! All sql files are detected !
2025年 04月 03日 星期四 10:43:35 CST: Start to execute pre-sqls
2025年 04月 03日 星期四 10:43:35 CST: Try to execute sql in file:/home/coder/upgrade-3.0.1/sqls/table_create_sys_db_auto_upgraded.sql
2025年 04月 03日 星期四 10:43:35 CST: SQL: /home/coder/upgrade-3.0.1/sqls/table_create_sys_db_auto_upgraded.sql executed !
2025年 04月 03日 星期四 10:43:35 CST: Succeed to execute pre-sqls, now upgrade bins!
2025年 04月 03日 星期四 10:43:35 CST: Try to upgrade meta server packages under:/opt/unispace
2025年 04月 03日 星期四 10:43:35 CST: Succeed to delete  tomcat under /opt/unispace !
2025年 04月 03日 星期四 10:43:35 CST: Succeed to delete  bins under /opt/unispace !
2025年 04月 03日 星期四 10:43:36 CST: Succeed to copy  tomcat under /home/coder/upgrade-3.0.1/unpack/us-server-3.0.1/tomcat/ to  /opt/unispace/tomcat/ !
2025年 04月 03日 星期四 10:43:37 CST: Succeed to copy  bins under /home/coder/upgrade-3.0.1/unpack/us-server-3.0.1/bin/ to  /opt/unispace/bin/ !
2025年 04月 03日 星期四 10:43:38 CST: Succeed to copy  unis_mn.sh under /home/coder/upgrade-3.0.1/unpack/us-server-3.0.1/ to  /opt/unispace/ !
2025年 04月 03日 星期四 10:43:38 CST: Succeed to upgrade bins, update config file now!
2025年 04月 03日 星期四 10:43:38 CST: All done, start service now!
2025年 04月 03日 星期四 10:43:38 CST: Try to start service startup from:/opt/unispace !
2025年 04月 03日 星期四 10:43:38 CST: Start  meta server service, please wait !
Stopping unispace server...
Starting unispace server...
Using CATALINA_BASE:   /opt/unispace/tomcat
Using CATALINA_HOME:   /opt/unispace/tomcat
Using CATALINA_TMPDIR: /opt/unispace/tomcat/temp
Using JRE_HOME:        /opt/unispace/tomcat/jre
Using CLASSPATH:       /opt/unispace/tomcat/bin/bootstrap.jar:/opt/unispace/tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS:
Tomcat started.
Starting unispace server [OK]
2025年 04月 03日 星期四 10:44:29 CST: Wait 60 seconds during upgrading the schema
2025年 04月 03日 星期四 10:45:29 CST: Start to execute post-sqls
2025年 04月 03日 星期四 10:45:29 CST: Try to execute sql in file:/home/coder/upgrade-3.0.1/sqls/table_update_version.sql
2025年 04月 03日 星期四 10:45:29 CST: SQL: /home/coder/upgrade-3.0.1/sqls/table_update_version.sql executed !
2025年 04月 03日 星期四 10:45:29 CST: ##########Succeed to upgrade meta server, please upgrade storage nodes and client nodes immediately!##########
2025年 04月 03日 星期四 10:45:29 CST: [~Succeed~]
2025年 04月 03日 星期四 10:45:29 CST: exit upgrade progrom now, clean up the unpack folder and the exit code is 0

客户端和存储节点升级输出

复制代码
Get UPGRADE_TYPE:release
Will upgrade release packages.
2025年 04月 03日 星期四 11:00:20 CST: Get supported base relase id:10
2025年 04月 03日 星期四 11:00:20 CST: Get supported upgrade id:14
2025年 04月 03日 星期四 11:00:20 CST: Get supported base release version:2.6
2025年 04月 03日 星期四 11:00:20 CST: Get supported upgrade version:3.0.1
2025年 04月 03日 星期四 11:00:20 CST: Get supported US_BASE_DIR:/home/coder/us-agent-2.6.8
2025年 04月 03日 星期四 11:00:20 CST: Get VENDOR:us
2025年 04月 03日 星期四 11:00:20 CST: Get supported VENDOR:us
2025年 04月 03日 星期四 11:00:20 CST: Check unispace base folder under:/home/coder/us-agent-2.6.8
2025年 04月 03日 星期四 11:00:20 CST: Detect installed launchd:/home/coder/us-agent-2.6.8/bin/launchd
2025年 04月 03日 星期四 11:00:20 CST: Try to get installed agents on this server under:/home/coder/us-agent-2.6.8 !
2025年 04月 03日 星期四 11:00:20 CST: It's not meta server because there is no tomcat folder under:/home/coder/us-agent-2.6.8!
2025年 04月 03日 星期四 11:00:20 CST: Try to stop service startup from:/home/coder/us-agent-2.6.8 !
2025年 04月 03日 星期四 11:00:20 CST: Shut down client and storage node service, please wait !
Stopping unispace server...
2025年 04月 03日 星期四 11:00:26 CST: Creat backup folder:/home/coder/upgrade-3.0.1/03.
2025年 04月 03日 星期四 11:00:26 CST: Backup folder:/home/coder/us-agent-2.6.8 to /home/coder/upgrade-3.0.1/03
2025年 04月 03日 星期四 11:00:29 CST: Try to get current software version under:/home/coder/us-agent-2.6.8:/home/coder/us-agent-2.6.8/bin/launchd !
2025年 04月 03日 星期四 11:00:29 CST: Got current version uder:/home/coder/us-agent-2.6.8:2.6.7
2025年 04月 03日 星期四 11:00:29 CST: Bins under base dir are expected version: 2.6.7 VS 2.6!
2025年 04月 03日 星期四 11:00:29 CST: Check upgrade packages !
2025年 04月 03日 星期四 11:00:29 CST: Create unpack foder:/home/coder/upgrade-3.0.1/unpack.
2025年 04月 03日 星期四 11:00:41 CST: Try to get upgrade version from upgrade package:/home/coder/upgrade-3.0.1 : /home/coder/upgrade-3.0.1/unpack/agent-3.0.1/bin/launchd !
2025年 04月 03日 星期四 11:00:41 CST: Got upgrade version under:/home/coder/upgrade-3.0.1:3.0.1
2025年 04月 03日 星期四 11:00:41 CST: Bins under package are expected version: 3.0.1 VS 3.0.1!
2025年 04月 03日 星期四 11:00:41 CST: Try to upgrade client and storage node under:/home/coder/us-agent-2.6.8 from 2.6.7 to 3.0.1
2025年 04月 03日 星期四 11:00:41 CST: Try to upgrade client and storage node packages under:/home/coder/us-agent-2.6.8
2025年 04月 03日 星期四 11:00:41 CST: Succeed to delete  bins under /home/coder/us-agent-2.6.8 !
2025年 04月 03日 星期四 11:00:42 CST: Succeed to copy  bins under /home/coder/upgrade-3.0.1/unpack/agent-3.0.1/bin/ to  /home/coder/us-agent-2.6.8/bin/ !
2025年 04月 03日 星期四 11:00:42 CST: Succeed to copy  unis_cn.sh under /home/coder/upgrade-3.0.1/unpack/agent-3.0.1/ to  /home/coder/us-agent-2.6.8/ !
2025年 04月 03日 星期四 11:00:42 CST: Succeed to upgrade bins, update config file now!
2025年 04月 03日 星期四 11:00:42 CST: Try to start service startup from:/home/coder/us-agent-2.6.8 !
2025年 04月 03日 星期四 11:00:42 CST: Start client and storage node service, please wait !
unispace server has been stopped
Starting unispace server...
Starting unispace server [OK]
2025年 04月 03日 星期四 11:00:58 CST: [~Succeed~]
2025年 04月 03日 星期四 11:00:58 CST: exit upgrade progrom now, clean up the unpack folder and the exit code is 0
分享文章
上一个
拷贝策略配置
下一个
更新许可
最近修改: 2025-04-03