TiDB. TiKV server. Is it possible to write data to multiple disks?

TiDB version: v7.1.0

In the yaml file of the cluster topology for the TiKV-server, you can add only one disk in the `data_dir’ field. I need to specify multiple disks, similar to adding multiple disks for the TiFlash-server.

I found instructions “Multi-disk deployment with TiDB” for the TiFlash-server. But I didn’t find detailed instructions for the TiKV-server.

I tried adding the necessary disks for tikv_servers to the cluster topology yaml file:

  - host:
    data_dir: /data1/tidb-data/tikv-20160,/data2/tidb-data/tikv-20160,/data3/tidb-data/tikv-20160,/data4/tidb-data/tikv-20160,/data5/tidb-data/tikv-20160,/data6/tidb-data/tikv-20160,/data7/tidb-data/tikv-20160,/data8/tidb-data/tikv-20160,/data9/tidb-data/tikv-20160,/data10/tidb-data/tikv-20160

There were no errors or problems at the check, deploy and start stages. The cluster was deployed successfully.

But I have doubts that the TiKV server will work with data2-10 disks.

Perhaps several disks can be added in some other way?

As far as I know, you cannot specify multiple directories for 1 tikv instance, if you want to use multiple disks, maybe you can deploy multiple tikv instances in 1 machine that use different dir on different disks.

I am not that familiar with this part in TiKV, so I reached out to the tikv engineer, I will get back to you if I have the certain answer .

Get confirmed, my previous answer is correct.

1 Like

Thank you very much

You’re welcome! If you have any other questions, feel free to ask.