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 │
└─────┴────────────────────────────────────────────────────────────────────────────────────┴──────────────────────┴────────┘
相关推荐
所愿ღ3 天前
JavaWeb-Servlet基础
笔记·servlet
clever1013 天前
在ubuntu系统上离线安装jenkins的做法
ubuntu·servlet·jenkins
鱼鱼说测试4 天前
Jenkins+Python自动化持续集成详细教程
开发语言·servlet·php
别来无恙1496 天前
JavaWeb核心:HttpServletRequest与HttpServletResponse详解
java·前端·servlet
典学长编程8 天前
JavaWeb从入门到精通!第二天!(Servlet)
数据仓库·servlet·javaweb
Elieal13 天前
深入浅出:Ajax 与 Servlet 实现前后端数据交互
前端·ajax·servlet
snow@li14 天前
VSCode:基础使用 / 使用积累
java·servlet·jar
W.KN17 天前
Servlet 学习笔记
笔记·学习·servlet
22:30Plane-Moon18 天前
Servlet作用域,监听器,JSP九大内置对象
java·开发语言·servlet
Resean022318 天前
SpringMVC 6+源码分析(二)DispatcherServlet实例化流程 1
java·spring boot·spring·servlet·springmvc