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 │
└─────┴────────────────────────────────────────────────────────────────────────────────────┴──────────────────────┴────────┘
相关推荐
lied166363480620 小时前
List导出到Excel文件
servlet·list·excel
Predestination王瀞潞2 天前
Java EE开发技术(Servlet整合JDBC银行管理系统-上)
java·servlet·java-ee·jdbc
歪歪1002 天前
在哪些场景下适合使用 v-model 机制?
服务器·前端·javascript·servlet·前端框架·js
星秀日4 天前
框架--SpringMVC
java·开发语言·servlet
天予不洗头4 天前
Docker部署jenkins集成全自动打包部署
servlet
李元豪5 天前
919服务器巡检
运维·服务器·servlet
测试界清流6 天前
基于pytest的接口测试
前端·servlet
m0_728033137 天前
JavaWeb——Servlet生命周期
servlet
我叫小白菜8 天前
【Servlet】使用idea2023创建Servlet JavaWeb
servlet