Installing a CentOS GlusterFS distributed storage cluster

Here are some of the steps I am taking to do.
Build the RPM
# Install Fuse:
yum -y install fuse-devel byacc libtool
# Make sure you install the needed dependencies by looking at the spec file
# Build throws BDB errors, so skip it. It also has a weird default setup with apache 1.3, so just skip that too for now.
rpmbuild -ta glusterfs-2.0.0rc1.tar.gz –without bdb –without modglfs
Install the RPM on both client and server nodes
yum -y install fuse
rpm -Uvh glusterfs-2.0.0rc1-1.i386.rpm
Start the server on all of your nodes (see below for sample vol files)
mkdir /state/partition1/gluster_export # or whatever your export dir is
glusterfs -f /home/jordan/projects/gluster/glusterfs-server.vol
On client nodes, install mounting requirements
yum -y install fuse dkms-fuse # From rpmforge
modprobe fuse # Load fuse module
Mount gluster on the client nodes
mkdir /mnt/gluster
mount -t glusterfs /home/jordan/projects/gluster/glusterfs-client.vol /mnt/gluster/
Basic Configuration for Sample Server spec
# Configuration for each server to export storage
volume posix
type storage/posix
option directory /state/partition1/gluster_export
end-volume
volume locks
type features/locks
subvolumes posix
end-volume
volume brick
type performance/io-threads
option thread-count 4 # Each of my test servers is 4 core
subvolumes locks
end-volume
volume server
type protocol/server
option transport-type tcp
option auth.addr.brick.allow *
subvolumes brick
end-volume
Basic Configuration for Sample Client spec
# Sample client to aggregate 8 storage nodes
volume r1
type protocol/client
option transport-type tcp
option remote-host compute-0-1
option remote-subvolume brick
end-volume
volume r2
type protocol/client
option transport-type tcp
option remote-host compute-0-2
option remote-subvolume brick
end-volume
volume r3
type protocol/client
option transport-type tcp
option remote-host compute-0-3
option remote-subvolume brick
end-volume
volume r4
type protocol/client
option transport-type tcp
option remote-host compute-0-4
option remote-subvolume brick
end-volume
volume r5
type protocol/client
option transport-type tcp
option remote-host compute-0-5
option remote-subvolume brick
end-volume
volume r6
type protocol/client
option transport-type tcp
option remote-host compute-0-6
option remote-subvolume brick
end-volume
volume r7
type protocol/client
option transport-type tcp
option remote-host compute-0-7
option remote-subvolume brick
end-volume
volume r8
type protocol/client
option transport-type tcp
option remote-host compute-0-8
option remote-subvolume brick
end-volume
volume distribute
type cluster/distribute
subvolumes r1 r2 r3 r4 r5 r6 r7 r8
end-volume

No comments:

Post a Comment