[Gluster-devel] replicate data between 2 servers and 1 client

Alain Gonzalez alaingonza at gmail.com
Fri Feb 13 08:20:29 UTC 2009


I changed vol files, because I need data replicated on three machine (two
servers and one client). If I changed data on 1 machine, data must be
changed on the other two machines...

My actual vol file:

Server1:

volume brick
 type storage/posix
 option directory /home/export/
end-volume


### Add network serving capability to above brick.
volume server
 type protocol/server
 option transport-type tcp
 subvolumes brick
 option auth.addr.brick.allow * # Allow access to "brick" volume
end-volume

Server2

volume brick
 type storage/posix
 option directory /home/export/
end-volume

### Add network serving capability to above brick.
volume server
 type protocol/server
 option transport-type tcp
 subvolumes brick
 option auth.addr.brick.allow * # Allow access to "brick" volume
end-volume

Client:

### Add client feature and attach to remote subvolume of server1
volume brick1
 type protocol/client
 option transport-type tcp
 option remote-host 192.168.240.227      # IP address of the remote brick
 option remote-subvolume brick           # name of the remote volume
end-volume

### Add client feature and attach to remote subvolume of server2
volume brick2
 type protocol/client
 option transport-type tcp
 option remote-host 192.168.240.228      # IP address of the remote brick
 option remote-subvolume brick           # name of the remote volume
end-volume

volume afr
 type cluster/afr
 subvolumes brick1 brick2
end-volume

Raghavendra G said me that in Glusterfs 2.0 requires posix-locks. I proved
changed "type storage/posix" for "type features/posix-locks" but not working
correctly.

2009/2/13 Krishna Srinivas <krishna at zresearch.com>

> Alain,
>
> Are those your actual vol files? just want to confirm.
>
> >    option remote-host 192.168.x.x   # IP address of server2
>
> you need to give proper IP address here.
>
> >    option auth.ip.brick1.allow *all
> >    option auth.ip.afr.allow *all
>
> "*all" is incorrect here.
>
> If these are not your actual vol files, can you paste them here?
>
> Krishna
>
> On Wed, Feb 11, 2009 at 6:04 PM, Alain Gonzalez <alaingonza at gmail.com>
> wrote:
> > Hi,
> >
> > I have a problem. I need to replicate data between three machines. Two of
> > machines are servers and one is a client.
> >
> > If I change data in client, also changed in the two servers. And if I
> change
> > any data on a server1, also changed in the other server2 and client.
> >
> > I have done tests with the tutorials of glusterfs, but I don´t have good
> > results.
> >
> > Someone who can help me?
> >
> > #server1
> >
> > volume brick1
> >    type storage/posix
> >    option directory /home/export #created
> > end-volume
> >
> > volume brick2
> >    type protocol/client
> >    option transport-type tcp/client
> >
> >    option remote-host 192.168.x.x   # IP address of server2
> >    option remote-subvolume brick1   # use brick1 on server2
> > end-volume
> >
> > volume afr
> >    type cluster/afr
> >    subvolumes brick1 brick2
> > end-volume
> >
> >
> > volume server
> >    type protocol/server
> >    option transport-type tcp/server
> >    subvolumes brick1 afr
> >    option auth.ip.brick1.allow *all
> >    option auth.ip.afr.allow *all
> > end-volumevolume brick1
> >
> >
> > #server2
> >
> > volume brick1
> >    type storage/posix
> >    option directory /home/export #created
> > end-volume
> >
> > volume brick2
> >    type protocol/client
> >    option transport-type tcp/client
> >    option remote-host 192.168.x.x   # IP address of server1
> >
> >    option remote-subvolume brick1   # use brick1 on server1
> > end-volume
> >
> > volume afr
> >    type cluster/afr
> >    subvolumes brick2 brick1
> > end-volume
> >
> > volume server
> >    type protocol/server
> >    option transport-type tcp/server
> >
> >    subvolumes brick1 afr
> >    option auth.ip.brick1.allow * #all
> >    option auth.ip.afr.allow * #all
> > end-volume
> >
> > #client
> >
> > volume brick
> >    type protocol/client
> >    option transport-type tcp/client # for TCP/IP transport
> >
> >    option remote-host 192.168.x.x   # IP address of the server ----> IP
> of
> > the server1
> >    option remote-subvolume afr      # name of the remote volume
> > end-volume
> >
> > Best Regards
> >
> > --
> > Alain Gonzalez
> >
> > _______________________________________________
> > Gluster-devel mailing list
> > Gluster-devel at nongnu.org
> > http://lists.nongnu.org/mailman/listinfo/gluster-devel
> >
> >
>



-- 
Alain Gonzalez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-devel/attachments/20090213/cdbcff79/attachment-0003.html>


More information about the Gluster-devel mailing list