GlusterFS

http://www.howtoforge.com/high-availability-storage-with-glusterfs-on-centos-5.4-automatic-file-replication-mirror-across-two-storage-servers-p2

Server volfile

[root@storage1 ~]# cat /etc/glusterfs/glusterfsd.vol

volume posix

type storage/posix

option directory /data/export

end-volume

volume locks

type features/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

option auth.addr.brick.allow 192.168.1.*

subvolumes brick

end-volume

Client volfile:

[root@faxout1.yabroo.int ~]# cat /etc/glusterfs/glusterfs.vol

volume remote1

type protocol/client

option transport-type tcp

option remote-host 192.168.1.121

option remote-subvolume brick

end-volume

volume remote2

type protocol/client

option transport-type tcp

option remote-host 192.168.1.122

option remote-subvolume brick

end-volume

volume remote3

type protocol/client

option transport-type tcp

option remote-host 192.168.1.221

option remote-subvolume brick

end-volume

volume remote4

type protocol/client

option transport-type tcp

option remote-host 192.168.1.222

option remote-subvolume brick

end-volume

volume distribute

type cluster/distribute

subvolumes remote1 remote2

end-volume

volume writebehind

type performance/write-behind

option window-size 1MB

subvolumes distribute

end-volume

volume cache

type performance/io-cache

option cache-size 512MB

subvolumes writebehind

end-volume

Adding servers

-add server

-add servers into client vol file

-then on each client:

umount /data

mount

cat /etc/fstab

vi /etc/glusterfs/glusterfs.vol

mount -t glusterfs /etc/glusterfs/glusterfs.vol /data/

df -h