Version v3.7.0 of the documentation is no longer actively maintained. The site that you are currently viewing is an archived snapshot.
For up-to-date documentation, see the latest version.
The minio_cluster param mark this cluster as a MinIO cluster, and the minio_seq is the sequence number of the MinIO node, which is used to generate MinIO node name like minio-1, minio-2, etc.
This snippet defines a single-node MinIO cluster, using the following command to create the MinIO cluster:
./minio.yml -l minio # init MinIO module on the minio group
Remove Cluster
To destroy an existing MinIO cluster, use the dedicated minio-rm.yml playbook:
./minio-rm.yml -l minio # Remove MinIO cluster
You can also customize the removal process with parameters:
Since Pigsty v3.6+, MinIO cluster removal has been moved to the dedicated minio-rm.yml playbook using the minio_remove role. The prometheus monitoring targets are automatically cleaned up during the removal process.
You cannot scale MinIO at node/disk level, but you can scale at storage pool (multiple nodes) level.
Assume you have a 4-node MinIO cluster and want to double the capacity by adding another four-node storage pool.
minio:hosts:10.10.10.10:{minio_seq:1 , nodename:minio-1 }10.10.10.11:{minio_seq:2 , nodename:minio-2 }10.10.10.12:{minio_seq:3 , nodename:minio-3 }10.10.10.13:{minio_seq:4 , nodename:minio-4 }vars:minio_cluster:miniominio_data:'/data{1...4}'minio_buckets:[{name:pgsql }, { name: infra }, { name: redis } ]minio_users:- {access_key:dba , secret_key:S3User.DBA, policy:consoleAdmin }- {access_key:pgbackrest , secret_key:S3User.SomeNewPassWord , policy:readwrite }# bind a node l2 vip (10.10.10.9) to minio cluster (optional)node_cluster:miniovip_enabled:truevip_vrid:128vip_address:10.10.10.9vip_interface:eth1# expose minio service with haproxy on all nodeshaproxy_services:- name:minio # [REQUIRED] service name, uniqueport:9002# [REQUIRED] service port, uniquebalance:leastconn # [OPTIONAL] load balancer algorithmoptions:# [OPTIONAL] minio health check- option httpchk- option http-keep-alive- http-check send meth OPTIONS uri /docs/minio/health/live- http-check expect status 200servers:- {name:minio-1 ,ip:10.10.10.10 ,port:9000 ,options:'check-ssl ca-file /etc/pki/ca.crt check port 9000'}- {name:minio-2 ,ip:10.10.10.11 ,port:9000 ,options:'check-ssl ca-file /etc/pki/ca.crt check port 9000'}- {name:minio-3 ,ip:10.10.10.12 ,port:9000 ,options:'check-ssl ca-file /etc/pki/ca.crt check port 9000'}- {name:minio-4 ,ip:10.10.10.13 ,port:9000 ,options:'check-ssl ca-file /etc/pki/ca.crt check port 9000'}
Step 1, add 4 node definitions in the group, allocate sequence number 5 to 8.
The key step is to modify the minio_volumes param, assign the new 4 nodes to a new storage pool.
MinIO cannot scale down at the node/disk level, but you can retire at the storage pool (multiple nodes) level —— Add a new storage pool, drain the old storage pool, migrate to the new storage pool, and then retire the old storage pool.
# 1. remove failure nodebin/node-rm <your_old_node_ip>
# 2. replace failure node with the same name (modify the inventory in case of IP change)bin/node-add <your_new_node_ip>
# 3. provisioning MinIO on new node./minio.yml -l <your_new_node_ip>
# 4. instruct MinIO to perform heal actionmc admin heal