How to Deploy a High‑Availability MinIO Distributed Cluster on Rocky 9
This guide walks you through deploying a highly available MinIO distributed object storage cluster on Rocky 9, covering prerequisites, environment preparation, user and directory setup, configuration files, systemd service creation, testing, Nginx load balancing, and verification of cluster health.
Overview
MinIO distributed storage aggregates multiple drives across hosts into a single object storage server, offering high performance, low operational cost, data protection with erasure coding, and read‑after‑write consistency.
Prerequisites
At least 4 nodes with identical root credentials (MINIO_ROOT_USER, MINIO_ROOT_PASSWORD).
Each node must have 4‑16 drives forming EC sets; total drives must be a multiple of EC set count.
Consistent OS, network, and time (NTP) across nodes.
Environment preparation
Set hostnames, update /etc/hosts, disable firewalld and SELinux, configure a domestic yum source, install required packages, and apply tuned performance profile.
hostnamectl set-hostname minio1
# repeat for other nodes
cat >> /etc/hosts <<EOF
192.168.50.137 minio1
192.168.50.138 minio2
192.168.50.139 minio3
192.168.50.140 minio4
192.168.50.141 nginx
EOF
systemctl disable --now firewalld
iptables -F
yum install -y bash-completion mlocate wget tarIncrease file limits in /etc/security/limits.conf and apply sysctl settings for network and memory.
Create MinIO user and directories
useradd -rs /bin/false minio
mkdir -p /etc/minio /var/log/minio /minio_data
chown -R minio:minio /etc/minio /var/log/minio /minio_dataConfiguration file
MINIO_ROOT_USER=admin
MINIO_ROOT_PASSWORD=Wps@123456
MINIO_VOLUMES="http://192.168.50.137:9000/minio_data http://192.168.50.138:9000/minio_data http://192.168.50.139:9000/minio_data http://192.168.50.140:9000/minio_data"
MINIO_OPTS="--deduplication --console-address :9001 --address :9000"Systemd service
[Unit]
Description=MinIO
Wants=network-online.target
After=network-online.target
AssertFileIsExecutable=/usr/local/bin/minio
AssertFileNotEmpty=/etc/minio/minio.conf
[Service]
WorkingDirectory=/usr/local
User=minio
Group=minio
EnvironmentFile=-/etc/minio/minio.conf
ExecStartPre=/bin/bash -c "if [ -z \"$MINIO_VOLUMES\" ]; then echo \"MINIO_VOLUMES not set\"; exit 1; fi"
ExecStart=/usr/local/bin/minio server $MINIO_VOLUMES $MINIO_OPTS
Restart=always
LimitNOFILE=65536
[Install]
WantedBy=multi-user.targetReload daemon, enable and start the service on each node.
Testing
Access any node on port 9000 for the API or port 9001 for the console, using the credentials defined above.
Nginx load balancing
Install nginx and configure upstreams for both console (port 9001) and API (port 9000) with appropriate proxy settings.
upstream minio_console {
ip_hash;
server 192.168.50.137:9001;
server 192.168.50.138:9001;
server 192.168.50.139:9001;
server 192.168.50.140:9001;
}
server {
listen 80;
location / {
proxy_pass http://minio_console;
# additional proxy headers as needed
}
}Restart nginx and verify access through the load balancer.
Verification
Use curl health‑check endpoints or the MinIO client (mc) to confirm cluster health and data availability.
curl -I http://192.168.50.137:9000/minio/health/live
mc alias set myminio http://192.168.50.137:9000 admin Wps@123456
mc admin info myminioSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
