Prepare 2 nodes and create 2 mount points for each node. Since the root disk cannot be used in cluster mode, the docker volume is used as the mount point here.
In a 2-node cluster, when one node fails, the read and write operations to the cluster will not be affected.
Exiting on signal: TERMINATED
Waiting for all MinIO sub-systems to be initialized.. lock acquired
All MinIO sub-systems initialized successfully
Waiting for all MinIO IAM sub-system to be initialized.. lock acquired
IAM initialization complete
Status: 4 Online, 0 Offline.
Endpoint: http://192.168.124.129:9000
Browser Access:
http://192.168.124.129:9000
Object API (Amazon S3 compatible):
Go: https://docs.min.io/docs/golang-client-quickstart-guide
Java: https://docs.min.io/docs/java-client-quickstart-guide
Python: https://docs.min.io/docs/python-client-quickstart-guide
JavaScript: https://docs.min.io/docs/javascript-client-quickstart-guide
.NET: https://docs.min.io/docs/dotnet-client-quickstart-guide
Detected default credentials 'minioadmin:minioadmin', please change the credentials immediately by setting 'MINIO_ROOT_USER' and 'MINIO_ROOT_PASSWORD' environment values
Note: When docker deploys cluster mode, you must specify the –net=host parameter, use the host network, and use port mapping to create a cluster.
View container running status
[root@CentOS-7 ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
de5e0fd719c3 minio/minio:RELEASE.2021-06-14T01-29-23Z "/usr/bin/docker-ent…" 29 minutes ago Up 19 minutes minioyy
The client checks the minio status, and the two nodes and the Drivers on each node are all online:
5. Access node 1 minio
Browser access http://192.168.124.122:9000
6. Log in and create a Bucket
Create Bucket: oss, model
7. Access node 2 minio
Browser access http://192.168.124.129:9000
After logging in, it is found that the data has been synchronized to node 2