首页 > 解决方案 > 当一个minio节点的磁盘满了怎么办?

问题描述

我有一个由 8 个 minio 节点组成的集群。每个节点都有一个 1.6 - 1.9 TB 的驱动器。节点 6 的可用空间不到 1 MB,而其余节点的可用空间约为 200GB 到 1 TB。有什么方法可以触发已用资源的重新平衡?

Minio 是通过 docker 运行的,这里是堆栈 def:

version: '3.7'
services:
  minio1:
    image: minio/minio:RELEASE.2021-03-17T02-33-02Z
    network_mode: "host"
    hostname: minio1
    volumes:
      - /opt/iqdata:/data
    ports:
      - "9001:9000"
    command: server http://minio{1...8}/data
    secrets:
      - secret_key
      - access_key
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3
    deploy:
      replicas: 1
      restart_policy:
        delay: 10s
      placement:
          constraints:
            - node.labels.minio1==true
            
  minio2:
    image: minio/minio:RELEASE.2021-03-17T02-33-02Z
    network_mode: "host"
    hostname: minio2
    volumes:
      - /opt/iqdata:/data
    ports:
      - "9002:9000"
    command: server http://minio{1...8}/data
    secrets:
      - secret_key
      - access_key
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3
    deploy:
      replicas: 1
      restart_policy:
        delay: 10s
      placement:
          constraints:
            - node.labels.minio2==true  

  minio3:
    image: minio/minio:RELEASE.2021-03-17T02-33-02Z
    network_mode: "host"
    hostname: minio3
    volumes:
      - /opt/iqdata:/data
    ports:
      - "9003:9000"
    command: server http://minio{1...8}/data
    secrets:
      - secret_key
      - access_key
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3
    deploy:
      replicas: 1
      restart_policy:
        delay: 10s
      placement:
          constraints:
            - node.labels.minio3==true  

  minio4:
    image: minio/minio:RELEASE.2021-03-17T02-33-02Z
    hostname: minio4
    volumes:
      - /opt/iqdata:/data
    ports:
      - "9004:9000"
    command: server http://minio{1...8}/data
    secrets:
      - secret_key
      - access_key
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3      
    deploy:
      replicas: 1
      restart_policy:
        delay: 10s
      placement:
          constraints:
            - node.labels.minio4==true  

  minio5:
    image: minio/minio:RELEASE.2021-03-17T02-33-02Z
    network_mode: "host"
    hostname: minio5
    volumes:
      - /opt/iqdata:/data
    ports:
      - "9005:9000"
    command: server http://minio{1...8}/data
    secrets:
      - secret_key
      - access_key
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3      
    deploy:
      replicas: 1
      restart_policy:
        delay: 10s
      placement:
          constraints:
            - node.labels.minio5==true  

  minio6:
    image: minio/minio:RELEASE.2021-03-17T02-33-02Z
    network_mode: "host"
    hostname: minio6
    volumes:
      - /opt/iqdata:/data
    ports:
      - "9006:9000"
    command: server http://minio{1...8}/data
    secrets:
      - secret_key
      - access_key
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3      
    deploy:
      replicas: 1
      restart_policy:
        delay: 10s
      placement:
          constraints:
            - node.labels.minio6==true  

  minio7:
    image: minio/minio:RELEASE.2021-03-17T02-33-02Z
    network_mode: "host"
    hostname: minio7
    volumes:
      - /opt/iqdata:/data
    ports:
      - "9007:9000"
    command: server http://minio{1...8}/data
    secrets:
      - secret_key
      - access_key
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3      
    deploy:
      replicas: 1
      restart_policy:
        delay: 10s
      placement:
          constraints:
            - node.labels.minio7==true  

  minio8:
    image: minio/minio:RELEASE.2021-03-17T02-33-02Z
    network_mode: "host"
    hostname: minio8
    volumes:
      - /opt/iqdata:/data
    ports:
      - "9008:9000"
    command: server http://minio{1...8}/data
    secrets:
      - secret_key
      - access_key
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3      
    deploy:
      replicas: 1
      restart_policy:
        delay: 10s
      placement:
          constraints:
            - node.labels.minio8==true  

secrets:
  secret_key:
    external: true
  access_key:
    external: true

标签: minio

解决方案


MinIO 不执行任何重新平衡。如果磁盘空间不足,它支持扩展集群(通过添加新的磁盘池) - https://docs.min.io/docs/distributed-minio-quickstart-guide.html

但是,您的情况似乎是异常情况-可能是应用程序中的错误(可能为同一对象创建了太多版本),或者可能是 MinIO 中的错误-不应该发生。没有更多信息,很难确定问题所在。

请知道您可以在https://slack.min.io/24/7/365找到我们。如果您有商业问题,请通过 hello@min.io 或我们的专家聊天功能https://min.io/pricing?action=talk-to-us与我们联系。


推荐阅读