Gluster FS - Quick Start Guide

Introduction

Gluster is a free and open source software scalable network filesystem.

Installation

This guide assumes you will create a replica 3 (1x3) volume using three nodes. The steps are the same if you plan to use a single node.

Install the latest Gluster FS packages on all the nodes.

$ sudo apt install glusterfs-server

Service Setup

Enable and start the kadalu-mgr service on all the storage nodes.

$ sudo systemctl enable glusterd
$ sudo systemctl start glusterd

Add storage nodes

The following commands are run from any one storage node. Login to one node and add other two nodes to the Cluster.

vm1 # gluster peer probe vm2
vm1 # gluster peer probe vm3

vm1 # gluster pool list
UUID                                    Hostname        State
9ac5d869-9542-4dac-9c88-97cfb11a5738    localhost       Connected
dfed8210-53d4-44e6-8a8b-7abe3fddb145    vm2             Connected
710acd83-d3aa-4292-b362-543599d12edf    vm3             Connected

Create a Gluster FS Volume

Now create a directory to use as a storage unit(Brick) and create a Gluster FS Volume.

# mkdir /data/t2     (Run on all the storage nodes)
#
# gluster volume create Test-Vol replica 3 vm1:/data/t2 vm2:/data/t2 vm3:/data/t2
Volume Test-Vol created successfully
#
# gluster volume info
Volume Name: Test-Vol
Type: Replicate
Volume ID: 6e2e447d-550d-44e4-85be-33b35933de3c
Status: Started
Snap Volume: no
Number of Bricks: 1 x 3 = 3
Transport-type: tcp
Bricks:
Brick1: vm1:/data/t2
Brick2: vm2:/data/t2
Brick3: vm3:/data/t2

Mount the volume

# mkdir /mnt/test-vol
# mount -t glusterfs Test-Vol /mnt/test-vol/
# df -h /mnt/test-vol/
Filesystem           Size  Used Avail Use% Mounted on
glusterfs:/Test-Vol  30G  554M   30G   2% /mnt/test-vol