Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 扩容缩容的配置文件问题
[TiDB Usage Environment] Production Environment / Testing / Poc
Production Environment
[TiDB Version]
5.2.1
[Reproduction Path] What operations were performed when the issue occurred
After scaling down, I used tiup cluster edit-config to view the configuration file of the cluster, which still had the configuration file after scaling down. Then I restarted the entire cluster, and an error occurred. How do I delete the previous configuration file from the cluster configuration file?
[Encountered Issue: Issue Phenomenon and Impact]
[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]
What is the error message?
Directly reloading the cluster prompts to load the previously deleted configuration information. I started the components in the following order: PD → TiKV → Pump → TiDB → TiFlash → Drainer → TiCDC → Prometheus → Grafana → Alertmanager, and only then was I able to bring the cluster up.
Is the issue resolved now?
The cluster was started in order, but starting the cluster directly doesn’t work. If you use edit-cluster to delete the configuration, it cannot be saved and exited. I just want to know how to delete the residual error messages.
Are you referring to the configuration information of tiup? Back it up first.
After deleting it, the cluster information will be lost. If it doesn’t work, restore the backup.
That’s right, it can only be done this way. It feels a bit troublesome. Isn’t there something like vim where you can modify, save, and exit to take effect? 
After making the changes, restart the relevant nodes or the entire cluster for the parameters to take effect.
Got it, it might be that a machine was not scaled down previously and was directly removed, causing the configuration file not to load and take effect, resulting in residual error messages… In this case, should we back it up as mentioned above?
How did you scale down? You didn’t just edit the config to remove the relevant components, did you?
Yes, I didn’t use scale-in, just removed it directly, which caused the config information to still have the information of the scaled-down machines. 
Okay, thank you very much.
Reducing capacity is not done this way; you need to follow the method outlined on the official website.
Yes, it was someone else’s misoperation. Is there any way to remove these error messages now and ensure that the configuration information is clean?
I think you can go to the suggestions and feedback section and propose that tiup should automatically back up meta files. For example, every time a modification is successfully saved, it can automatically back up the file before the modification.
It can only be manually identified~
Quite troublesome