简介

如题,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启动到对应节点。如果还不清楚可以私信博主



Logo

K8S/Kubernetes社区为您提供最前沿的新闻资讯和知识内容

更多推荐