How to specify the data storage directory when starting with tiup playground

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

Original topic: 使用tiup playground启动,怎么指定data存放目录

| username: TiDBer_6XEUiIJO

【 TiDB Usage Environment 】Production Environment
【 TiDB Version 】v7.1.0

Installed and started using the following commands:

curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
tiup playground v7.5.1 --db 2 --pd 3 --kv 3

I found that the data is automatically saved to the /root/.tiup/data directory. How can I specify startup parameters or configure it rationally to save the data to /data/tidb?

Because this directory is mounted with a separate data disk, I don’t want the data to be saved to the system disk by default.

| username: hey-hoho | Original post link

Previously, I tested that you can add the --tag parameter to specify the directory name, but this directory can only be under ~/.tiup/data. Try mounting the data disk to a directory under it to see if it works.

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

Edit a configuration file, such as ~/config/tikv.toml, and set the data storage directory in the configuration file.
Then specify the configuration file when starting, tiup playground --tikv.config ~/config/tikv.toml
The same applies to pd.

| username: TiDBer_QYr0vohO | Original post link

Specify the --tag, but the directory is still under ~/.tiup, which is on the system disk. Let’s create a symbolic link.

| username: zhh_912 | Original post link

Add parameters, add parameters.

| username: TiDBer_H5NdJb5Q | Original post link

Before starting the playground, you can create a symbolic link for the .tiup directory to another drive and then start it.

| username: 健康的腰间盘 | Original post link

Add parameters, add parameters