SEQUOIADB Version Online Upgrade introduction instructions

Source: Internet
Author: User

1. Preface

In the sequoiadb Database development process, the basic maintenance of a semi-annual release of a formal release version. And each new release release version relative to the old version, the performance has been greatly improved, and the database will also add a lot of new features in the new version, hoping to improve the ease of database development.

In the process of sequoiadb Development, more and more developers learn about it and take an interest in it. Now more and more users are learning and researching sequoiadb, and more and more enterprise users have been fully tested on sequoiadb and decided to SEQUOIADB is deployed in the enterprise production environment, utilizing the advantages of sequoiadb distributed storage to provide high concurrency and low latency data operation services.

In many sequoiadb Enterprise customers, the production system using the SEQUOIADB database is an important system within the enterprise and must support 24*7 External Services, so even in the implementation of the database version upgrade, but also must meet the database service non-stop technical requirements.

This article through sequoiadb on -line Upgrade principle Introduction and detailed upgrade step description, to the general sequoiadb users to provide an operational database online upgrade program document, I hope to be able to sequoiadb provide help for users who are upgrading the version.

2. Background 2.1 Introduction to server resources

2.2 Operating system and database software versions

2.3 Data cluster Deployment deployment architecture

3. Version Upgrade compatibility instructions

4.SequoiaDBSupport Online Upgrade principle Description

In a sequoiadb cluster, if the deployed environment is 3 copies of data redundancy for all node groups , users can upgrade the version of the database on each server.

Online upgrade methods are as follows:

The user first selects a server, stops all of its sequoiadb processes, stops all database services on the current machine, and can refer to how the sdbstop command is used. Then use the new version of the database installation package to overwrite the installation of the old version directly. Once the new version of the database is installed, it will automatically start all sequoiadb related processes on the machine. Once the upgraded database service starts successfully, the database version upgrade is completed on behalf of this server.

The user can perform the same operation on the remaining servers in the same way until all the servers have completed the version upgrade and all database services have been successfully started.

5 sequoiadbversion online upgrade steps5.1 Pre-upgrade environmental information collection

Before users begin sequoiadb the cluster version upgrade, they should have a general understanding of the basic situation of the SEQUOIADB cluster, and gather the information about the database.

Check that the installation path for the SEQUOIADB database has been assigned to the system user of the database by the operating system, and this step recommends that the user execute on all machines that have the SEQUOIADB service deployed

Switch to root permissions

Su-root

To view The installation path of the SEQUOIADB database and the user assigned by the operating system

Cat/etc/default/sequoiadb

  

In the context of the author's environment, the printed content is as follows:

Name=sdbcmsdbadmin_user=sdbadmininstall_dir=/opt/sequoiadbmd5=d60fdabd78e05f0ad482b938f1df1d72

With /etc/default/sequoiadb files, users can quickly learn the basics of sequoiadb

The user then passes through the sdb Shell Console to understand The deployment of the SEQUOIADB DB cluster

Switch to sdbadmin user

Su-sdbadmin

  

Enter the sdb Shell console

/opt/sequoiadb/bin/sdb

  

Connecting the database Coord node

> db = new Sdb ("localhost", 11810)

  

View sequoiadb cluster deployment Scenarios

> db.list (7)

  

In the case of the author's environment, the content is printed (omitted in the document due to its length):

