This topic describes how to use OceanBase Shell (OBShell) to start an OceanBase cluster with three replicas. The procedure varies with the management status of the OceanBase cluster:
OceanBase cluster managed by OBShell
OceanBase cluster not managed by OBShell
For more information about how to check whether an OceanBase cluster is managed by OBShell, see Step 3 in Take over an OceanBase cluster not deployed by OBShell.
Deployment mode
In this topic, the following three machines are used:
| Role | Machine | Remarks |
|---|---|---|
| OBServer node | 10.10.10.1 | In OceanBase Database Zone 1 |
| OBServer node | 10.10.10.2 | In OceanBase Database Zone 2 |
| OBServer node | 10.10.10.3 | In OceanBase Database Zone 3 |
OceanBase cluster managed by OBShell
Prerequisites
All OBShell processes are running normally. For more information, see Start or stop OBShell.
Scenario 1: Start all observer processes
Run the following command on any OBServer node to start all observer processes. For more information, see obshell cluster start.
[admin@test001 ~]$ /home/admin/oceanbase/bin/obshell cluster start -a
Scenario 2: Start specified observer processes
Run the following command on any OBServer node to start the specified observer process. For more information, see obshell cluster start.
[admin@test001 ~]$ /home/admin/oceanbase/bin/obshell cluster start -s 10.10.10.1:2886,10.10.10.2:2886
Scenario 3: Start the observer processes in specified zones
Run the following command on any OBServer node to start the observer processes in the specified zone. For more information, see obshell cluster start.
[admin@test001 ~]$ /home/admin/oceanbase/bin/obshell cluster start -z zone1,zone2
OceanBase cluster not managed by OBShell
The cluster is not managed by OBShell and must be taken over by OBShell. During the takeover, all observer processes are started to restore the cluster. For more information, see Take over an OceanBase cluster not deployed by OBShell.
References
For more information about how to start an OBServer node after the observer process is started, see Step 7 in Restart a node.
For more information about how to start a zone, see Start a zone.