具體實際的取捨能夠參考官方文檔,我使用的是4 node 4 driver 模式html
192.168.31.2 192.168.31.3 192.168.31.4 192.168.31.5 每臺機器單獨掛在4塊盤 data1 data2 data3 data4 minio 安裝包參考github 網站
export MINIO_ACCESS_KEY=<ACCESS_KEY> export MINIO_SECRET_KEY=<SECRET_KEY>
/usr/local/bin/minio server http://192.168.31.2/data1 http://192.168.31.2/data2 \ http://192.168.31.2/data3 http://192.168.31.2/data4 \ http://192.168.31.3/data1 http://192.168.31.3/data2 \ http://192.168.31.3/data3 http://192.168.31.3/data4 \ http://192.168.31.4/data1 http://192.168.31.4/data2 \ http://192.168.31.4/data3 http://192.168.31.4/data4 \ http://192.168.31.5/data1 http://192.168.31.5/data2 \ http://192.168.31.5/data3 http://192.168.31.5/data4 等待片刻,節點加入成功,並會格式化磁盤
我使用了lvs nginx 是在realserver 上,並使用了dr 模式node
upstream minio { server 192.168.31.2:9000 weight=10 max_fails=2 fail_timeout=30s; server 192.168.31.3:9000 weight=10 max_fails=2 fail_timeout=30s; server 192.168.31.4:9000 weight=10 max_fails=2 fail_timeout=30s; server 192.168.31.5:9000 weight=10 max_fails=2 fail_timeout=30s; } server { listen 9000; server_name localhost; charset utf-8; default_type text/html; location /{ proxy_set_header Host $http_host; proxy_set_header X-Forwarded-For $remote_addr; client_body_buffer_size 10M; client_max_body_size 10G; proxy_buffers 1024 4k; proxy_read_timeout 300; proxy_next_upstream error timeout http_404; proxy_pass http://minio; } }
實際使用可能須要使用systemd 進行管理,官方提供了腳本nginx
- 參考腳本
[Unit] Description=Minio Documentation=https://docs.minio.io Wants=network-online.target After=network-online.target AssertFileIsExecutable=/usr/local/bin/minio [Service] WorkingDirectory=/usr/local User=minio-user Group=minio-user PermissionsStartOnly=true EnvironmentFile=-/etc/default/minio ExecStartPre=/bin/bash -c "[ -n \"${MINIO_VOLUMES}\" ] || echo \"Variable MINIO_VOLUMES not set in /etc/defaults/minio\"" ExecStart=/usr/local/bin/minio server $MINIO_OPTS $MINIO_VOLUMES # Let systemd restart this service only if it has ended with the clean exit code or signal. Restart=on-success StandardOutput=journal StandardError=inherit # Specifies the maximum file descriptor number that can be opened by this process LimitNOFILE=65536 # Disable timeout logic and wait until process is stopped TimeoutStopSec=0 # SIGTERM signal is used to stop Minio KillSignal=SIGTERM SendSIGKILL=no SuccessExitStatus=0 [Install] WantedBy=multi-user.target # Built for ${project.name}-${project.version} (${project.name})
https://docs.minio.io/docs/distributed-minio-quickstart-guide
https://github.com/minio/minio-servicegit