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 │
└─────┴────────────────────────────────────────────────────────────────────────────────────┴──────────────────────┴────────┘
相关推荐
Zz_waiting.13 小时前
Javaweb - 10.4 ServletConfig 和 ServletContext
java·开发语言·前端·servlet·servletconfig·servletcontext·域对象
Zz_waiting.1 天前
Javaweb - 10.3 Servlet 生命周期
servlet
凌辰揽月2 天前
Servlet学习
hive·学习·servlet
真实的菜2 天前
Jenkins 插件深度应用:让你的CI/CD流水线如虎添翼 [特殊字符]
servlet·ci/cd·jenkins
天天爱吃肉82183 天前
ZigBee通信技术全解析:从协议栈到底层实现,全方位解读物联网核心无线技术
python·嵌入式硬件·物联网·servlet
Zz_waiting.3 天前
Javaweb - 10.1 Servlet
servlet·tomcat·javaweb
真实的菜4 天前
Jenkins生态与拓展:构建现代化DevOps工具链的终极指南
servlet·jenkins·devops
编程乐学(Arfan开发工程师)13 天前
73、单元测试-断言机制
服务器·数据库·servlet·单元测试·sqlite·log4j·mybatis
程序员的世界你不懂15 天前
将生成的报告通过jenkins发送邮件通知
java·servlet·jenkins
期待のcode15 天前
servlet前后端交互
servlet·交互