Howto install GlusterFS on Centos
In this tutorial I will show you how to install GlusterFS in a scalable way to create a storage cluster, starting with 2 servers on Centos 5.2. Files will be replicated and splitted accross all servers which is some sort of RAID 10 (raid 1 with < 4 servers). With 4 servers that have each 100GB hard drive, total storage will be 200GB and if one server fails, the data will still be intact and files on the failed server will be replicated on another working server.
1. Introduction
GlusterFS is a clustered file-system capable of scaling to several peta-bytes. It aggregates various storage bricks over Infiniband RDMA or TCP/IP interconnect into one large parallel network file system. Storage bricks can be made of any commodity hardware such as x86-64 server with SATA-II RAID and Infiniband HBA.
2. Installation
First you need to install some software :
yum install make gcc gcc-c++
yum install flex bison byacc
We need to do a dirty trick to get the package fuse-sshfs :
vi /etc/yum.repos.d/CentOS-Base.repo
and add this at the end of the file :
[extras_fedora] name=Fedora Core 6 Extras mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=extras-6&arch=$basea rch enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-extras gpgcheck=0
Next do :
yum install fuse-sshfs --enablerepo=extras_fedora
Now we will install GlusterFS :
Get the same exact version, otherwise there is good chances it wont work. I tried with 2.0.0rc1 and 1.3.12 and there was some issues.
cd /root/ wget http://ftp.gluster.com/pub/gluster/glusterfs/2.0/LATEST/glusterfs-2.0.0rc2.tar.gz tar -zxvf glusterfs-2.0.0rc2.tar.gz cd /root/glusterfs-2.0.0rc2/
Take a minute break and compile :
./configure make && make install
For some reasons, libraries are going in the wrong directory so we need to (if someone has a clean fix to this please post it!) :
cp /usr/local/lib/* -R /usr/lib/
Now we create some folders that will be used later on :
mkdir /mnt/glusterfs mkdir /data/ mkdir /data/export mkdir /data/export-ns mkdir /etc/glusterfs/
The fun begins on the next page :)
Next page : 3. Servers configuration
- subjects:

