How to Add a TiFlash Node to an Existing TiDB Cluster with Minimal Deployment of tidb-server, tikv-server, and pd-server

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

Original topic: 原有tidb集群使用的是 最小部署 tidb-server、tikv-server、pd-server ,现在需要增加一个 tiflash节点 该如何操作

| username: TiDBer_BLeyZ3MR

[TiDB Usage Environment] Production Environment
[TiDB Version] 7.1

Is it possible to directly use the following operations?

Scale TiDB Cluster Using TiUP

Or how should it be operated? According to the official website, using TiFlash requires specific command sets.

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

Just change the IP and execute it directly, provided that you have enough resources.

| username: TiDBer_QYr0vohO | Original post link

Write a yml configuration for TiFlash, and you can scale out to expand.

| username: TiDBer_BLeyZ3MR | Original post link

The IP address 192.168.33.154 is the node where TiFlash is deployed.

| username: TiDBer_BLeyZ3MR | Original post link

Executed directly but there is a problem.

| username: DBAER | Original post link

Take a look at the error log.

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

Check the configuration file to see if it is written as shown above. Then check the tiflash logs on the corresponding node to see why it didn’t start.

| username: shunzi | Original post link

The machine deploying TiFlash must support the AVX2 instruction set. You can check this by running cat /proc/cpuinfo | grep avx2.

| username: TiDBer_BLeyZ3MR | Original post link

cat /proc/cpuinfo | grep avx2 Our machine indeed does not have this output.

| username: TiDBer_BLeyZ3MR | Original post link

Only the machine IP in the above configuration was changed.

| username: TiDBer_BLeyZ3MR | Original post link

After execution, it is in this state.

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

Check on this machine with netstat -anp | grep 9000 to see if this process has started. If it hasn’t started, check the logs in the tiflash directory.

| username: TiDBer_BLeyZ3MR | Original post link

Now the tiflash status is N/A

As a result,


other parts of the service cannot start. Can this tiflash be removed?

| username: Jolyne | Original post link

Take a look at the specific logs.

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

When deploying TiFlash on a hardware platform with a Linux AMD64 architecture, the CPU must support the AVX2 instruction set. Ensure that the command cat /proc/cpuinfo | grep avx2 produces output. When deploying TiFlash on a hardware platform with a Linux ARM64 architecture, the CPU must support the ARMv8 architecture. Ensure that the command cat /proc/cpuinfo | grep 'crc32' | grep 'asimd' produces output. By using vector extension instruction sets, TiFlash’s vectorized engine can provide better performance. If the system does not support it, there is no way around it.

| username: TiDBer_FlJIHsZy | Original post link

How to delete a TiFlash node

| username: 呢莫不爱吃鱼 | Original post link

Scale out expansion

| username: stephanie | Original post link

You can use the scale-out feature provided by tiup to add nodes and the scale-in feature to reduce nodes.
Using TiUP to Scale Out and Scale In a TiDB Cluster | PingCAP Documentation Center

| username: TiDBer_BLeyZ3MR | Original post link

I haven’t successfully deployed TiFlash on my side. However, its status is shown in the cluster. Using tiup restart to start the cluster, other services did not start correctly due to the incorrect status of TiFlash.

| username: 源de爸 | Original post link

Write a yml file for scaling, and make sure to check for default port conflicts before proceeding.