Install GlusterFS

How to install and setup GlusterFS on Debian Wheezy

Setup a firewall so that all servers can communicate with each other over a secure VPN.

Add the gpg key for the GlusterFS repository:

wget -O - | apt-key add -

Add the repositoriy to your system by adding this line:

deb wheezy main

Now we can install the GlusterFS server:

apt-get update
apt-get install glusterfs-server

Configure to use the appropriate IP address in /etc/glusterfs/glusterd.vol:

volume management
    type mgmt/glusterd
    option working-directory /etc/glusterd
    option transport-type socket
    option transport.socket.keepalive-time 10
    option transport.socket.keepalive-interval 2
    option transport.rdma.bind-address
    option transport.socket.bind-address
    option transport.tcp.bind-address

Restart the service:

/etc/init.d/glusterfs-server restart

Take a look at the current cluster:

gluster --remote-host= peer status

There are not peers present yet, so let’s add one:

gluster --remote-host= peer probe
gluster --remote-host= peer status

Here are some more peers:

Number of Peers: 2

Uuid: ffeaccb6-00ad-488c-9f53-7b215a059d81
State: Peer in Cluster (Connected)

Uuid: 46b50830-03b9-4040-934a-a9da78708543
State: Peer in Cluster (Connected)

Ready to mount the file system:

mount -t glusterfs /mnt/vol

Take a look at the status:

gluster --remote-host= volume info
gluster --remote-host= peer status