Hi Antonio, There's also a Fred's project on gluster forge, that shows you the brick relationships too
https://forge.gluster.org/lsgvt To give you an idea, here's an example [root@rhs1-1 bin]# lsgvt.py Topology for volume myvol: Distribute set │ ├──── Replica set 0 │ │ │ ├──── Brick 0: rhs1-1:/gluster/brick1 │ │ │ └──── Brick 1: rhs1-3:/gluster/brick1 │ └──── Replica set 1 │ ├──── Brick 0: rhs1-2:/gluster/brick1 │ └──── Brick 1: rhs1-4:/gluster/bric k1 Cheers, Paul C ----- Original Message ----- > From: "Vijay Bellur" <vbel...@redhat.com> > To: "Antonio Messina" <antonio.s.mess...@gmail.com>, > gluster-users@gluster.org > Sent: Wednesday, 12 February, 2014 11:21:50 PM > Subject: Re: [Gluster-users] Question on replicated volumes with bricks on > the same server > On 02/11/2014 03:21 PM, Antonio Messina wrote: > > Hi all, > > > > I would like to know how gluster distribute the data when two bricks > > of the same volumes are on the same server. Specifically, I would like > > to know if there is any way to spread the replicas on different nodes > > whenever possible, in order not to lose any data if the node goes > > down. > > > > I did a simple test and it seems that the way replicas are spread over > > the bricks is related to the way the volume is created, that is if I > > create a volume with: > > > > gluster volume create vol1 replica 2\ > > gluster-data001:/srv/gluster/vol1.1 \ > > gluster-data001:/srv/gluster/vol1.2 \ > > gluster-data002:/srv/gluster/vol1.1 \ > > gluster-data002:/srv/gluster/vol1.2 > > > > replicas of a file will be stored on the two bricks of the same > > server, while if I create the volume with > > > > gluster volume create vol1 replica 2\ > > gluster-data001:/srv/gluster/vol1.1 \ > > gluster-data002:/srv/gluster/vol1.1 \ > > gluster-data001:/srv/gluster/vol1.2 \ > > gluster-data002:/srv/gluster/vol1.2 > > > > replicas will be saved on two bricks of different servers. > > > > So, my guess is that if I create a "replica N" replicated+distributed > > volumes using the bricks: > > > > gluster-1:/srv/gluster > > ... > > gluster-[N*M]:/srv/gluster > > > > gluster internally creates a distributed volumes made of the following > > replicated "volumes": > > > > replicated volume 1: gluster-[1..N]:/srv/gluster > > replicated volume 2: gluster-[N+1..2N]:/srv/gluster > > ... > > replicated volume M: gluster-[N*(M-1)+1..N*M]:/srv/gluster > > > > Is that correct or there is a more complex algorithm involved? > > > The interpretation is correct. The way replica sets are chosen is > related to the order in which bricks are defined at the time of volume > creation. > -Vijay > _______________________________________________ > Gluster-users mailing list > Gluster-users@gluster.org > http://supercolony.gluster.org/mailman/listinfo/gluster-users
_______________________________________________ Gluster-users mailing list Gluster-users@gluster.org http://supercolony.gluster.org/mailman/listinfo/gluster-users