From 679f8c00d5d2be0ad5f581bf6b1059ae2d5b18ba Mon Sep 17 00:00:00 2001 From: Ti Chi Robot Date: Fri, 19 Jan 2024 12:16:47 +0800 Subject: [PATCH] fix-pd-recover (#2475) (#2490) --- en/pd-recover.md | 11 +++-------- zh/pd-recover.md | 11 +++-------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/en/pd-recover.md b/en/pd-recover.md index 3768ffd96..c9d58cb3f 100644 --- a/en/pd-recover.md +++ b/en/pd-recover.md @@ -201,14 +201,7 @@ Check configuration. The following command uses placement rules as an example: kubectl -n ${namespace} exec -it ${cluster_name}-pd-0 -- ./pd-ctl config placement-rules show ``` -### Step 6. Restart TiDB and TiKV - -Use the following commands to restart the TiDB and TiKV clusters: - -```shell -kubectl delete pod -l app.kubernetes.io/component=tidb,app.kubernetes.io/instance=${cluster_name} -n ${namespace} && -kubectl delete pod -l app.kubernetes.io/component=tikv,app.kubernetes.io/instance=${cluster_name} -n ${namespace} -``` +Now the TiDB cluster is recovered. ## Scenarios 2: All PD nodes are down and cannot be recovered @@ -370,3 +363,5 @@ Use the following commands to restart the TiDB and TiKV clusters: kubectl delete pod -l app.kubernetes.io/component=tidb,app.kubernetes.io/instance=${cluster_name} -n ${namespace} && kubectl delete pod -l app.kubernetes.io/component=tikv,app.kubernetes.io/instance=${cluster_name} -n ${namespace} ``` + +Now the TiDB cluster is recovered. diff --git a/zh/pd-recover.md b/zh/pd-recover.md index 1170c0e75..099f0fe91 100644 --- a/zh/pd-recover.md +++ b/zh/pd-recover.md @@ -201,14 +201,7 @@ kubectl -n ${namespace} exec -it ${cluster_name}-pd-0 -- ./pd-ctl health kubectl -n ${namespace} exec -it ${cluster_name}-pd-0 -- ./pd-ctl config placement-rules show ``` -### 第 6 步:重启 TiDB 和 TiKV - -使用以下命令重启 TiDB 和 TiKV 实例: - -```shell -kubectl delete pod -l app.kubernetes.io/component=tidb,app.kubernetes.io/instance=${cluster_name} -n ${namespace} && -kubectl delete pod -l app.kubernetes.io/component=tikv,app.kubernetes.io/instance=${cluster_name} -n ${namespace} -``` +至此服务恢复。 ## 场景 2:所有 PD 节点都故障且无法恢复 @@ -372,3 +365,5 @@ kubectl patch tc ${cluster_name} -n ${namespace} --type merge -p '{"spec":{"pd": kubectl delete pod -l app.kubernetes.io/component=tidb,app.kubernetes.io/instance=${cluster_name} -n ${namespace} && kubectl delete pod -l app.kubernetes.io/component=tikv,app.kubernetes.io/instance=${cluster_name} -n ${namespace} ``` + +至此服务恢复。