Issues Encountered During TiDB Upgrade

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

Original topic: TiDB升级遇到问题: tmp 目录权限不对

| username: 田帅萌7

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.

| username: dba-kit | Original post link

+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.

| username: dba-kit | Original post link

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.

| username: Billmay表妹 | Original post link

Is this considered a requirement or a bug?

| username: ShawnYan | Original post link

It is recommended to document it

| username: zhanggame1 | Original post link

Common issue, even though it’s documented, people usually don’t pay attention to it.

| username: lemonade010 | Original post link

It seems that Oracle also encountered issues with the tmp directory before, which caused it to fail to start.

| username: TiDBer_3Cusx9uk-0775 | Original post link

Indeed, it is a good method.

| username: TiDBer_7S8XqKfl-1158 | Original post link

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”