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 天前
JavaWeb-Servlet总结及JSP
java·笔记·servlet
所愿ღ2 天前
JavaWeb-Session和ServletContext
java·笔记·servlet
一勺菠萝丶2 天前
Jenkins 构建 Node 项目报错解析与解决——pnpm lockfile 问题实战
elasticsearch·servlet·jenkins
脑子慢且灵3 天前
[JavaWeb]模拟一个简易的Tomcat服务(Servlet注解)
java·后端·servlet·tomcat·intellij-idea·web
meng半颗糖5 天前
JavaScript 性能优化实战指南
前端·javascript·servlet·性能优化
励志码农5 天前
JavaWeb 30 天入门:第二十三天 —— 监听器(Listener)
java·开发语言·spring boot·学习·servlet
脑子慢且灵6 天前
【JavaWeb】一个简单的Web浏览服务程序
java·前端·后端·servlet·tomcat·web·javaee
柯南二号6 天前
【设计模式】【观察者模式】实例
java·开发语言·servlet
Arthurmoo6 天前
打造高效Jenkins CICD环境全解析
servlet
aristo_boyunv9 天前
拦截器和过滤器(理论+实操)
java·数据仓库·hadoop·servlet