IBM Cloud Docs
Setting up GlusterFS replicated storage with MinIO

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.

  1. 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
    
  2. 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
    
  3. Run the following command on VM2 and VM3 to create brick directory on server nodes.

    mkdir -p /gluster-brick/data
    
  4. Run the following command on VM2 to probe peers from a server node.

    gluster peer probe vm3.fyre.ibm.com
    gluster peer status
    
  5. 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
    
  6. 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
    
  7. Run the following command on VM1 to verify Gluster replication on client.

    echo "Test file from client" > /mnt/gluster-data/test.txt
    
  8. Run the following command on VM2 and VM3 to verify Gluster replication on servers.

    ls /gluster-brick/data/test.txt
    
  9. 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 &
    
  10. Open the following URL in your web browser.

http://:9001
**Login credentials:**

- **Username**: `minioadmin`
- **Password**: `minioadmin`
  1. Create a storage, and upload a file.
  2. 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.