OceanBase Cloud Platform (OCP) allows you to upgrade a standalone centralized OceanBase database to a distributed cluster online.
This topic describes how to upgrade a standalone centralized database to a distributed cluster.
Background information
- After you upgrade a cluster to span multiple hosts in a single zone, only the computing capabilities of the cluster are improved. The cluster does not support multi-replica high availability and applies only to a development or test environment.
- If you upgrade a cluster to span an even number of zones, the cluster cannot meet the high availability requirements and has data security risks. We recommend that you adjust the configurations to ensure an odd number of zones or enable the arbitration service for the cluster or tenant.
Prerequisites
You have deployed a standalone centralized OceanBase database.
Procedure
Log on to the OCP console.
In the left-side navigation pane, click Clusters to go to the Clusters page.
In the Clusters list on the page, find the target cluster and click its name.
In the upper-right corner of the Overview page of the cluster, click Scale to a distributed cluster.
In the panel that appears on the right, configure the following information.
Specify relevant information.
By default, the system allows you to upgrade a cluster by adding zones. You can also upgrade a cluster by adding OBServer nodes. To do so, click the Add OBServer tab and upgrade the cluster to span multiple hosts in a single zone.
To add more zones, you can click Add Zone in the lower part.
Parameter Description Zone Name The name of the zone. IDC The IDC where the zone is located. Host Type Optional. If you select a host type, the host list is filtered based on the host type. CPU Architecture The CPU architecture of the host in the zone must be the same as that of the cluster.
After you select an architecture, the system checks whether an installation package for the CPU architecture of the current cluster exists. If the installation package for the specified architecture does not exist, the zone cannot be added.Host When you upgrade a cluster by adding zones, you can select only one host as the OBServer node and RootServer. When you upgrade a cluster by adding OBServer nodes, you can select multiple hosts. - If no host is available in the drop-down list, you can click Add Host in the drop-down list to add a host.
- In a production environment, we recommend that the size of the log disk be at least three times that of the memory size of the host. To avoid performance issues, we recommend that you do not create the data directory and the log directory on the same disk.
Note
- In addition to adding zones, you can also delete zones other than Zone1. You must retain at least one zone. Otherwise, you cannot upgrade the database to a distributed cluster.
- The name, IDC, host type, CPU architecture, and host information of Zone1 cannot be modified.
Complete the custom settings. Specifically, configure the OS user, path, and port number of the OBServer node. For more information, see the section about custom settings in the Create a distributed cluster topic.
Configure the startup parameters of the OBServer node. For more information, see Overview of OceanBase Database parameters.
Choose whether to select Add Replicas for All Tenants in the Tenant Configuration section.
If you select this option, replicas are added for all tenants in the cluster. The same quantity of replicas of the same type, unit specifications, and unit quantities as those in the original zone are added for each tenant.

Click OK.
In the dialog box that appears, you can click View Task to view the creation progress. You can also view the task progress in Task Center.