How to Modify Labels Online for Hot and Cold Data Separation in TiDB Configuration

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: TIDB 配置冷热分离 如何在线修改label

| username: 最强王者

[TiDB Usage Environment] Production Environment / Testing / PoC
In the production environment, storage is configured with hot and cold separation. Before initializing the TiDB cluster, the cluster labels were not set. How can I configure the labels for the TIKV and PD of the cluster online?

Current status:

Can anyone help with how to configure the labels online or perform a rolling cluster configuration?

[TiDB Version]
Version 6.5.2

| username: h5n1 | Original post link

In pd-ctl config set, configure the label hierarchy name location-labels and the isolation hierarchy isolation-level.
In pd-ctl store, configure the label values for each TiKV.

Alternatively, use tiup cluster edit-config and then reload.

| username: 最强王者 | Original post link

Hello, how do you configure the store in pd-ctl store label? Are there any examples?

| username: 最强王者 | Original post link

  1. Hello, the disk is also configured this way.
  2. For example, the cluster topology is divided into four layers: zone → data center (dc) → rack → host. Is it necessary to configure this?
| username: h5n1 | Original post link

| username: Fly-bird | Original post link

This requires carefully reading the official documentation.

| username: heiwandou | Original post link

Is it possible to configure two disk paths, one SSD and one HDD, in a single TiKV instance? Does anyone know?

| username: Jolyne | Original post link

Establish a policy, bind the policy when creating a table, and specify SSD or HDD.

| username: h5n1 | Original post link

What does disk path refer to here? For TiKV, the actual file storage path can only be one, and for data placement, it also means that only one custom disk type value can be specified.

| username: 像风一样的男子 | Original post link

No, kv can only set one path.