Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 使用tiup playground启动,怎么指定data存放目录
【 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.
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.
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.
Specify the --tag, but the directory is still under ~/.tiup, which is on the system disk. Let’s create a symbolic link.
Add parameters, add parameters.
Before starting the playground, you can create a symbolic link for the .tiup directory to another drive and then start it.
Add parameters, add parameters