MinIO扩容集群以及混合磁盘常见问题记录

分布式MinIO云存储优点及缺点


MinIO是目前一款流行的分布式对象存储服务软件.
MinIO优点:
  1. 兼容亚马逊S3云存储服务接口
  2. 分布式云存储
  3. 网关模式直接对接其他对象存储
  4. Minio纠删码节省硬盘,其他优点省略

MinIO最大的缺点是无法动态扩容MinIO集群

MinIO扩容集群


MinIO扩容只能停机扩容. 动态扩容只能等官方更新,也许需要等待XX年
MinIO停机扩容文章:
https://docs.min.io/cn/distributed-minio-quickstart-guide.html

开发者为了变相解决MinIO动态扩容集群, 弄了一个联合模式运行MinIO,详见下面文章
http://docs.minio.org.cn/docs/master/minio-federation-quickstart-guide

MinIO混合硬盘问题


MinIO混合磁盘是可以的. MinIO支持不同大小的硬盘加入节点.
然而,MinIO会根据木桶原理,自动选择最小的硬盘作为容量限制
比如: 1*4T,2*2T,1*1T 四块硬盘组合节点, MinIO只会认 4*1T ,其他空间浪费了
官方建议使用同等大小硬盘加入节点.

MinIO集群修复以及容灾备份问题


MinIO集群修复直接看下面文章


http://docs.minio.org.cn/docs/master/minio-admin-complete-guide

MinIO容灾备份


mc mirror --watch --recursive  olddc/ newdc/

MinIO节点可以直接复制,如果新节点没有存储桶会自动创建
https://docs.min.io/cn/minio-client-complete-guide.html

MinIO系统内核优化参数


此参数由MinIO官方提供,仅供个人参考
kernel.pid_max=4194303
# maximum number of open files/file descriptors
fs.file-max = 4194303
# use as little swap space as possible
vm.swappiness = 1
# prioritize application RAM against disk/swap cache
vm.vfs_cache_pressure = 10
# minimum free memory
vm.min_free_kbytes = 1000000
# maximum receive socket buffer (bytes)
net.core.rmem_max = 268435456
# maximum send buffer socket buffer (bytes)
net.core.wmem_max = 268435456
# default receive buffer socket size (bytes)
net.core.rmem_default = 67108864
# default send buffer socket size (bytes)
net.core.wmem_default = 67108864
# maximum number of packets in one poll cycle
net.core.netdev_budget = 1200
# maximum ancillary buffer size per socket
net.core.optmem_max = 134217728
# maximum number of incoming connections
net.core.somaxconn = 65535
# maximum number of packets queued
net.core.netdev_max_backlog = 250000
# maximum read buffer space
net.ipv4.tcp_rmem = 67108864 134217728 268435456
# maximum write buffer space
net.ipv4.tcp_wmem = 67108864 134217728 268435456
# enable low latency mode
net.ipv4.tcp_low_latency = 1
# socket buffer portion used for TCP window
net.ipv4.tcp_adv_win_scale = 1
# queue length of completely established sockets waiting for accept
net.ipv4.tcp_max_syn_backlog = 30000
# maximum number of sockets in TIME_WAIT state
net.ipv4.tcp_max_tw_buckets = 2000000
# reuse sockets in TIME_WAIT state when safe
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle=1
# time to wait (seconds) for FIN packet
net.ipv4.tcp_fin_timeout = 5
net.ipv4.udp_rmem_min=8192
net.ipv4.udp_wmem_min=8192
# disable icmp send redirects
net.ipv4.conf.all.send_redirects = 0
# disable icmp accept redirect
net.ipv4.conf.all.accept_redirects = 0
# drop packets with LSR or SSR
net.ipv4.conf.all.accept_source_route = 0
# MTU discovery, only enable when ICMP blackhole detected
net.ipv4.tcp_mtu_probing = 1

MinIO个人见解总结


MinIO配置简单,性能强劲,非常适合个人/中小企业组建云存储(对象存储)
由于MinIO暂时没有完全解决动态扩容集群问题, 组建大型商业云存储还是推荐ceph

官方网站: https://min.io/

此处评论已关闭