welcome to netwrkspider

Tuesday, June 11, 2013

How to : High-Availability Storage With GlusterFS 3.2.x On Ubuntu 12.04 LTS server/ Ubuntu 13.04

Gluster is a distributed scale out filesystem that allows rapid provisioning of additional storage based on your storage consumption needs. It incorporates automatic failover as a primary feature. All of this is accomplished without a centralized metadata server.

More info : Visit http://www.gluster.org

The following steps should be performed on SERVER1, SERVER2 and SERVER3.

1 ) Install GlusterFS packages using package manager:

$ apt-get install -y glusterfs-server

2 ) Create a directory which will be exported through GlusterFS:

$mkdir /storage

3 ) Make corresponding changes to the GlusterFS server configuration file:

=================================================================
# /etc/glusterfs/glusterfsd.vol
volume posix
type storage/posix
option directory /storage
end-volume

volume locks
type features/posix-locks
subvolumes posix
end-volume

volume brick
type performance/io-threads
option thread-count 8
subvolumes locks
end-volume

volume server
type protocol/server
option transport-type tcp
subvolumes brick
option auth.addr.brick.allow *
end-volume

=================================================================

4 ) Start GlusterFS server service:

$ service glusterfs-server start

5 ) Make corresponding changes to the GlusterFS client configuration file:

=================================================================

# /etc/glusterfs/glusterfs.vol
volume server1
        type protocol/client
        option transport-type tcp
        option remote-host SERVER1
        option remote-subvolume brick
end-volume

volume server2
        type protocol/client
        option transport-type tcp
        option remote-host SERVER2
        option remote-subvolume brick
end-volume

volume server3
        type protocol/client
        option transport-type tcp
        option remote-host SERVER3
        option remote-subvolume brick
end-volume

volume replicated_storage
        type cluster/replicate
        subvolumes node1 node2 node3
end-volume

==================================================================

6 ) Add following line into /etc/fstab to allow auto-mount:

---------------------------------------------------------------------------------------------------
/etc/glusterfs/glusterfs.vol    /var/www/blog   glusterfs defaults      0 0
---------------------------------------------------------------------------------------------------

7 ) Create a new directory for the php based application (wordpress, Joomla, drupal etc etc. ) content:

$mkdir /var/www/sites/

8 ) Mount the GlusterFS to /var/www/sites:

$ mount -a

1 comment:

Anonymous said...

This is impressive. I've read this theory a while back though this is particularly accurate. Kudos

Also visit my web site seo course london