Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: TiDB升级遇到问题: tmp 目录权限不对
Upgrading from a lower version to 5.0.6 and then to 7.1.5 encountered an error where TiDB failed to start.
Reason:
The oom directory and tmp directory need to be specified.
Solution:
Modify the configuration parameters. During the upgrade, if the startup fails, you need to manually run:
tiup cluster reload xx -R tidb
For the tmp directory, there are some pitfalls. It might be better to default it to the data-dir or deploy-dir.
+1, the issue of upgrade failure caused by incorrect permissions on the tmp directory has been encountered 5 or 6 times in the community already, which is very user-unfriendly.
Additionally, the performance of our system disks in production is very poor, and the capacity is also very small. By default, DDL caches data to the tmp directory, which can easily cause system disk space to become tight.
Is this considered a requirement or a bug?
It is recommended to document it
Common issue, even though it’s documented, people usually don’t pay attention to it.
It seems that Oracle also encountered issues with the tmp directory before, which caused it to fail to start.
Indeed, it is a good method.
Add or modify the following parameters in the TiDB configuration file:
[oom]
path = “/path/to/your/oom/directory”
[tmp]
path = “/path/to/your/tmp/directory”