gluster 3.5 install and volume operations in ubuntu 14.04

Add package repository to 2 nodes

# add-apt-repository ppa:semiosis/ubuntu-glusterfs-3.5 && apt-get update

Install package

# apt-get install glusterfs-server

Join peers into cluster (where “d510” and “d610” are 2 server names known to each other either by dns or /etc/hosts)

# gluster peer probe d510
# gluster peer probe d610

Create a volume and start it

# gluster volume create vol1 replica 2 transport tcp d510:/gluster-storage d610:/gluster-storage force
# gluster volume start vol1

Check volume status

# gluster volume info all

Check peer status

# gluster peer status

Mount a glusterfs volume in a glusterfs client server

# mount -t glusterfs d510:/vol1 /glustermount

Remove a volume

# gluster volume stop volume1 && gluster volume delete volume1

Remove a node (server) from gluster

# gluster peer detach aspireone

Install a gluster client

#apt-get install glusterfs-client

Remove a brick from a volume with 3 bricks, telling gluster we will now have only 2 replicas:

gluster volume remove-brick replica 2 volume1 aspireone:/gluster-storage

A typical entry in /etc/fstab for a client gluster fs is

 d510:/vol1 /glustermount glusterfs defaults 0 0