5.7.25-TiDB-v4.0.0手动均衡tikv节点的空间怎么操作,
tikv001 剩余200G空间
tikv002 剩余500G空间
tikv003 剩余400G空间
你的集群已经 eol 多年,记得及时尽早升级~
- 让 PD 优先将 Region 从空间紧张的 tikv001 迁出
- 手动将部分 Region 迁移到空间充裕的 tikv002/tikv003
- 监控磁盘使用,直到空间分布均匀
升级吧
用标签技术配置,然后有意迁移到region少的节点上啊
3块盘,初始的空间大小一样吗?
版本落后太多了,可以尝试升一下级
默认迁移比较慢,可以临时调高:
tiup ctl pd -u http://pd:2379 config set region-schedule-limit 64
tiup ctl pd -u http://pd:2379 config set leader-schedule-limit 64
tiup ctl pd -u http://pd:2379 config set replica-schedule-limit 64
查看:
tiup ctl pd -u http://pd:2379 config show
这样 PD 会自动把 region 从 tikv001 迁移到 002 / 003。
1 个赞
如果 tikv001 空间最少,可以把 region 赶走。
先查 store id:
tiup ctl pd -u http://pd:2379 store
假设:
tikv001 store_id = 1
执行:
tiup ctl pd -u http://pd:2379 store limit 1 0
或者:
tiup ctl pd -u http://pd:2379 scheduler add evict-leader-scheduler 1
或者使用:
tiup ctl pd -u http://pd:2379 scheduler add evict-region-scheduler 1
这样 PD 会:
把 region 从 store1 迁移到 store2 / store3
调整 Store 权重
# 降低空间紧张节点的权重
tiup ctl pd -u http://pd:2379 store weight <store_id> 1 5
# store_id: tikv001 的 store id
# 参数说明: leader_weight region_weight