首页 > 其他分享 >minio serverpool 进行集群扩容测试试用

minio serverpool 进行集群扩容测试试用

时间:2023-03-27 20:39:31浏览次数:65  
标签:... http minio serverpool server 试用 9000 data

minio 以前是推荐联邦解决集群的问题,但是现在已经废弃了,推荐通过server pool 模式进行集群的扩容处理,而且提供了比较全的命令还是比较方便的
以下是一个简单的测试:包含了两个server pool,将1的数据迁移到2中

环境准备

  • docker-compose
    如下包含了两个server pool
 
version: '3.7'
services:
  sidekick:
    image: minio/sidekick:v1.2.0
    tty: true
    ports:
    - "80:80"
    command: --health-path=/minio/health/ready --address :80 http://minio{1...4}:9000
  gateway:
    image:  minio/minio:RELEASE.2022-03-26T06-49-28Z
    command: gateway s3 http://sidekick --console-address ":19000"
    environment:
      MINIO_ACCESS_KEY: minio
      MINIO_SECRET_KEY: minio123
    ports:
    - "9000:9000"
    - "19000:19000"
  minio1:
    image: minio/minio
    volumes:
      - data1-1:/data1
      - data1-2:/data2
      - data1-3:/data3
      - data1-4:/data4
    ports:
      - "9001:9000"
      - "19001:19001"
    environment:
      MINIO_ACCESS_KEY: minio
      MINIO_SECRET_KEY: minio123
    command: server http://minio{1...4}/data{1...4} http://minio{5...8}/data{1...4}  --console-address ":19001"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3
  minio2:
    image: minio/minio
    volumes:
      - data2-1:/data1
      - data2-2:/data2
      - data2-3:/data3
      - data2-4:/data4
    ports:
      - "9002:9000"
      - "19002:19002"
    environment:
      MINIO_ACCESS_KEY: minio
      MINIO_SECRET_KEY: minio123
    command: server http://minio{1...4}/data{1...4} http://minio{5...8}/data{1...4}   --console-address ":19002"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3
  minio3:
    image: minio/minio
    volumes:
      - data3-1:/data1
      - data3-2:/data2
      - data3-3:/data3
      - data3-4:/data4
    ports:
      - "9003:9000"
      - "19003:19003"
    environment:
      MINIO_ACCESS_KEY: minio
      MINIO_SECRET_KEY: minio123
    command: server http://minio{1...4}/data{1...4} http://minio{5...8}/data{1...4}  --console-address ":19003"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3
  minio4:
    image: minio/minio
    volumes:
      - data4-1:/data1
      - data4-2:/data2
      - data4-3:/data3
      - data4-4:/data4
    ports:
      - "9004:9000"
      - "19004:19004"
    environment:
      MINIO_ACCESS_KEY: minio
      MINIO_SECRET_KEY: minio123
    command: server http://minio{1...4}/data{1...4} http://minio{5...8}/data{1...4}  --console-address ":19004"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3
  minio5:
    image: minio/minio
    volumes:
      - data12-1:/data1
      - data12-2:/data2
      - data12-3:/data3
      - data12-4:/data4
    ports:
      - "9005:9000"
      - "19005:19004"
    environment:
      MINIO_ACCESS_KEY: minio
      MINIO_SECRET_KEY: minio123
    command: server http://minio{1...4}/data{1...4} http://minio{5...8}/data{1...4}  --console-address ":19004"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3
  minio6:
    image: minio/minio
    volumes:
      - data22-1:/data1
      - data22-2:/data2
      - data22-3:/data3
      - data22-4:/data4
    ports:
      - "9006:9000"
      - "19006:19004"
    environment:
      MINIO_ACCESS_KEY: minio
      MINIO_SECRET_KEY: minio123
    command: server http://minio{1...4}/data{1...4} http://minio{5...8}/data{1...4}  --console-address ":19004"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3
  minio7:
    image: minio/minio
    volumes:
      - data32-1:/data1
      - data32-2:/data2
      - data32-3:/data3
      - data32-4:/data4
    ports:
      - "9007:9000"
      - "19007:19004"
    environment:
      MINIO_ACCESS_KEY: minio
      MINIO_SECRET_KEY: minio123
    command: server http://minio{1...4}/data{1...4} http://minio{5...8}/data{1...4} --console-address ":19004"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3
  minio8:
    image: minio/minio
    volumes:
      - data42-1:/data1
      - data42-2:/data2
      - data42-3:/data3
      - data42-4:/data4
    ports:
      - "9008:9000"
      - "19008:19004"
    environment:
      MINIO_ACCESS_KEY: minio
      MINIO_SECRET_KEY: minio123
    command: server http://minio{1...4}/data{1...4} http://minio{5...8}/data{1...4}  --console-address ":19004"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
      interval: 30s
      timeout: 20s
      retries: 3
