Changing the Deployment Model of a Single-Replica Instance (Centralized)
Scenarios
You can change the deployment model of a single-replica GaussDB instance to an instance with multiple replicas.
To apply for the permissions needed, submit an application by choosing Service Tickets > Create Service Ticket in the upper right corner of the management console.
Precautions
- Currently, the following deployment model change scenarios are supported:
- Change a single-replica centralized instance to a 1 primary + 2 standby instance.
- Change a single-replica centralized instance to a 1 primary + 1 standby + 1 log instance.
- Before changing the deployment model, ensure that the instance status is normal.
- The following operations cannot be performed when the deployment model of an instance is being changed: scaling up storage, changing specifications, backing up data, resetting passwords, rebooting the instance, and deleting the instance.
- Changing the deployment model will interrupt services. Therefore, perform this operation during off-peak hours.
- After the deployment model is changed, the specifications of the new nodes are the same as those of the original nodes. The specifications of the log node use the configured specifications for log nodes.
- After a single-replica centralized instance is changed to a 1 primary + 1 standby + 1 log instance, its replica consistency protocol changes to Paxos.
- After the deployment model is changed, an automated backup will be triggered and log archiving will be enabled.
- Only the deployment model of single-replica instances whose version is V2.0-8.0 or later can be changed.
- Currently, only the deployment model of pay-per-use instances can be changed.
Procedure
- Log in to the management console.
- Click in the upper left corner and select a region and project.
- Click in the upper left corner of the page and choose .
- On the Instances page, click the name of the target instance to go to the Basic Information page.
- On the Basic Information page, click Change in the Deployment Model field. The Change Deployment Model page is displayed.
Figure 1 Changing the deployment model
- On the Change Deployment Model page, select the new deployment model and AZ, and click Next.
Figure 2 Changing the deployment model
- Confirm the displayed details.
- If you need to modify your settings, click Previous.
- If the information is correct, click Submit to submit the change request.
Figure 3 Submitting the request
After the task is submitted, the instance status will be Changing deployment model.
Verification After the Change
After the change is complete, check the instance status, backup creation status, and instance connectivity, and whether you can add, delete, update, and query data in the instance.
- On the Instances page, check whether Status of the target instance is Available.
- Click the name of the target instance to go to the Basic Information page. In the Nodes area, check that the statuses of all nodes are normal.
- Check that the automated backup triggered after the change is successfully created.
- On the Instances page, click the name of the target instance to go to the Basic Information page.
- In the navigation pane, choose Backups. Check that a backup has been created and the backup status is Completed.
- Check that the instance is properly connected and you can add, delete, update, and query data in the instance.
- Log in to the database. For details, see Connecting to an Instance Through DAS.
- Go to the SQL Query page.
Figure 4 SQL query
- Create a database.
CREATE DATABASE database name;
In this example, run the following command to create a database named db_tpcds:
CREATE DATABASE db_tpcds;
Switch to the newly created database in the upper left corner.
Figure 5 Switching to the new database
- Create a table and add, delete, update, and query data in the table.
- Create a schema.
- Create a table named mytable that has only one column. The column name is firstcol and the column type is integer.
CREATE TABLE myschema.mytable (firstcol int);
- Insert data into the table.
- View data in the table.
SELECT * FROM myschema.mytable;
| firstcol | ---+----------+ 1 | 100 |
- Update data in the table.
- View the data in the table again.
SELECT * FROM myschema.mytable;
| firstcol | ---+----------+ 1 | 200 |
- Delete the table.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot