Minio Decommission Server Pools

MinIO supports decommissioning and removing server pools from a deployment with two or more pools. To decommission, there must be at least one remaining pool with sufficient available space to receive the objects from the decommissioned pools.

复制代码
# kubectl minio tenant info --namespace tenant myminio                                        
Tenant 'myminio', Namespace 'tenant', Total capacity 144 GiB

Current status: Initialized
MinIO version: quay.io/minio/minio:RELEASE.2023-06-23T20-26-00Z
MinIO service: minio/ClusterIP (port 80)
Console service: myminio-console/ClusterIP (port 9090)

POOL    SERVERS VOLUMES(SERVER) CAPACITY(VOLUME) 
0       4       4               4.0 GiB         
1       4       4               5.0 GiB         

MinIO Root User Credentials:
MINIO_ROOT_USER="minio"
MINIO_ROOT_PASSWORD="minio123"
[root@haiouc ~]# kubectl minio tenant list

Tenant 'myminio', Namespace 'tenant', Total capacity 144 GiB

  Current status: Initialized 
  MinIO version: quay.io/minio/minio:RELEASE.2023-06-23T20-26-00Z 

$ wget https://dl.min.io/client/mc/release/linux-amd64/mc
$ chmod 755 mc


$ ./mc alias set dev4 http://minio.tenant.svc.cluster.local:80 minio minio123 --api s3v4
mc: Configuration written to `/var/jenkins_home/.mc/config.json`. Please update your access credentials.
mc: Successfully created `/var/jenkins_home/.mc/share`.
mc: Initialized share uploads `/var/jenkins_home/.mc/share/uploads.json` file.
mc: Initialized share downloads `/var/jenkins_home/.mc/share/downloads.json` file.
Added `dev4` successfully.
$ ./mc ls dev4
[2024-01-04 06:42:34 UTC]     0B artifacts/
[2024-01-04 06:42:36 UTC]     0B test/


$ ./mc admin decommission status dev4
┌─────┬──────────────────────────────────────────────────────────────────────────────────────┬──────────────────────┬────────┐
│ ID  │ Pools                                                                                │ Raw Drives Usage     │ Status │
│ 1st │ http://myminio-ss-0-{0...3}.myminio-hl.tenant.svc.cluster.local/export{0...3}/data   │ 0.0% (total: 46 GiB) │ Active │
│ 2nd │ http://myminio-pool-1-{0...3}.myminio-hl.tenant.svc.cluster.local/export{0...3}/data │ 0.1% (total: 58 GiB) │ Active │
└─────┴──────────────────────────────────────────────────────────────────────────────────────┴──────────────────────┴────────┘

$ ./mc admin decommission start dev4 http://myminio-pool-1-{0...3}.myminio-hl.tenant.svc.cluster.local/export{0...3}/data
Decommission started successfully for `http://myminio-pool-1-{0...3}.myminio-hl.tenant.svc.cluster.local/export{0...3}/data`.

$ ./mc admin decommission status dev4
┌─────┬──────────────────────────────────────────────────────────────────────────────────────┬──────────────────────┬──────────┐
│ ID  │ Pools                                                                                │ Raw Drives Usage     │ Status   │
│ 1st │ http://myminio-ss-0-{0...3}.myminio-hl.tenant.svc.cluster.local/export{0...3}/data   │ 0.1% (total: 46 GiB) │ Active   │
│ 2nd │ http://myminio-pool-1-{0...3}.myminio-hl.tenant.svc.cluster.local/export{0...3}/data │ 0.1% (total: 58 GiB) │ Draining │
└─────┴──────────────────────────────────────────────────────────────────────────────────────┴──────────────────────┴──────────┘

$ ./mc admin decommission status dev4
┌─────┬──────────────────────────────────────────────────────────────────────────────────────┬──────────────────────┬──────────┐
│ ID  │ Pools                                                                                │ Raw Drives Usage     │ Status   │
│ 1st │ http://myminio-ss-0-{0...3}.myminio-hl.tenant.svc.cluster.local/export{0...3}/data   │ 0.1% (total: 46 GiB) │ Active   │
│ 2nd │ http://myminio-pool-1-{0...3}.myminio-hl.tenant.svc.cluster.local/export{0...3}/data │ 0.1% (total: 58 GiB) │ Complete │
└─────┴──────────────────────────────────────────────────────────────────────────────────────┴──────────────────────┴──────────┘

===>>>>>> Decommission Complete

Once decommission is complete, it will be indicated with Complete status.
Complete means that now you can now safely remove the first pool argument from the MinIO command line.

Decommissioning is Permanent

Once MinIO begins decommissioning a pool, it marks that pool as permanently inactive ("draining"). Cancelling or otherwise interrupting the decommissioning procedure does not restore the pool to an active state. Use extra caution when decommissioning multiple pools.

Decommissioning is a major administrative operation that requires care in planning and execution, and is not a trivial or 'daily' task.

Remove Server Pool

On Kubernetes deployments , MinIO the statefulset specification needs to be modified by changing the command line input for the MinIO container. Once the relevant changes are done proceed to execute kubectl apply -f statefulset.yaml.

On Operator based MinIO deployments you need to modify the tenant.yaml specification and modify the pools: section from two entries to a single entry, once relevant changes are done proceed to execute kubectl apply -f tenant.yaml.

复制代码
1)update the tenant.yaml
  Delete the part related to pool-1

2) delete statefulsets pool-1
[root@haiouc ~]# k get statefulsets -n tenant
NAME             READY   AGE
myminio-pool-1   4/4     51m
myminio-ss-0     1/4     58m
[root@haiouc ~]# k delete statefulsets myminio-pool-1 -n tenant
statefulset.apps "myminio-pool-1" deleted

3) delete pvc of pool-1

4) reboot the pod of tenant


$ ./mc admin decommission status dev4
┌─────┬────────────────────────────────────────────────────────────────────────────────────┬──────────────────────┬────────┐
│ ID  │ Pools                                                                              │ Raw Drives Usage     │ Status │
│ 1st │ http://myminio-ss-0-{0...3}.myminio-hl.tenant.svc.cluster.local/export{0...3}/data │ 0.0% (total: 46 GiB) │ Active │
└─────┴────────────────────────────────────────────────────────────────────────────────────┴──────────────────────┴────────┘
相关推荐
钢铁男儿2 天前
C# 类和继承(扩展方法)
java·servlet·c#
小胖同学~2 天前
JavaWeb笔记
后端·servlet
Despacito0o3 天前
MQTT入门实战宝典:从零起步掌握物联网核心通信协议
物联网·struts·servlet
只在空想家4 天前
Servlet 体系结构
java·后端·servlet
一介草民丶4 天前
Jenkins | Jenkins构建成功服务进程关闭问题
运维·servlet·jenkins
小黄人软件4 天前
jenkins脚本查看及备份
运维·servlet·jenkins
杨DaB6 天前
【JavaWeb】Maven、Servlet、cookie/session
hive·servlet·maven
只在空想家6 天前
Servlet 快速入门
java·后端·servlet
bing_1589 天前
ServletComponentScan 注解的作用
servlet
设计师小聂!9 天前
JDBC+HTML+AJAX实现登陆和单表的CRUD
java·ajax·servlet·html·maven