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节点 该如何操作
[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.
Just change the IP and execute it directly, provided that you have enough resources.
Write a yml configuration for TiFlash, and you can scale out to expand.
The IP address 192.168.33.154 is the node where TiFlash is deployed.
Executed directly but there is a problem.
Take a look at the error log.
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.
The machine deploying TiFlash must support the AVX2 instruction set. You can check this by running cat /proc/cpuinfo | grep avx2
.
cat /proc/cpuinfo | grep avx2 Our machine indeed does not have this output.
Only the machine IP in the above configuration was changed.
After execution, it is in this state.
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.
Now the tiflash status is N/A
As a result,
other parts of the service cannot start. Can this tiflash be removed?
Take a look at the specific logs.
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.
How to delete a TiFlash node
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
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.
Write a yml file for scaling, and make sure to check for default port conflicts before proceeding.