Setup GlusterFS
A step by step guide of how to set up GlusterFS on two servers (nodes)
Note
Do all the steps on every server you have.
Configure Hosts file
We use hosts to use names instead of IP addresses.
Edit the /etc/hosts
with something like this:
Install GlusterFS
Start the service and enable it.
Make a partition
BUT create a xfs
file system. And follow this setup for this file system.
Configure the firewall
The Gluster processes on the nodes need to be able to communicate with each other. To simplify this setup, configure the firewall on each node to accept all traffic from the other node.
We will add only the interface as well, where the Glusters communicate, the interface is wg0
for example.
Connect the peers
Check status:
Set up a GlusterFS volume
Create a directory gv0
on the partition created for GlusterFS.
Do this next two commands only on one node.
If you only using 2 nodes make sure of the split brain problem
Start the volume
You can check if it's working on both nodes with the command:
Mounting the GlusterFS Volume
If you want to use the GlusterFS volume, mount the volume to any client.
List of sources
HowtoForge.com __- Muhammad Arul - https://www.howtoforge.com/tutorial/high-availability-storage-with-glusterfs-on-ubuntu-1804/
Last updated
Was this helpful?