×
×

CentOS 5.5 x64 GlusterFS image notes

Back

CentOS 5.5 x64 GlusterFS image notes

For more details on operating system please read the CentOS 5.5 x86_64 image notes.

Linux with GlusterFS installed

GlusterFS is a general purpose distributed file system for scalable storage. It aggregates various storage bricks over Infiniband RDMA or TCP/IP interconnect into one large parallel network file system..

The service version (shown in native reported format ) is:

# glusterfs --version
glusterfs 3.0.4 built on Apr 14 2010 08:20:28
Repository revision: v3.0.4
For a minimal cluster you should have as least two Virtual Servers installed.

The following example let configure minimal cluster (based on two VPSes) with RAID 1 (the same files on each VPS) volumes.

1. Add a special hostname for each VPS to /etc/hosts on both VPSes. Let’s call them gluster1 and gluster2

# vim /etc/hosts
VPS1_IP gluster1
VPS2_IP gluster2

2. Make the directories for the GlusterFS volumes on each VPS:

mkdir -p /export/store1

3. We’re ready to make the configuration files for our storage volumes. This only needs to be run on the first VPS:

# glusterfs-volgen --name store1 --raid 1 gluster1:/export/store1 gluster2:/export/store1
Generating server volfiles.. for server 'gluster2'
Generating server volfiles.. for server 'gluster1'
Generating client volfiles.. for transport 'tcp'

4. Once that’s done, you’ll have four new files:
* booster.fstab - you won’t need this file
* gluster1-store1-export.vol - server-side configuration file for the first VPS
* gluster2-store1-export.vol - server-side configuration file for the second VPS
* store1-tcp.vol - client side configuration file for GlusterFS clients

5. Copy the gluster1-store1-export.vol file to /etc/glusterfs/glusterfsd.vol on your first VPS

# cp ./gluster1-store1-export.vol /etc/glusterfs/glusterfsd.vol

6. Copy gluster2-store1-export.vol to /etc/glusterfs/glusterfsd.vol on your second VPS

# scp ./gluster2-store1-export.vol root@gluster2:/etc/glusterfs/glusterfsd.vol

Be ready to give gluster2 (VPS2 box) root user password.

7. Copy the store1-tcp.vol should be copied to /etc/glusterfs/glusterfs.vol on both VPSes.

# cp ./store1-tcp.vol /etc/glusterfs/glusterfs.vol
# scp ./store1-tcp.vol root@gluster2:/etc/glusterfs/glusterfs.vol

8. Restart the GlusterFS servers on each VPS:

service glusterfsd restart

and configure it to start on VPS boot time

chkconfig glusterfsd on

9. You can now mount the GlusterFS volume on both VPSes:

# mkdir -p /mnt/glusterfs
# glusterfs /mnt/glusterfs/

10. Now you can save any data into /mnt/glusterfs on the first VPS, and it will be available on the second (and vice versa)

Obviously, this is a very simple and basic implementation of GlusterFS. You can increase performance by making dedicated VPSes just for serving data and you can adjust the default performance options when you mount a GlusterFS volume.

Please find more at GlusterFS Technical FAQ and the GlusterFS User Guide.