k8s搭建minio集群,重启后找不到对应节点

2 篇文章 0 订阅
1 篇文章 0 订阅
文章讲述了在Kubernetes搭建的Minio四节点集群中,重启后出现Minio服务无法正常使用的报错,原因在于集群中的节点数据不共享,需要通过分析报错日志中的driveordering问题,调整节点部署并利用K8s的扩缩容和标签功能来解决问题。
摘要由CSDN通过智能技术生成

简介

如题,k8s搭建minio集群(四节点以上),重启后导致minio不能正常使用。




报错日志

API: SYSTEM()
Time: 04:15:35 UTC 02/28/2024
Error: Following error has been printed 3 times.. Detected unexpected drive ordering refusing to use the drive: expecting http://minio-2.minio.ecmp.svc.cluster.local:9000/data6, found http://minio-0.minio.ecmp.svc.cluster.local:9000/data6, refusing to use the drive (*fmt.wrapError)
       endpoint="http://minio-0.minio.ecmp.svc.cluster.local:9000/data6"
       3: internal/logger/logger.go:248:logger.LogAlwaysIf()
       2: cmd/prepare-storage.go:62:cmd.glob..func7.1()
       1: cmd/erasure-sets.go:238:cmd.(*erasureSets).connectDisks.func2()
 




原因解析

minio集群重启后找不到对应节点的数据,(他虽然是集群,但是数据不是共享的 有点类似于raid),意思就是原来运行minio-0的服务器,只能读minio-0的数据,如果该服务器启动到了minio-1,就没办识别。
不过不要紧张,还是有解决方法滴




解决方案

先看下日志报错

API: SYSTEM()
Time: 04:15:35 UTC 02/28/2024
Error: Following error has been printed 3 times.. Detected unexpected drive ordering refusing to use the drive: expecting http://minio-3.minio.ecmp.svc.cluster.local:9000/data1, found http://minio-2.minio.ecmp.svc.cluster.local:9000/data1, refusing to use the drive (*fmt.wrapError)
       endpoint="http://minio-2.minio.ecmp.svc.cluster.local:9000/data1"
       3: internal/logger/logger.go:248:logger.LogAlwaysIf()
       2: cmd/prepare-storage.go:62:cmd.glob..func7.1()
       1: cmd/erasure-sets.go:238:cmd.(*erasureSets).connectDisks.func2()

API: SYSTEM()
Time: 04:15:35 UTC 02/28/2024
Error: Following error has been printed 3 times.. Detected unexpected drive ordering refusing to use the drive: expecting http://minio-3.minio.ecmp.svc.cluster.local:9000/data7, found http://minio-2.minio.ecmp.svc.cluster.local:9000/data7, refusing to use the drive (*fmt.wrapError)
       endpoint="http://minio-2.minio.ecmp.svc.cluster.local:9000/data7"
       3: internal/logger/logger.go:248:logger.LogAlwaysIf()
       2: cmd/prepare-storage.go:62:cmd.glob..func7.1()
       1: cmd/erasure-sets.go:238:cmd.(*erasureSets).connectDisks.func2()

API: SYSTEM()
Time: 04:15:35 UTC 02/28/2024
Error: Following error has been printed 3 times.. Detected unexpected drive ordering refusing to use the drive: expecting http://minio-0.minio.ecmp.svc.cluster.local:9000/data8, found http://minio-1.minio.ecmp.svc.cluster.local:9000/data8, refusing to use the drive (*fmt.wrapError)
       endpoint="http://minio-1.minio.ecmp.svc.cluster.local:9000/data8"
       3: internal/logger/logger.go:248:logger.LogAlwaysIf()
       2: cmd/prepare-storage.go:62:cmd.glob..func7.1()
       1: cmd/erasure-sets.go:238:cmd.(*erasureSets).connectDisks.func2()

API: SYSTEM()
Time: 04:15:35 UTC 02/28/2024
Error: Following error has been printed 3 times.. Detected unexpected drive ordering refusing to use the drive: expecting http://minio-2.minio.ecmp.svc.cluster.local:9000/data6, found http://minio-0.minio.ecmp.svc.cluster.local:9000/data6, refusing to use the drive (*fmt.wrapError)
       endpoint="http://minio-0.minio.ecmp.svc.cluster.local:9000/data6"
       3: internal/logger/logger.go:248:logger.LogAlwaysIf()
       2: cmd/prepare-storage.go:62:cmd.glob..func7.1()
       1: cmd/erasure-sets.go:238:cmd.(*erasureSets).connectDisks.func2()

先讲下报错的信息,
报错的节点:endpoint=“http://minio-0.minio.ecmp.svc.cluster.local:9000/data6”
报错节点的期望节点:expecting http://minio-2.minio.ecmp.svc.cluster.local:9000/data6
报错节点实际节点:found http://minio-0.minio.ecmp.svc.cluster.local:9000/data6
以上日志提供的信息就是:现在minio-0所在的物理机应该运行minio-2,所以只要把minio-2运行到该节点就可以了。
再分析其他节点的报错找到应该存在的节点即可找到对应关系。
接下来就可以使用k8s的扩缩容+标签的方式让minio启动到对应节点。如果还不清楚可以私信博主



  • 4
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值