How to Modify the Disk Mount Point of a Deployed Cluster?

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

Original topic: 已部署的集群如何修改磁盘挂载点?

| username: TiDBer_w97ojf0v

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version] v6.5.0
[Issue] During deployment, it was not mounted to the specified disk, and the default mount point only has 20GB of space.

| username: 裤衩儿飞上天 | Original post link

Directly changing the directory is quite cumbersome and prone to issues. If you must change the directory directly, you can refer to this: Column - Practice of Using TiUP to Modify Cluster Directory | TiDB Community. It is recommended to use the scale-out and scale-in method to change it (first scale out a machine with the correct directory, then scale in the incorrect machine, and configure it. Repeat this process until all nodes are configured according to the plan).

| username: tidb菜鸟一只 | Original post link

Expand and shrink one node at a time. Given your current data volume isn’t large, it shouldn’t be very slow.

| username: Jellybean | Original post link

You can follow this order:

  • Method 1: For a newly deployed cluster, if the cost is not high, the most convenient way is to directly destroy the cluster, then reconfigure the directory path and redeploy.

  • Method 2: If you want to operate on an existing cluster, it is recommended to first expand the cluster on the same machine with the correct directory, and then shrink the old nodes. Depending on the cluster access situation, you can do it one machine at a time or in batches. This requires manual operation.

  • Method 3: It is not recommended to directly modify the directory, as it may cause unknown issues. If you have a research spirit and want to tackle this problem head-on, you can refer to the official operation manual: 【SOP Series 12】TiUP Modify Cluster IP, Port, and Directory