---
title: 如何删除 OCP 集群拓扑中显示异常的 Zone-OceanBase数据库使用指南
description: 了解OceanBase数据库在实际应用中关于 如何删除 OCP 集群拓扑中显示异常的 Zone相关的常见问题和使用技巧，帮助您快速解决 如何删除 OCP 集群拓扑中显示异常的 Zone的难题。
image: https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*OSPzQ6GUQF4AAAAAQHAAAAgAeiGDAQ/original
---
[OceanBase AI 数据大会](https://www.oceanbase.com/conference2026 "OceanBase AI 数据大会")

## 体验新一代 AI 数据平台

[立即咨询](https://www.oceanbase.com/contactus) [免费试用 免费试用](https://www.oceanbase.com/free-trial)划线反馈

# 如何删除 OCP 集群拓扑中显示异常的 Zone

更新时间：2025-03-17 01:56

适用版本： V2.x、V3.x、V4.x 内容类型：How-to  

黑屏删除无 Server 的空 Zone 后，在 OCP 集群拓扑图中仍可以白屏查看到已删除的 Zone，本文将为您介绍如何删除该显示异常的 Zone。

## 适用版本

OceanBase 云平台（OceanBase Cloud Platform，OCP） V2.x，V3.x，V4.x 版本。

## 问题原因

该 Zone 是通过黑屏命令执行删除的，而非在 OCP 上白屏删除，导致 OCP 上的某些数据未及时清理。

## 解决方案

清理 OCP `meta_database` 中 `ob_zone` 表和 `ob_server` 表的脏数据。

1. 查询对应 Zone 的 `ob_server` 状态，若所有 `status` 均为 `RUNNING` 则说明 `ob_server` 无脏数据，即无需进行清理。

   ```sql
   select * from ob_server where zone_name='xxx'\G ;

   MySQL [oceanbase]> select * from ocp.ob_server where zone_name='zone3'\G ;
   *************************** 1. row ***************************
                   id: 1000117
       create_time: 2022-11-01 18:10:14
       update_time: 2024-03-27 18:54:32
           creator: NULL
                   ip: xxxx.xx.xx.xx
               port: 2882
           sql_port: 2881
           version: 3.1.2_10000392021123010-d4ace121deae5b81d8f0b40afbc4c02705b7fc1d(Dec 30 2021 02:47:29)
           cluster_id: 1
           host_id: 1000066
           zone_name: zone3
   is_with_rootserver: 0
               status: RUNNING
       inner_status: ACTIVE
       operate_status: NORMAL
           start_time: 2022-11-01 18:09:19
           stop_time: 1970-01-01 08:00:00
       ob_server_id: 5
       install_path: /home/admin/oceanbase
           run_path: /home/admin/oceanbase
           run_user: admin
   *************************** 2. row ***************************
                   id: 5000057
       create_time: 2023-07-21 10:44:45
       update_time: 2025-01-13 01:56:07
           creator: NULL
                   ip:  xxxx.xx.xx.xx
               port: 4882
           sql_port: 4881
           version: 3.1.5_100010012023060910-b4c6e7b084f2932ff3c21844c915fbf9ba423e69(Jun  9 2023 10:12:14)
           cluster_id: 3000007
           host_id: 5000033
           zone_name: zone3
   is_with_rootserver: 0
               status: RUNNING
       inner_status: ACTIVE
       operate_status: NORMAL
           start_time: 2023-07-21 10:28:44
           stop_time: 1970-01-01 08:00:00
       ob_server_id: 3
       install_path: /home/admin/observer
           run_path: /home/admin/observer
           run_user: admin
   *************************** 3. row ***************************
                   id: 5000176
       create_time: 2023-12-04 17:01:44
       update_time: 2024-07-24 14:45:19
           creator: NULL
                   ip:  xxxx.xx.xx.xx
               port: 4882
           sql_port: 4881
           version: 3.1.5_100010012023060910-b4c6e7b084f2932ff3c21844c915fbf9ba423e69(Jun  9 2023 10:12:14)
           cluster_id: 3000011
           host_id: 5000102
           zone_name: zone3
   is_with_rootserver: 0
               status: RUNNING
       inner_status: ACTIVE
       operate_status: NORMAL
           start_time: 2023-12-04 16:52:02
           stop_time: 1970-01-01 08:00:00
       ob_server_id: 3
       install_path: /home/admin/oceanbase
           run_path: /home/admin/oceanbase
           run_user: admin
   *************************** 4. row ***************************
                   id: 5000181
       create_time: 2023-12-05 09:46:27
       update_time: 2025-01-10 00:11:46
           creator: NULL
                   ip:  xxxx.xx.xx.xx
               port: 4882
           sql_port: 4881
           version: 3.1.5_100010012023060910-b4c6e7b084f2932ff3c21844c915fbf9ba423e69(Jun  9 2023 10:12:14)
           cluster_id: 3000012
           host_id: 5000107
           zone_name: zone3
   is_with_rootserver: 0
               status: RUNNING
       inner_status: ACTIVE
       operate_status: NORMAL
           start_time: 2024-02-22 16:11:33
           stop_time: 1970-01-01 08:00:00
       ob_server_id: 3
       install_path: /home/admin/oceanbase
           run_path: /home/admin/oceanbase
           run_user: admin
   *************************** 5. row ***************************
                   id: 7000036
       create_time: 2024-05-22 15:21:08
       update_time: 2024-05-22 17:17:00
           creator: NULL
                   ip: xxxx.xx.xx.xx
               port: 4882
           sql_port: 4881
           version: 4.2.1.6_106000012024042515-38166dc8c130f88929e5c8150eb4db3aed79b162(Apr 25 2024 15:33:42)
           cluster_id: 5000003
           host_id: 7000015
           zone_name: zone3
   is_with_rootserver: 0
               status: RUNNING
       inner_status: ACTIVE
       operate_status: NORMAL
           start_time: 2024-05-22 17:15:07
           stop_time: 1970-01-01 08:00:00
       ob_server_id: 3
       install_path: /home/admin/oceanbase
           run_path: /home/admin/oceanbase
           run_user: admin
   *************************** 6. row ***************************
                   id: 7000093
       create_time: 2024-07-15 15:51:53
       update_time: 2024-12-23 19:25:16
           creator: NULL
                   ip:  xxxx.xx.xx.xx
               port: 4882
           sql_port: 4881
           version: 4.3.4.0_100000162024110717-82547d6edc6ea98ba710e376a736a9a850499a06(Nov  7 2024 17:28:11)
           cluster_id: 5000011
           host_id: 7000060
           zone_name: zone3
   is_with_rootserver: 1
               status: RUNNING
       inner_status: ACTIVE
       operate_status: NORMAL
           start_time: 2024-12-23 19:18:01
           stop_time: 1970-01-01 08:00:00
       ob_server_id: 3
       install_path: /home/admin/oceanbase
           run_path: /home/admin/oceanbase
           run_user: admin
   *************************** 7. row ***************************
                   id: 7000094
       create_time: 2024-07-15 15:51:53
       update_time: 2024-12-23 19:18:35
           creator: NULL
                   ip:  xxxx.xx.xx.xx
               port: 4882
           sql_port: 4881
           version: 4.3.4.0_100000162024110717-82547d6edc6ea98ba710e376a736a9a850499a06(Nov  7 2024 17:28:11)
           cluster_id: 5000011
           host_id: 7000061
           zone_name: zone3
   is_with_rootserver: 0
               status: RUNNING
       inner_status: ACTIVE
       operate_status: NORMAL
           start_time: 2024-12-23 19:18:13
           stop_time: 1970-01-01 08:00:00
       ob_server_id: 4
       install_path: /home/admin/oceanbase
           run_path: /home/admin/oceanbase
           run_user: admin
   *************************** 8. row ***************************
                   id: 7000099
       create_time: 2024-08-20 17:00:05
       update_time: 2024-08-20 17:07:22
           creator: NULL
                   ip:  xxxx.xx.xx.xx
               port: 4882
           sql_port: 4881
           version: 4.3.2.1_100000102024081217-9b4a349ba1c06965b20a3f2397bd57eb0e52a667(Aug 12 2024 18:10:52)
           cluster_id: 5000012
           host_id: 7000065
           zone_name: zone3
   is_with_rootserver: 0
               status: RUNNING
       inner_status: ACTIVE
       operate_status: NORMAL
           start_time: 2024-08-20 17:07:15
           stop_time: 1970-01-01 08:00:00
       ob_server_id: 3
       install_path: /home/admin/oceanbase
           run_path: /home/admin/oceanbase
           run_user: admin
   *************************** 9. row ***************************
                   id: 7000112
       create_time: 2024-10-14 14:10:01
       update_time: 2024-10-15 00:14:42
           creator: NULL
                   ip:  xxxx.xx.xx.xx
               port: 4882
           sql_port: 4881
           version: 4.2.1.6_106000012024042515-38166dc8c130f88929e5c8150eb4db3aed79b162(Apr 25 2024 15:33:42)
           cluster_id: 5000013
           host_id: 7000076
           zone_name: zone3
   is_with_rootserver: 0
               status: RUNNING
       inner_status: ACTIVE
       operate_status: NORMAL
           start_time: 2024-10-15 00:07:00
           stop_time: 1970-01-01 08:00:00
       ob_server_id: 3
       install_path: /home/admin/oceanbase
           run_path: /home/admin/oceanbase
           run_user: admin
   *************************** 10. row ***************************
                   id: 7000121
       create_time: 2024-11-19 16:00:02
       update_time: 2024-11-19 16:07:13
           creator: NULL
                   ip:  xxxx.xx.xx.xx
               port: 4882
           sql_port: 4881
           version: 4.2.5.0_100000052024102022-e7c676806fda04726bbbcdfbf1758057bb465b59(Oct 20 2024 23:06:30)
           cluster_id: 5000014
           host_id: 7000083
           zone_name: zone3
   is_with_rootserver: 0
               status: RUNNING
       inner_status: ACTIVE
       operate_status: NORMAL
           start_time: 2024-11-19 16:06:34
           stop_time: 1970-01-01 08:00:00
       ob_server_id: 3
       install_path: /home/admin/oceanbase
           run_path: /home/admin/oceanbase
           run_user: admin
   *************************** 11. row ***************************
                   id: 7000122
       create_time: 2024-11-19 16:00:02
       update_time: 2024-11-19 16:06:35
           creator: NULL
                   ip:  xxxx.xx.xx.xx
               port: 4882
           sql_port: 4881
           version: 4.2.5.0_100000052024102022-e7c676806fda04726bbbcdfbf1758057bb465b59(Oct 20 2024 23:06:30)
           cluster_id: 5000014
           host_id: 7000084
           zone_name: zone3
   is_with_rootserver: 0
               status: RUNNING
       inner_status: ACTIVE
       operate_status: NORMAL
           start_time: 2024-11-19 16:06:33
           stop_time: 1970-01-01 08:00:00
       ob_server_id: 4
       install_path: /home/admin/oceanbase
           run_path: /home/admin/oceanbase
           run_user: admin
   *************************** 12. row ***************************
                   id: 7000123
       create_time: 2024-11-19 16:00:02
       update_time: 2024-11-19 16:06:35
           creator: NULL
                   ip:  xxxx.xx.xx.xx
               port: 4882
           sql_port: 4881
           version: 4.2.5.0_100000052024102022-e7c676806fda04726bbbcdfbf1758057bb465b59(Oct 20 2024 23:06:30)
           cluster_id: 5000014
           host_id: 7000085
           zone_name: zone3
   is_with_rootserver: 0
               status: RUNNING
       inner_status: ACTIVE
       operate_status: NORMAL
           start_time: 2024-11-19 16:06:34
           stop_time: 1970-01-01 08:00:00
       ob_server_id: 5
       install_path: /home/admin/oceanbase
           run_path: /home/admin/oceanbase
           run_user: admin
   *************************** 13. row ***************************
                   id: 7000126
       create_time: 2024-11-21 19:06:54
       update_time: 2024-11-21 21:23:20
           creator: NULL
                   ip:  xxxx.xx.xx.xx
               port: 4882
           sql_port: 4881
           version: 4.2.1.4_104000052024022918-3246b00b20dbd0cf1e1bef4b67fd31ff8fe7088f(Feb 29 2024 18:36:40)
           cluster_id: 5000015
           host_id: 7000088
           zone_name: zone3
   is_with_rootserver: 0
               status: RUNNING
       inner_status: ACTIVE
       operate_status: NORMAL
           start_time: 2024-11-21 21:23:18
           stop_time: 1970-01-01 08:00:00
       ob_server_id: 3
       install_path: /home/admin/oceanbase
           run_path: /home/admin/oceanbase
           run_user: admin
   13 rows in set (0.01 sec)

   ERROR: No query specified

   ```
 2. 查询对应 Zone 的 `ob_zone` 状态，若 `status` 为 `DELETED` 状态，则需进行清理。

   ```sql
   select * from ob_zone where cluster_id in ( select id from ob_cluster where name='xxx' ) and name='xxx'\G;

   MySQL [oceanbase]> select * from ob_zone where cluster_id in ( select id from ob_cluster where name='ob_cluster' ) and name='zone3'\G;
   *************************** 1. row ***************************
   id: 3000022
   create_time: 2023-07-27 13:48:58
   update_time: 2025-01-16 10:03:30
   creator: NULL
   name: zone3
   cluster_id: 3000008
   idc_id: 2000005
   status: DELETED
   inner_status: INACTIVE
   operate_status: NORMAL
   compaction_status: IDLE
   start_time: NULL
   stop_time: NULL
   architecture: x86_64

   ```
 3. 清理对应 Zone 的 `ob_zone` 表中的脏数据。

   ```sql
   delete from ob_zone where cluster_id in ( select id from ob_cluster where name='ob_cluster' ) and name='zone3';

   ```

上一篇

[OCP 升级 OceanBase 集群时预检查失败报错 “tablet is merging”](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000002488445)

下一篇

[OCP 白屏界面上的任务中看不到日志](https://www.oceanbase.com/knowledge-base/oceanbase-database-1000000000365050) ![有帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*y6ocSqN8cqsAAAAAAAAAAAAAARQnAQ)![无帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*BG9IQJyLHF8AAAAAAAAAAAAAARQnAQ)![反馈](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*eTWdQKCRKHwAAAAAAAAAAAAAARQnAQ) 咨询