volumes:
  data1-1:
  data1-2:
  data1-3:
  data1-4:
  data2-1:
  data2-2:
  data2-3:
  data2-4:
  data3-1:
  data3-2:
  data3-3:
  data3-4:
  data4-1:
  data4-2:
  data4-3:
  data4-4:
  data12-1:
  data12-2:
  data12-3:
  data12-4:
  data22-1:
  data22-2:
  data22-3:
  data22-4:
  data32-1:
  data32-2:
  data32-3:
  data32-4:
  data42-1:
  data42-2:
  data42-3:
  data42-4:
  • 启动&信息
    可以看到相关server pool 的信息

 

 

退役操作

  • 切换命令
 
mc admin decommission start serverpool http://minio{1...4}/data{1...4} 

 

 

  • 状态
mc admin decommission status serverpool

 

 


说明:此时server pool 1 的节点数据还是可以写入的,同时会同步到server pool 2 中

删除server pool

核心是修改存储池,

  • 参考配置
    对于docker 运行就是将http://minio{1...4}/data{1...4} 移除,如下
 
ommand: server   http://minio{5...8}/data{1...4} --console-address ":19004"
  • 服务重启
    重启minio 集群(建议同时重启,可以使用ansible 等工具)
  • 修改lb 的配置
    我们一般使用的是nginx 主要是进行nginx 的修改,对于流量进行处理

文件效果

  • server pool 1

开始的时候是有数据的

 

 

  • server pool2

server pool 1 的数据到server pool 2 了

说明

以上这是一个简单的测试,对于大规模环境可能会碰到不少问题,按照官方的说明是,多试以及通过查看日志解决,server pool 对于集群的扩容以及存储升级还是一个不错的选择,值得使用

参考资料

https://github.com/minio/minio/blob/master/docs/federation/lookup/README.md
https://blog.min.io/server-pools-streamline-storage-operations/
https://min.io/docs/minio/linux/operations/install-deploy-manage/decommission-server-pool.html
https://min.io/docs/minio/windows/operations/concepts.html#id5
https://min.io/docs/minio/linux/reference/minio-server/minio-server.html#command-minio.server

标签:...,http,minio,serverpool,server,试用,9000,data
From: https://www.cnblogs.com/rongfengliang/p/17262753.html

相关文章

  • 使用unittest运行第一个web自动化测试用例
    unittest:和pytest一样的测试框架,区别在于pytest是第三方框架,unittest是标准库框架一、框架的分层:1、新建一个项目文件夹,并在vscode中打开它          ......
  • 测试用例设计指南
    作者:京东物流 王玉坤软件测试设计是测试过程中重要的测试活动,怎么样设计测试用例能提高我们测试的效率和质量,从以下几个方面做了简单的讲解。1测试用例设计原则测试......
  • P4—需求评审以及测试用例编写
    P4—需求评审以及测试用例编写需求评审以及测试用例编写测试用例设计测试用例(TestCase)是为项目需求而编制的一组测试输入、执行条件以及预期结果,以便测试某个程序是......
  • MinIO上传文件The difference between the request time and the server's time is to
    问题向MinIO上传文件时,抛出异常:Thedifferencebetweentherequesttimeandtheserver‘stimeistoolarge.使用date命令修改CentOS时间后,异常依然存在。相关Linux......
  • minio的使用
    minio介绍1.1.minio是什么?MinIO是一个基于ApacheLicensev2.0开源协议的对象存储服务。它兼容亚马逊S3云存储服务接口,非常适合于存储大容量非结构化的数据,例如图片、......
  • minio
    二.minio介绍minio是什么?MinIO是一个基于ApacheLicensev2.0开源协议的对象存储服务。它兼容亚马逊S3云存储服务接口,非常适合于存储大容量非结构化的数据,例如图片、视......
  • MathTpye安装教程与修改试用期
    如图先去官网下载https://www.wiris.com/en/mathtype/安装完成后新建一个txt文件,输入如下代码WindowsRegistryEditorVersion5.00​[-HKEY_CURRENT_USER\S......
  • 生产环境minio 部署
    minio分布式集群的详细搭建1,准备工作4台服务器,每台服务器,挂载一个硬盘以下不重启识别硬盘echo"---">/sys/class/scsi_host/host0/scanecho"---">/sys/class/......
  • docker安装minio
    拉取镜像dockerpullminio/minio创建容器dockerrun-d-p9000:9000--nameminio\-p9001:9001\-e'MINIO_ACCESS_KEY=minioadmin'\-e'MINIO_SECRET_KEY=......
  • minio基本使用
    使用例子packagecom.lomi.minio;importcn.hutool.core.io.FileUtil;importcn.hutool.core.io.IoUtil;importcn.hutool.http.ContentType;importcn.hutool.jso......