cd /pkg
tar -xf upgrade-3.0.1.tar
After decompression, the upgrade-3.0.1 directory will be generated:
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
The upgrade.cfg file in the upgrade-3.0.1 directory contains upgrade-related parameters:
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
The following three parameters need to be modified according to the actual situation:
US_BASE_DIR:The installation directory of the current software. If it is not the default /opt/unispace, specify the actual path.VENDOR:The version information: us: General version; for other specific versions, contact the technical support team for the appropriate upgrade package.UPGRADE_TYPE:The installation package used for this upgrade: release: Full release package (package name without fix); fix: Patch package (package name contains fix).Copy the installation package to the upgrade directory:
cp [xxx]-[server-or-agent]-3.0.1-[os]-[platform].tar upgrade-3.0.1
VENDOR in upgrade.cfg.server-Server upgrade package; agent-Client and storage node upgrade package.KylinOSV10Ensure that upgrade.sh and the upgrade package are in the same directory:
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
Execute the upgrade script:
cd upgrade-3.0.1
./upgrade.sh
Get UPGRADE_TYPE:release
Will upgrade release packages.
2025. 04. 03. Thursday 10:42:34 CST: Get supported base relase id:10
2025. 04. 03. Thursday 10:42:34 CST: Get supported upgrade id:14
2025. 04. 03. Thursday 10:42:34 CST: Get supported base release version:2.6
2025. 04. 03. Thursday 10:42:34 CST: Get supported upgrade version:3.0.1
2025. 04. 03. Thursday 10:42:34 CST: Get supported US_BASE_DIR:/opt/unispace
2025. 04. 03. Thursday 10:42:34 CST: Get VENDOR:us
2025. 04. 03. Thursday 10:42:34 CST: Get supported VENDOR:us
2025. 04. 03. Thursday 10:42:34 CST: Check unispace base folder under:/opt/unispace
2025. 04. 03. Thursday 10:42:34 CST: Detect installed launchd:/opt/unispace/bin/launchd
2025. 04. 03. Thursday 10:42:34 CST: Try to get installed agents on this server under:/opt/unispace !
2025. 04. 03. Thursday 10:42:34 CST: It's meta server!
2025. 04. 03. Thursday 10:42:34 CST: Try to stop service startup from:/opt/unispace !
2025. 04. 03. Thursday 10:42:34 CST: Shut down meta server service, please wait !
Stopping unispace server...
2025. 04. 03. Thursday 10:42:40 CST: Creat backup folder:/home/coder/upgrade-3.0.1/03.
2025. 04. 03. Thursday 10:42:40 CST: Backup folder:/opt/unispace to /home/coder/upgrade-3.0.1/03
2025. 04. 03. Thursday 10:43:08 CST: Dump current database to /home/coder/upgrade-3.0.1/03/init.sql
2025. 04. 03. Thursday 10:43:08 CST: Try to get current software version under:/opt/unispace:/opt/unispace/bin/launchd !
2025. 04. 03. Thursday 10:43:08 CST: Got current version uder:/opt/unispace:2.6.7
2025. 04. 03. Thursday 10:43:08 CST: Bins under base dir are expected version: 2.6.7 VS 2.6!
2025. 04. 03. Thursday 10:43:08 CST: Check upgrade packages !
2025. 04. 03. Thursday 10:43:08 CST: Create unpack foder:/home/coder/upgrade-3.0.1/unpack.
2025. 04. 03. Thursday 10:43:18 CST: Unpack packages for meta server
2025. 04. 03. Thursday 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. Thursday 10:43:35 CST: Got upgrade version under:/home/coder/upgrade-3.0.1:3.0.1
2025. 04. 03. Thursday 10:43:35 CST: Bins under package are expected version: 3.0.1 VS 3.0.1!
2025. 04. 03. Thursday 10:43:35 CST: Try to upgrade meta server under:/opt/unispace from 2.6.7 to 3.0.1
2025. 04. 03. Thursday 10:43:35 CST: Check sql list for upgrading !
2025. 04. 03. Thursday 10:43:35 CST: Great! All sql files are detected !
2025. 04. 03. Thursday 10:43:35 CST: Start to execute pre-sqls
2025. 04. 03. Thursday 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. Thursday 10:43:35 CST: SQL: /home/coder/upgrade-3.0.1/sqls/table_create_sys_db_auto_upgraded.sql executed !
2025. 04. 03. Thursday 10:43:35 CST: Succeed to execute pre-sqls, now upgrade bins!
2025. 04. 03. Thursday 10:43:35 CST: Try to upgrade meta server packages under:/opt/unispace
2025. 04. 03. Thursday 10:43:35 CST: Succeed to delete tomcat under /opt/unispace !
2025. 04. 03. Thursday 10:43:35 CST: Succeed to delete bins under /opt/unispace !
2025. 04. 03. Thursday 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. Thursday 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. Thursday 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. Thursday 10:43:38 CST: Succeed to upgrade bins, update config file now!
2025. 04. 03. Thursday 10:43:38 CST: All done, start service now!
2025. 04. 03. Thursday 10:43:38 CST: Try to start service startup from:/opt/unispace !
2025. 04. 03. Thursday 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. Thursday 10:44:29 CST: Wait 60 seconds during upgrading the schema
2025. 04. 03. Thursday 10:45:29 CST: Start to execute post-sqls
2025. 04. 03. Thursday 10:45:29 CST: Try to execute sql in file:/home/coder/upgrade-3.0.1/sqls/table_update_version.sql
2025. 04. 03. Thursday 10:45:29 CST: SQL: /home/coder/upgrade-3.0.1/sqls/table_update_version.sql executed !
2025. 04. 03. Thursday 10:45:29 CST: ##########Succeed to upgrade meta server, please upgrade storage nodes and client nodes immediately!##########
2025. 04. 03. Thursday 10:45:29 CST: [~Succeed~]
2025. 04. 03. Thursday 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. Thursday 11:00:20 CST: Get supported base relase id:10
2025. 04. 03. Thursday 11:00:20 CST: Get supported upgrade id:14
2025. 04. 03. Thursday 11:00:20 CST: Get supported base release version:2.6
2025. 04. 03. Thursday 11:00:20 CST: Get supported upgrade version:3.0.1
2025. 04. 03. Thursday 11:00:20 CST: Get supported US_BASE_DIR:/home/coder/us-agent-2.6.8
2025. 04. 03. Thursday 11:00:20 CST: Get VENDOR:us
2025. 04. 03. Thursday 11:00:20 CST: Get supported VENDOR:us
2025. 04. 03. Thursday 11:00:20 CST: Check unispace base folder under:/home/coder/us-agent-2.6.8
2025. 04. 03. Thursday 11:00:20 CST: Detect installed launchd:/home/coder/us-agent-2.6.8/bin/launchd
2025. 04. 03. Thursday 11:00:20 CST: Try to get installed agents on this server under:/home/coder/us-agent-2.6.8 !
2025. 04. 03. Thursday 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. Thursday 11:00:20 CST: Try to stop service startup from:/home/coder/us-agent-2.6.8 !
2025. 04. 03. Thursday 11:00:20 CST: Shut down client and storage node service, please wait !
Stopping unispace server...
2025. 04. 03. Thursday 11:00:26 CST: Creat backup folder:/home/coder/upgrade-3.0.1/03.
2025. 04. 03. Thursday 11:00:26 CST: Backup folder:/home/coder/us-agent-2.6.8 to /home/coder/upgrade-3.0.1/03
2025. 04. 03. Thursday 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. Thursday 11:00:29 CST: Got current version uder:/home/coder/us-agent-2.6.8:2.6.7
2025. 04. 03. Thursday 11:00:29 CST: Bins under base dir are expected version: 2.6.7 VS 2.6!
2025. 04. 03. Thursday 11:00:29 CST: Check upgrade packages !
2025. 04. 03. Thursday 11:00:29 CST: Create unpack foder:/home/coder/upgrade-3.0.1/unpack.
2025. 04. 03. Thursday 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. Thursday 11:00:41 CST: Got upgrade version under:/home/coder/upgrade-3.0.1:3.0.1
2025. 04. 03. Thursday 11:00:41 CST: Bins under package are expected version: 3.0.1 VS 3.0.1!
2025. 04. 03. Thursday 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. Thursday 11:00:41 CST: Try to upgrade client and storage node packages under:/home/coder/us-agent-2.6.8
2025. 04. 03. Thursday 11:00:41 CST: Succeed to delete bins under /home/coder/us-agent-2.6.8 !
2025. 04. 03. Thursday 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. Thursday 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. Thursday 11:00:42 CST: Succeed to upgrade bins, update config file now!
2025. 04. 03. Thursday 11:00:42 CST: Try to start service startup from:/home/coder/us-agent-2.6.8 !
2025. 04. 03. Thursday 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. Thursday 11:00:58 CST: [~Succeed~]
2025. 04. 03. Thursday 11:00:58 CST: exit upgrade progrom now, clean up the unpack folder and the exit code is 0