{  "Group": [    {      "DBPath": "/opt/sequoiadb/database/catalog/11800",      "HostName": "SDB1",      " Service ": [        {          " type ": 0,          " name ":" 11800 "        },        {          " type ": 1,          " name ":" 11801 "        },        {          "type": 2,          "name": "11802"        },        {          "type": 3,          "name": "11803"        }      ],      "NodeID": 1    },..................    {      "HostName": "Sdb3",      "DBPath": "/opt/sequoiadb/database/data/11930",      "Service": [        {          " Type ": 0,          " "Name": "11930"        },        {          "type": 1,          "name": "11931"        },        {          "type": 2,          "Name": "11932"        }      ],      "NodeID": 1008    }  ],  "GroupID": 1002,  "GroupName": " Group3 ",  " Primarynode ": 1008,  " Role ": 0,  " Status ": 1,  " Version ": 4,  " _id ": {    " $oid ":" 580c1fc9a378cafcebe4e956 "  }}

  

Users from the printed information, the basic can understand how many servers sequoiadb , how many sets of data set, how many nodes each data group contains, the node's data storage path and port number, respectively, the user can from Db.list (7) is obtained in the command.

The author organizes the information according to the demo environment as follows:

5.2 Database Version Upgrade

The upgrade step must be performed on a per-server basis and not be able to perform the upgrade database version step on all servers at the same time.

The author takes the upgrade server as an example, detailing the steps to upgrade the sequoiadb version on a single server .

Toggle sdbadmin user

Su-sdbadmin

  

Stop the sdbcm service for the current server

/opt/sequoiadb/bin/sdbcmtop

  

Stop all sequoiadb Services on the current server

/opt/sequoiadb/bin/sdbstop/opt/sequoiadb/bin/sdbstop-p 11780

  

Checks whether the current server is stopped by all sequoiadb servers

/opt/sequoiadb/bin/sdblist-t All-m Run

  

If there is also a sequoiadb service running, the Execute sdblist command prints sequoiadb Service information that is running on the screen, such as

Sdbom (11780) (31966) total:1

  

After confirming that all sequoiadb are stopped, start upgrading the SEQUOIADB version to the current server

Toggle root permissions

Su-root

  

Assigning executable permissions to sequoiadb execution software

chmod A+x/opt/sequoiadb-2.6-linux_x86_64-enterprise-installer.run

  

Execute sequoiadb new version installation command

/opt/sequoiadb-2.6-linux_x86_64-enterprise-installer.run

  

Let the user choose the language of the installation, here choose 1, English

Please select the installation language[1] english-english[2] Simplified Chinese-English please choose a option [1]: 1

  

Then come out a bunch of license content, let the user choose directly ignore select 1, if you want to learn more select 2 View

License Agreement for Evaluation of Programs [1] Agree the license:for more License ' s Detail, please Check the License Fi Le after installation[2] Read the licenseplease choose an option [1]: 1

  

Let the user choose whether to agree with this license, here Select y (YES)

Do I accept this license? [y/n]: Y

  

The software detects that the machine has sequoiadbinstalled, let the user choose whether to upgrade the version, here Select Y (YES)

An existing installation have been detected in/opt/sequoiadb. Change to upgrade mode? [y/n]: Y

  

The installation software is ready to continue installation, select Y (YES)

Setup is now a ready to begin installing SEQUOIADB Server on your computer. Want to continue? [y/n]: Y

  

Then the software is officially installed and the following content appears

Please wait while the Setup installs SEQUOIADB Server on your computer.  Installing 0% ______________ 50% ______________ 100% Begin to upgrade package ... **************************  check List *************************************check:configure file/etc/default/sequoiadb is exists ... okcheck:get The install directory and user in/etc/default/sequoiadb ... okcheck:install dir/opt/sequoiadb is not empty ... Okchec  K:compatibility between version 1.12.5 Enterprise and 2.6 enterprise ... okcheck:disk space is enough ... Okcheck: User sdbadmin is exist, and get group ...  Okcheck:relevant processes is stoped ... ok#########################################

  

As long as the following information appears on the screen, it proves that the sequoiadb software version upgrade has been successful

Setup has finished installing SEQUOIADB Server on your computer.

  

5.3 sequoiadbversion post-upgrade check

After the sequoiadb version is upgraded,sdbcm automatically starts all SEQUOIADB services for the current machine , and the user can Sdblist command to view the confirmation. Before the user executes the command, the author advises the user to switch the system user first

Su-sdbadmin

  

View the sequoiadb Database service startup situation.

/opt/sequoiadb/bin/sdblist-t All-m Local

  

For example, the author's environment, the printed content is:

SEQUOIADB (11920) (12808) dsequoiadb (11930) (12811) Dsdbom (11780) (12792) sequoiadb (11910) (12812) dsequoiadb (11810) ( 12805) ssequoiadb (11800) (12780) csdbcm (11790) (12770) sdbcmd (12768) total:8

  

If there are some nodes that do not start properly, the following information is printed

SEQUOIADB (11920) (12808) dsequoiadb (11930) (12811) Dsdbom (11780) (12792) sequoiadb (11910) (12812) dsequoiadb (11810) (-) SSEQUOIADB (11800) (12780) csdbcm (11790) (12770) sdbcmd (12768) total:8

  

displaying sequoiadb (11810) (-) S indicates that the node is present on the server, but the node does not start.

After the SEQUOIADB version is upgraded, although all processes have been started, the user will also need to confirm that the node being started is back to normal and will be able to provide the service normally.

When the user checks to see if the node is back to normal, just check the status of the catalog node and the data node, i.e.

SEQUOIADB (11920) (12808) dsequoiadb (11930) (12811) dsequoiadb (11910) (12812) dsequoiadb (11800) (12780) C

  

User enters sequoiadb Shell

/opt/sequoiadb/bin/sdb

  

Select one of the nodes for a connection check

> var db = new Sdb ("localhost", 11910);> Db.snapshot (6, {}, {"ServiceStatus": null});> db.close ();

  

As long as Snapshot (6) prints the contents {"ServiceStatus": true} equals true, the service on behalf of this node has returned to normal, in a healthy state, if false indicates that the state of this node has not yet recovered, typically, Servicestatus=false, the node is in a full-volume synchronization state.

Repeat this action to check the rest of the localhost:11920,localhost:11930,localhost:11800 The node state is normal. If the node state is not normal, it is necessary to wait patiently for the node to complete the data check or data synchronization until the node status is restored to normal, the current server sequoiadb version upgrade is not the end.

> var db = new Sdb ("localhost", 11920);> Db.snapshot (6, {}, {"ServiceStatus": null});> db.close ();> var db = ne W Sdb ("localhost", 11920);> Db.snapshot (6, {}, {"ServiceStatus": null});> db.close ();> var db = new Sdb ("Localhos T ", 11800);> Db.snapshot (6, {}, {" ServiceStatus ": null});> db.close ();

  

When the user finishes upgrading the sequoiadb version of the current server, the same command can be executed on two external servers to begin the sequoiadb version upgrade. Until all server database versions of the DB cluster have been upgraded.

6 Summary

As the sequoiadb cluster is deployed, data redundancy is done through 3 servers to ensure data security across the entire DB cluster, and each server's database process is independent of each other. There is no data dependency in the middle. Users in the database version of the upgrade, you can take advantage of this data redundancy 3 features, through the whole database cluster to do a rolling upgrade, one to the sequoiadb on each server The database version is upgraded to complete the database version upgrade for all servers.

SEQUOIADB giant Cedar Database 2.6 latest version download

SEQUOIADB Giant Cedar Database Technology Blog

SEQUOIADB Giant Cedar Database Community

SEQUOIADB Version Online Upgrade introduction instructions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.