Explore Cloud

A Blog that revolves around Cloud Computing !!
Recent Tweets @sanketdangi

Gluster Filesystem is a clustered filesystem to scale out storage to petabytes and thousands of clients. It is a scale out Network-attached storage(NAS) filesystem. It creates a large parallel network filesystem by interconnecting various storage servers over Ethernet/Infiband RDMA. 

It offers incremental synchronous(across AZ) and asynchronous(across region) replication of data.

GlusterFS offers a single command line utility known as the Gluster Console Manager to simplify configuration and management of your storage environment. Using the Gluster Console Manager, administrators can create new volumes, start volumes, and stop volumes, as required. Administrators can also add bricks to volumes, remove bricks from existing volumes, as well as change translator settings, among other operations.Gluster automatically synchronizes volume configuration information across all Gluster servers. Administrators can also use the commands to create scripts for automation, as well as use the commands as an API to allow integration with third-party applications.

GlusterFS volumes can be configured in three scenarios i.e., Distributed Volumes, Distributed Replicated and Distributed Striped.

 While configuring glusterfs, I came across various documentation issues and thereby thought of coming with blog with covers complete documentation for installation and configuration of gluster in AWS Environment.

Configuration Steps for Multi-AZ Environment

Environment :

  • Operating System : CentOS 5.4
  • AWS Region : US-East
  • Gluster Version : 3.2.0
  • Packages : Glusterfs-core, Glusterfs-fuse
  • Ports : 24007-24019

Steps :

1. Launch EC2 Instances and ensure ports 27004-27019 are open in security group.

 Commands 2-6 should be executed on all instances

 2. Update Repositories :

           # yum update -y


3. Install dependencies : fuse-devel and libibverbs-devel 

            # yum install libibverbs-devel fuse-devel -y 


 4. Download Gluster Packages from http://download.gluster.com/pub/gluster/glusterfs/LATEST/ and install them on instances.

           # rpm -Uvh http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-core-3.2.0-1.x86_64.rpm

           # rpm -Uvh http://download.gluster.com/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-fuse-3.2.0-1.x86_64.rpm




5. Start Glusterd Service

           # service glusterd start


 6. Add filesystem to kernel

          # modprobe fuse


Execute step 7-8 on the instances which is considered as server 

7. Create a trusted pool storage and check the status

          #gluster peer probe <instance2-DNS>/<instance2-IP>


To check the status whether other instances is connected or disconnected

         #gluster peer status


8. Create and start the Volume :

          # gluster volume create <Volume-name> replica 2 transport tcp instance-1:<folder-name> instance-2:<folder-name>


For eg : Consider instance1 as instance1.domain.com and instance2 as instance2.domain.com

         #gluster volume create Test-Volume replica 2 transport tcp instance1.domain.com:/data1 instance2.domain.com:/data2

Start the volume :

         # gluster volume start <Volume-name>


To view the volume information :

        # gluster volume info <Volume-name>



9. Mount the volume on instance-1 and instance-2

        #mount -t glusterfs <Server-DNS>:<Volume-Name> <mount-point>


For eg :

       # mount -t glusterfs instance-1.domain.com:Test-Volume /mount-dir

Perform same steps on instance-2 also. And see whether data is getting replicated or not. 

10. Check whether mount is proper or not :


      #df -h 


Now the Gluster is up and running. Data will be replicated between instance-1 mount-point and instance-2 mount-point.

Looking to replicate data between regions. Check out my post on Gluster using geo-replication. 

Gluster Geo-Replication configuration on Amazon Web Services(AWS) 

Important Links : 

1. Download Gluster Packages  

2. Gluster Filesystem and Configuration Guide   

3. Gluster Filesystem Administration Guide 

4. GlusterFS Wikipedia

  1. sanketdangi posted this