Add multiple servers/peers to a GlusterFS cluster

If you want to add multiple servers to your trusted storage pool with Gluster, it’s extremely easy, but the documentation fails to cover all steps needed and it can become a headache.

I will let you know how to do this in just 2 minutes and it will work like a charm.

First you have to add your servers` IPs to the hostname and help GlusterFS find them easier.

Let’s suppose we have three servers with the IPs 10.10.10.1, 10.10.10.2, and 10.10.10.3. We will add the following lines in /etc/hosts on each of the three servers:

10.10.10.1 gluster1

10.10.10.2 gluster2

10.10.10.3 gluster3

Now you can peer your servers very easily by using the gluster peer probe command. You will have to run the command from one of the servers, so let’s say we will run it from 10.10.10.1:

gluster peer probe gluster2

gluster peer probe gluster3

Now your three servers should be in the same GlusterFS trusted storage pool. To make sure about it, run gluster peer status and it will show you all of your peers.

Leave a Reply

Your email address will not be published. Required fields are marked *