linux系统部署minio,强烈推荐( 三 )

 
4.管理操作
# 启用服务 systemctl enable minio.service # 启动 sudo systemctl start minio.service systemctl start minio.service # 重启 systemctl restart minio.service # 停止 systemctl stop minio.service # 查看状态 systemctl status minio.service journalctl -f -u minio.service 多节点多驱动器
对于多节点驱动器部署,至少需要4个以上的节点才能满足最低的纠删码校验修复功能
多节点多驱动器服务部署是官方的方式目前没有实验过,所以本文档可能参考的意义不多 。
建议可直接翻阅官方文档 。
多节点多驱动器官方文档
https://min.io/docs/minio/linux/operations/install-deploy-manage/deploy-minio-multi-node-multi-drive.html
MinIO 强烈建议为部署中的所有节点选择基本相似的硬件配置 。确保硬件(CPU、内存、主板、存储适配器)和软件(操作系统、内核设置、系统服务)在所有节点上保持一致 。
1.按照单节点的步骤部署4台存储服务
 

部署具有单个服务器池,该池由四个具有顺序主机名的 MinIO 服务器主机组成 。
# IP 192.168.10.101 192.168.10.102 192.168.10.103 192.168.10.104 # 或主机名 minio1.example.com minio3.example.com minio2.example.com minio4.example.com
每个服务器上的 /etc/default/minio 文件内容调整如下
# Set the hosts and volumes MinIO uses at startup # The command uses MinIO expansion notation {x...y} to denote a # sequential series. # # The following example covers four MinIO hosts # with 4 drives each at the specified hostname and drive locations. # The command includes the port that each MinIO server listens on # (default 9000) # MINIO_VOLUMES="http://192.168.10.10{1...4}:9000/mnt/disk{1...4}" MINIO_VOLUMES="https://minio{1...4}.example.net:9000/mnt/disk{1...4}" # Set all MinIO server options # # The following explicitly sets the MinIO Console listen address to # port 9001 on all network interfaces. The default behavior is dynamic # port selection. MINIO_OPTS="--console-address :19000" # Set the root username. This user has unrestricted permissions to # perform S3 and administrative API operations on any resource in the # deployment. # # Defer to your organizations requirements for superadmin user name. MINIO_ROOT_USER=minioadmin # Set the root password # # Use a long, random, unique string that meets your organizations # requirements for passwords. MINIO_ROOT_PASSWORD=miniopwd # 负载均衡URL设置 # Set to the URL of the load balancer for the MinIO deployment # This value *must* match across all MinIO servers. If you do # not have a load balancer, set this value to to any *one* of the # MinIO hosts in the deployment as a temporary measure. # MINIO_SERVER_URL="http://192.168.10.100:9000" MINIO_SERVER_URL="https://minio.example.net:9000" 
可能的问题 1. 遇到类似 Unknown lvalue 'ProtectProc' in section 'Service' # 升级systemd yum install systemd-* -y 2. Error: Disk /mnt/disk1 is part of root disk # 将 /etc/default/minio 文件下 设置CI=true # 这是因为minio默认不允许多驱动器模式直接使用根目录的磁盘 CI=true
存储迁移
主要是利用mc进行迁移操作
# 从机器1 迁移到 机器2 # 设置机器1别名 mc alias set mdata http://127.0.0.1:9000 minioadmin miniopwd # 查看已设置的别名列表 mc alias list # 导出备份 mdata:别名,base:存储桶 mc cp --recursive mdata/base/ /mnt/minio_data_bak/ # 将minio_data_bak打包迁移到机器2 # 设置机器2别名 mc alias set mdata http://127.0.0.1:9000 minioadmin miniopwd # 导入备份文件 mdata:别名,base:存储桶 mc cp --recursive /mnt/minio_data_bak/ mdata/base/
更多MC命令可参考官方文档:mc命令操作说明
https://min.io/docs/minio/linux/reference/minio-mc.html#minio-client
结语
如有错误请指正,非常感谢!




推荐阅读