kafka磁盘100%写满,数据不允许删除处理方案

节点内部磁盘迁移!
1、停broker

2、 移动topic的分区
mv /data04/kafka/data/proj-gps-30-md-testdata-sac-0-0 /data01/kafka/data/proj-gps-30-md-testdata-sac-0-0

3、备份对应磁盘的配置文件
cp /data04/kafka/data/recovery-point-offset-checkpoint /home/recovery-point-offset-checkpoint04
cp /data04/kafka/data/replication-offset-checkpoint /home/replication-offset-checkpoint04
cp /data01/kafka/data/recovery-point-offset-checkpoint /home/recovery-point-offset-checkpoint01
cp /data01/kafka/data/replication-offset-checkpoint /home/replication-offset-checkpoint01

4、data04修改recovery-point-offset-checkpoint 和 replication-offset-checkpoint 文件
—第二行数字-1
—删除移走的Partition所在行

5、data01修改recovery-point-offset-checkpoint 和 replication-offset-checkpoint 文件
—第二行数字+1
—增加移过来的Partition

6、重启broker

逐个重启集群中所有的Broker影响:
1、在重启Broker的过程中服务不会中断,但是从每个Broker重启完成之后的5分钟内消费的分区消息可能会发生乱序。
2、重启过程中已有的客户端连接可能会中断。需要您的客户端有自动重连功能,服务端的其他Broker会自动接替服务。
3、重启Broker期间,各个分区处理的消息量也会出现一定的不均衡,需要您评估一下升级变更对您业务可能产生的影响。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值