# Desired behavior:
# Two servers serve as GlusterFS Server. The two servers will
# replicate to each other. I actually think that its the
# client replicating to the two servers. One client (possibly
# a web server is reading/writing to the replicated server.

# Server Config for server1 and server2

volume posix
type storage/posix
option directory /home/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 transport.socket.nodelay on
option auth.addr.brick.allow *
subvolumes brick
end-volume


# Client Config
# cat /etc/glusterfs/glusterfs.vol

volume remote1
type protocol/client
option transport-type tcp
option transport.socket.nodelay on
option remote-host 10.146.10.205
option remote-subvolume brick
end-volume

volume remote2
type protocol/client
option transport-type tcp
option transport.socket.nodelay on
option remote-host 10.146.73.198
option remote-subvolume brick
end-volume

volume replicate
type cluster/replicate
subvolumes remote1 remote2
end-volume

volume writebehind
type performance/write-behind
option window-size 1MB
subvolumes replicate
end-volume

volume cache
type performance/io-cache
option cache-size 512MB
subvolumes writebehind
end-volume

# cat /etc/fstab
/etc/glusterfs/glusterfs.vol  /media/gluster  glusterfs  defaults  0  2