How to install and configure GlusterFS on CentOS/ RHEL 5/6

GlusterFS-LogoGlusterFS is a scale-out network-attached storage file system. It has found applications including cloud computing, streaming media services, and content delivery networks. GlusterFS was developed originally by Gluster, Inc., then by Red Hat, Inc., after their purchase of Gluster in 2011. In June 2012 the name was changed to Red Hat Storage Server. In this tutorial we will configure glusterfs for high availability of storage.

Environment Information:

Now I will show you how to configure GlusterFS for apache Document Root i.e /var/www/html. We will replicate the doc root among two webservrs.

Step:1 Enable EPEL Repository on both the Servers:

Before Installing GlusterFS on the servers we need to install epel repository on our system depending on our operating system version using following command.

Step:2 In this step we have to enable glusterfs repository on both Servers:

Step:3 In this step we will install all the dependency Packages using yum on both the servers:

Step:4 Now we have to install the GlusterFS software on both servers

Step:5 After all the installation without any error we will start glusterfs service on both the server

Step:6 After starting the service we have to add fuse module to Linux core for GlusterClient on both the servers.

To make it permanent after a restart of the server follow the below step:

Step:7 Add Both servers on trusted storage .

If you are using any firewall for your servers then you have to allow TCP ports 111, 24007, 24008, 24009 for GlusterFS.

On , run below command .

On , run below command

We can check the status of the trusted storage using below command:

Step:8 Now we have to create a directory for GlusterFS on both servers.

Now we have to make one of the server as master and the other as slave. I am using as master so on that server run below command

Step:9 Now start the volume on both the servers:

Now Mount volumes on :

Also Mount the Volume on :

For the Permanent Mount add below entry in the /etc/fstab file.

Step:10 Testing of File replications

Go to /var/www/html folders on both the server. Modify any file on and verify whether the file is modified on

The following two tabs change content below.

Tapas Mishra

Sr. Engineer (DevOps)
Loves to work on Opensource products. Having experience on Linux environment. Knowledge on Public cloud services like AWS, Rackspace, DigitalOcean, Linode. Please don't hesitate to give a comment on the posts. Your comments are my strength.

4 thoughts on “How to install and configure GlusterFS on CentOS/ RHEL 5/6

  1. I’m either blind or you completely skipped the portion of your walk-through that focuses on provisioning the block level disk for glusterfs.

  2. Your instructions seem to imply one can replicate between RHEL5 and RHEL6 bricks in the same cluster. I wouldn’t assume it’s possible but I’d like to hope. Can you confirm?

    • Hi Bishop,

      As I mentioned in the post that I have used “CentOS 6.4” operating system for the cluster. I am also not sure about “one can replicate between RHEL5 and RHEL6 bricks in the same cluster”.

      Please update us by giving a new comment if you found any source about it.


Leave a Reply