MinIO 单节点单硬盘(测试)

2023-10-09  本文已影响0人  偷油考拉

CentOS Stream 9
注:因为ext4无法动态调整inode空间占比,所以选择将ext4改为xfs(支持动态调整inode空间占比)

准备

存储https://min.io/docs/minio/linux/operations/install-deploy-manage/deploy-minio-multi-node-multi-drive.html#local-jbod-storage-with-sequential-mounts

Ensure all nodes in the deployment use the same type (NVMe, SSD, or HDD) of drive with identical capacity (e.g. N TB) .

一、准备安装文件

# MinIO Server
wget https://dl.min.io/server/minio/release/linux-amd64/minio
chmod +x minio
sudo mv minio /usr/local/bin/

# MinIO Client
wget https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
sudo mv mc /usr/local/bin/

二、启动 MinIO Server

mkdir ~/minio
minio server ~/minio --console-address :9090
[root@VM-201-74-centos ~]# minio server ~/minio --console-address :9090
Formatting 1st pool, 1 set(s), 1 drives per set.
WARNING: Host local has more than 0 drives of set. A host failure will result in data becoming unavailable.
WARNING: Detected default credentials 'minioadmin:minioadmin', we recommend that you change these values with 'MINIO_ROOT_USER' and 'MINIO_ROOT_PASSWORD' environment variables
MinIO Object Storage Server
Copyright: 2015-2023 MinIO, Inc.
License: GNU AGPLv3 <https://www.gnu.org/licenses/agpl-3.0.html>
Version: RELEASE.2023-09-07T02-05-02Z (go1.21.1 linux/amd64)

Status:         1 Online, 0 Offline. 
S3-API: http://10.98.201.74:9000  http://127.0.0.1:9000     
RootUser: minioadmin 
RootPass: minioadmin 

Console: http://10.98.201.74:9090 http://127.0.0.1:9090   
RootUser: minioadmin 
RootPass: minioadmin 

Command-line: https://min.io/docs/minio/linux/reference/minio-mc.html#quickstart
   $ mc alias set myminio http://10.98.201.74:9000 minioadmin minioadmin

Documentation: https://min.io/docs/minio/linux/index.html
Warning: The standard parity is set to 0. This can lead to data loss.

三、配置Nginx反向代理

https://min.io/docs/minio/linux/integrations/setup-nginx-proxy-with-minio.html

四、纠错 erasure-coding

https://min.io/docs/minio/linux/operations/concepts/erasure-coding.html#minio-ec-parity

升级、扩容、缩容、迁移

https://min.io/docs/minio/linux/operations/install-deploy-manage/upgrade-minio-deployment.html
https://min.io/docs/minio/linux/operations/install-deploy-manage/expand-minio-deployment.html
https://min.io/docs/minio/linux/operations/install-deploy-manage/decommission-server-pool.html
https://min.io/docs/minio/linux/operations/install-deploy-manage/migrate-fs-gateway.html

集群扩容

https://zhuanlan.zhihu.com/p/632471568?utm_id=0

扩展集群:

  1. 原有启动命令中,添加新的盘即可,尽量批量并发重启,不要一个个重启。

2、新的盘数量,必须是旧盘数量的倍数(即必须是按照server pool进行扩容)

3、可以在原有节点新增目录(单个drives的pool,即非集群模式,无法扩容,即也无法新增目录)

升级集群:

一般情况,替换minIO二进制文件,重启服务即可

缩容集群:

1、RELEASE.2022-01-25T19-56-04Z开始支持减少server pool

2、mc admin decommission start myminio/ https://minio{01...04}.http://example.net:9000/mnt/disk{1...4}/minio mc admin decommission status myminio,查看进度

3、更新启动命令中的盘,重启服务

恢复:

1、某个盘挂了,直接换个盘重新挂到原来的目录即可。

2、某个节点挂了,换个新节点,使用原来的hostname(ip可以不一样),原来的dns解析到新节点,重新加入集群即可。

How to Backup and Restore ACM with OADP and MinIO
https://cloud.redhat.com/blog/how-to-backup-and-restore-acm-with-oadp-and-minio

上一篇下一篇

猜你喜欢

热点阅读