This topic describes how to use OceanBase Shell (OBShell) to stop an OceanBase cluster with three replicas.
Prerequisites
The OceanBase cluster is managed by OBShell. For more information, see Take over an OceanBase cluster not deployed by OBShell.
All OBServer nodes and OBShell processes in the OceanBase cluster are running normally.
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 |
Scenario 1: Stop all observer processes
Run the following command on any OBServer node to stop the observer processes on all OBServer nodes. For more information, see obshell cluster stop.
[admin@test001 ~]$ /home/admin/oceanbase/bin/obshell cluster stop -a -f
Scenario 2: Stop specified observer processes
Run the following command on any OBServer node to stop the specified observer process. For more information, see obshell cluster stop.
[admin@test001 ~]$ /home/admin/oceanbase/bin/obshell cluster stop -s 10.10.10.1:2886,10.10.10.2:2886 -f
Scenario 3: Stop the observer processes in specified zones
Run the following command on any OBServer node to stop the observer processes in the specified zone. For more information, see obshell cluster stop.
[admin@test001 ~]$ /home/admin/oceanbase/bin/obshell cluster stop -z zone1 -f
Scenario 4: Isolate an OBServer node
Run the following command on any OBServer node to isolate it. For more information, see obshell cluster stop.
[admin@test001 ~]$ /home/admin/oceanbase/bin/obshell cluster stop -s 10.10.10.1:2886 -I
Scenario 5: Isolate a zone
Run the following command on any OBServer node to isolate the corresponding zone. For more information, see obshell cluster stop.
[admin@test001 ~]$ /home/admin/oceanbase/bin/obshell cluster stop -z zone1 -I
References
For more information about the
STOP ZONEcommand, see Isolate a zone.For more information about the
STOP SERVERcommand, see Isolate a node.