Fedora Cluster‎ > ‎

Shared Filesystem

We will now create a GlusterFS shared filesystem that is distributed or replicated among the nodes. Because we have limited space in many of the nodes, our present configuration will consists on two machines, deutsch and kitaev, serving files for all others. The machines will contain two replicas of the data, so that in case of failure of one machine, data can still be retrieved from the others. We have in the past tried other configurations, such as distributing the data into six computers, with two replicas and performance was acceptable.

Configuring the servers

We start by configuring the machines that act as servers, providing them with the software and the rules to handle the connections from other machines. We start by installing the glusterfs software from the standard repositories, from the root account.
# yum install glusterfs-server

Creating the volume

We will now create the filesystem. As mentioned before, we have two machines serving two replicas of the same data. The machines are 'deutsch' and 'kitaev'. Thus, we enter the main one, 'deutsch', and set up the nodes
# gluster peer probe kitaev

We should get a positive message here that can be further confirmed by issuing
# gluster peer status

At this point the file system can be created
# gluster volume create quinfog replica 2 deutsch:/scratch/gluster kitaev:/scratch/gluster
# gluster volume set quinfog auth.reject *
# gluster volume set quinfog auth.allow 161.111.23.*

After this, the system should be ready:
gluster volume start quinfog

Mounting the file system

The following has to be done on every machine that needs to access the shared filesystem. This includes typically the servers, but in this case also 'toffoli'. The step is very simple: first create a root directory for mounting the file system
# mkdir /gfs
and then add the following line at the end of /etc/fstab
131.11.32.15:quinfog /gfs glusterfs defaults
Here 131.11.32.15 is the actual IP of the main server, deutsch.

Once this line is in place, you can simply do
# mount /gfs
and the filesystem should be accessible.