Setting up GlusterFS replicated storage with MinIO
you can use GlusterFS as backend filesystem for minio.
Before you begin
You must have Virtual Machines (VM) with static IPs and hostname resolution configured.
Roles
| Node | Role |
|---|---|
| VM1 | GlusterFS Client (MinIO Host) |
| VM2 | GlusterFS Server |
| VM3 | GlusterFS Server |
Procedure
Complete the following steps to set up GlusterFS replicated storage with MinIO.
-
Run the following command on all nodes (VMs) to install GlusterFS.
dnf install centos-release-gluster -y dnf module enable glusterfs -y dnf install glusterfs-server -y systemctl start glusterd.service systemctl status glusterd.service -
Run the following command on VM2 and VM3 to create brick directory on server nodes.
<ip-of-vm1> vm1.fyre.ibm.com <ip-of-vm2> vm2.fyre.ibm.com <ip-of-vm3> vm3.fyre.ibm.com -
Run the following command on VM2 and VM3 to create brick directory on server nodes.
mkdir -p /gluster-brick/data -
Run the following command on VM2 to probe peers from a server node.
gluster peer probe vm3.fyre.ibm.com gluster peer status -
Run the following command on VM2 to create Gluster volume.
gluster volume create gv0 replica 2 vm2.fyre.ibm.com:/gluster-brick/data vm3.fyre.ibm.com:/gluster-brick/data force gluster volume start gv0 -
Run the following command on VM1 to create Gluster volume on client.
mkdir -p /mnt/gluster-data mount -t glusterfs vm2.fyre.ibm.com:/gv0 /mnt/gluster-data -
Run the following command on VM1 to verify Gluster replication on client.
echo "Test file from client" > /mnt/gluster-data/test.txt -
Run the following command on VM2 and VM3 to verify Gluster replication on servers.
ls /gluster-brick/data/test.txt -
Download the MinIO binary and place it in
/usr/local/bin/, then run the following command.export MINIO_ROOT_USER=minioadmin export MINIO_ROOT_PASSWORD=minioadmin export MINIO_CONSOLE_ADDRESS=":9001" nohup minio server /mnt/gluster-data --address ":9000" > minio.log 2>&1 & -
Open the following URL in your web browser.
http://:9001
**Login credentials:**
- **Username**: `minioadmin`
- **Password**: `minioadmin`
- Create a storage, and upload a file.
- Run the following command on VM2 and VM3 to verify file replication on storage nodes.
ls /gluster-brick/data
Make sure that you see the bucket directory and uploaded file replicated on both storage nodes.