<html><body><div style="font-family: lucida console,sans-serif; font-size: 12pt; color: #000000"><div><br></div><div>Hi Antonio,<br></div><div><br></div><div>There's also a Fred's project on gluster forge, that shows you the brick relationships too<br></div><div><br></div><div><a href="https://forge.gluster.org/lsgvt">https://forge.gluster.org/lsgvt</a> <br></div><div><br></div><div>To give you an idea, here's an example <br></div><div><br></div><div><span style="font-family: courier new,courier,monaco,monospace,sans-serif;">[root@rhs1-1 bin]# lsgvt.py </span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;">Topology for volume myvol:</span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;">Distribute set</span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> │ </span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> ├──── Replica set 0</span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> │ │ </span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> │ ├──── Brick 0: rhs1-1:/gluster/brick1</span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> │ │ </span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> │ └──── Brick 1: rhs1-3:/gluster/brick1</span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> │ </span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> └──── Replica set 1</span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> │ </span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> ├──── Brick 0: rhs1-2:/gluster/brick1</span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> │ </span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;"> └──── Brick 1: rhs1-4:/gluster/bric</span>k1<br><br>Cheers,<br></div><div>Paul C<br></div><div><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Vijay Bellur" <vbellur@redhat.com><br><b>To: </b>"Antonio Messina" <antonio.s.messina@gmail.com>, gluster-users@gluster.org<br><b>Sent: </b>Wednesday, 12 February, 2014 11:21:50 PM<br><b>Subject: </b>Re: [Gluster-users] Question on replicated volumes with bricks on the same server<br><div><br></div>On 02/11/2014 03:21 PM, Antonio Messina wrote:<br>> Hi all,<br>><br>> I would like to know how gluster distribute the data when two bricks<br>> of the same volumes are on the same server. Specifically, I would like<br>> to know if there is any way to spread the replicas on different nodes<br>> whenever possible, in order not to lose any data if the node goes<br>> down.<br>><br>> I did a simple test and it seems that the way replicas are spread over<br>> the bricks is related to the way the volume is created, that is if I<br>> create a volume with:<br>><br>> gluster volume create vol1 replica 2\<br>> gluster-data001:/srv/gluster/vol1.1 \<br>> gluster-data001:/srv/gluster/vol1.2 \<br>> gluster-data002:/srv/gluster/vol1.1 \<br>> gluster-data002:/srv/gluster/vol1.2<br>><br>> replicas of a file will be stored on the two bricks of the same<br>> server, while if I create the volume with<br>><br>> gluster volume create vol1 replica 2\<br>> gluster-data001:/srv/gluster/vol1.1 \<br>> gluster-data002:/srv/gluster/vol1.1 \<br>> gluster-data001:/srv/gluster/vol1.2 \<br>> gluster-data002:/srv/gluster/vol1.2<br>><br>> replicas will be saved on two bricks of different servers.<br>><br>> So, my guess is that if I create a "replica N" replicated+distributed<br>> volumes using the bricks:<br>><br>> gluster-1:/srv/gluster<br>> ...<br>> gluster-[N*M]:/srv/gluster<br>><br>> gluster internally creates a distributed volumes made of the following<br>> replicated "volumes":<br>><br>> replicated volume 1: gluster-[1..N]:/srv/gluster<br>> replicated volume 2: gluster-[N+1..2N]:/srv/gluster<br>> ...<br>> replicated volume M: gluster-[N*(M-1)+1..N*M]:/srv/gluster<br>><br>> Is that correct or there is a more complex algorithm involved?<br>><br><div><br></div>The interpretation is correct. The way replica sets are chosen is <br>related to the order in which bricks are defined at the time of volume <br>creation.<br><div><br></div>-Vijay<br><div><br></div>_______________________________________________<br>Gluster-users mailing list<br>Gluster-users@gluster.org<br>http://supercolony.gluster.org/mailman/listinfo/gluster-users<br></blockquote><div><br></div></div></body></html>