Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: TIDB集群tikv节点磁盘写满,如何清理
[TiDB Usage Environment] Test/PoC
[TiDB Version] v6.1.0
[Reproduction Path] /home/tidb/tidb-data/tikv-20160/db
[Encountered Issue] TiDB cluster TiKV node disk is about to be full
[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]
Refer to this post:
It’s best to plan disk space in advance…
Expand TiKV nodes or disks
Files in the data directory cannot be deleted directly.
If you need to clear table data, you can use drop or truncate to free up some space.
Otherwise, consider expanding the storage.
Prepare to scale out or archive the data.
Do not delete data files from the operating system level. You can set the GC time by using SET GLOBAL tidb_gc_life_time=“60m”; to let the system automatically reclaim space.
For urgent handling, you can delete some .log files and placeholder files to free up space. For a long-term solution, you still need to expand the capacity.
Okay, thank you. Preparing to expand the disk.
Thanks, I’m preparing to expand.
Thank you all for your valuable suggestions. I have decided to expand the disk capacity.