×
×

How to connect to GlusterFS from a client machine

If you still haven't installed GlusterFS server, then read the article on installing and configuring GlusterFS server.

You can connect to GlusterFS server using multiple clients: GlusterFS native client, NFS or CISF. In this article, we'll show you how to install GlusterFS native client 3.5.2 on Ubuntu 12.04 and then how to connect to the GlusterFS server using it.

Here are the steps to connect to the server from a client:

1) Add the GlusterFS PPA.

sudo add-apt-repository ppa:gluster/glusterfs-3.5
sudo apt-get update

2) Install GlusterFS client library.

sudo apt-get install glusterfs-client

3) Create a directory on the client machine where you would want to mount GlusterFS in future. In our case, we used /data.

sudo mkdir /data

4) Mount the GlusterFS volume over /data directory. You will need to provide hostname of one of the GlusterFS servers. For demonstration, we are using server1.redcrackle.com. Please change it with your GlusterFS server's hostname. Similarly replace files-volume in the command below by your GlusterFS volume name. 

sudo mount -t glusterfs server1.redcrackle.com:/files-volume /data

5) Make sure that GlusterFS volume has been mounted. Replace /data in the following command by the directory where you mounted GlusterFS. Output of this command shouldn't be blank.

df -h | grep "/data"

6) If the above command was successful, that means you should be able to create files on GlusterFS from your client machine. Go to /data and create a new file. Then go to each GlusterFS server and make sure that it is present on all of them (if you have set up GlusterFS in replication mode) or in at least one of the servers (if you have set up GlusterFS in distributed mode).

Services: 
Drupal Development

Sign up for our weekly newsletter


Add new comment