From b30afa5b83970e58ee82128260d63a6b68c9602f Mon Sep 17 00:00:00 2001
From: Enwei <jinenwei@pingcap.com>
Date: Fri, 23 Jul 2021 08:16:14 +0200
Subject: [PATCH] TiUP cluster: update data_dir (#6009)

---
 config-templates/complex-cdc.yaml       | 5 ++++-
 tiup/tiup-cluster-topology-reference.md | 3 +++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/config-templates/complex-cdc.yaml b/config-templates/complex-cdc.yaml
index 682157e7d032b..8c511e7a86ed5 100644
--- a/config-templates/complex-cdc.yaml
+++ b/config-templates/complex-cdc.yaml
@@ -21,7 +21,7 @@ monitored:
 # # - PD: https://pingcap.com/docs/stable/reference/configuration/pd-server/configuration-file/
 # # All configuration items use points to represent the hierarchy, e.g:
 # #   readpool.storage.use-unified-pool
-# #      
+# #
 # # You can overwrite this configuration via the instance-level `config` field.
 
 server_configs:
@@ -96,14 +96,17 @@ cdc_servers:
   - host: 10.0.1.1
     port: 8300
     deploy_dir: "/tidb-deploy/cdc-8300"
+    data_dir: "/tidb-data/cdc-8300"
     log_dir: "/tidb-deploy/cdc-8300/log"
   - host: 10.0.1.2
     port: 8300
     deploy_dir: "/tidb-deploy/cdc-8300"
+    data_dir: "/tidb-data/cdc-8300"
     log_dir: "/tidb-deploy/cdc-8300/log"
   - host: 10.0.1.3
     port: 8300
     deploy_dir: "/tidb-deploy/cdc-8300"
+    data_dir: "/tidb-data/cdc-8300"
     log_dir: "/tidb-deploy/cdc-8300/log"
 
 monitoring_servers:
diff --git a/tiup/tiup-cluster-topology-reference.md b/tiup/tiup-cluster-topology-reference.md
index 8a4c90365cf13..795dbe68d1e1d 100644
--- a/tiup/tiup-cluster-topology-reference.md
+++ b/tiup/tiup-cluster-topology-reference.md
@@ -493,6 +493,8 @@ drainer_servers:
 
 - `deploy_dir`: Specifies the deployment directory. If it is not specified or specified as a relative directory, the directory is generated according to the `deploy_dir` directory configured in `global`.
 
+- `data_dir`:Specifies the data directory. If it is not specified or specified as a relative directory, the directory is generated according to the `data_dir` directory configured in `global`.
+
 - `log_dir`: Specifies the log directory. If it is not specified or specified as a relative directory, the log is generated according to the `log_dir` directory configured in `global`.
 
 - `gc-ttl`: The Time To Live (TTL) duration of the service level GC safepoint set by TiCDC in PD, in seconds. The default value is `86400`, which is 24 hours.
@@ -514,6 +516,7 @@ For the above fields, you cannot modify these configured fields after the deploy
 - `host`
 - `port`
 - `deploy_dir`
+- `data_dir`
 - `log_dir`
 - `gc-ttl`
 - `tz`