<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;">&nbsp;│&nbsp;&nbsp;&nbsp; &nbsp;</span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;">&nbsp;├──── Replica set 0</span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;">&nbsp;│&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; │&nbsp;&nbsp;&nbsp; &nbsp;</span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;">&nbsp;│&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ├──── Brick 0: rhs1-1:/gluster/brick1</span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;">&nbsp;│&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; │&nbsp;&nbsp;&nbsp; &nbsp;</span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;">&nbsp;│&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; └──── Brick 1: rhs1-3:/gluster/brick1</span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;">&nbsp;│&nbsp;&nbsp;&nbsp; &nbsp;</span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;">&nbsp;└──── Replica set 1</span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; │&nbsp;&nbsp;&nbsp; &nbsp;</span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ├──── Brick 0: rhs1-2:/gluster/brick1</span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; │&nbsp;&nbsp;&nbsp; &nbsp;</span><br><span style="font-family: courier new,courier,monaco,monospace,sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; └──── 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" &lt;vbellur@redhat.com&gt;<br><b>To: </b>"Antonio Messina" &lt;antonio.s.messina@gmail.com&gt;, 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>&gt; Hi all,<br>&gt;<br>&gt; I would like to know how gluster distribute the data when two bricks<br>&gt; of the same volumes are on the same server. Specifically, I would like<br>&gt; to know if there is any way to spread the replicas on different nodes<br>&gt; whenever possible, in order not to lose any data if the node goes<br>&gt; down.<br>&gt;<br>&gt; I did a simple test and it seems that the way replicas are spread over<br>&gt; the bricks is related to the way the volume is created, that is if I<br>&gt; create a volume with:<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp;gluster volume create vol1 replica 2\<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;gluster-data001:/srv/gluster/vol1.1 \<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;gluster-data001:/srv/gluster/vol1.2 \<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;gluster-data002:/srv/gluster/vol1.1 \<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;gluster-data002:/srv/gluster/vol1.2<br>&gt;<br>&gt; replicas of a file will be stored on the two bricks of the same<br>&gt; server, while if I create the volume with<br>&gt;<br>&gt; &nbsp; &nbsp; &nbsp;gluster volume create vol1 replica 2\<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;gluster-data001:/srv/gluster/vol1.1 \<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;gluster-data002:/srv/gluster/vol1.1 \<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;gluster-data001:/srv/gluster/vol1.2 \<br>&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;gluster-data002:/srv/gluster/vol1.2<br>&gt;<br>&gt; replicas will be saved on two bricks of different servers.<br>&gt;<br>&gt; So, my guess is that if I create a "replica N" replicated+distributed<br>&gt; volumes using the bricks:<br>&gt;<br>&gt; &nbsp; &nbsp;gluster-1:/srv/gluster<br>&gt; &nbsp; &nbsp;...<br>&gt; &nbsp; &nbsp;gluster-[N*M]:/srv/gluster<br>&gt;<br>&gt; gluster internally creates a distributed volumes made of the following<br>&gt; replicated "volumes":<br>&gt;<br>&gt; &nbsp; &nbsp;replicated volume 1: gluster-[1..N]:/srv/gluster<br>&gt; &nbsp; &nbsp;replicated volume 2: gluster-[N+1..2N]:/srv/gluster<br>&gt; &nbsp; &nbsp;...<br>&gt; &nbsp; &nbsp;replicated volume M: gluster-[N*(M-1)+1..N*M]:/srv/gluster<br>&gt;<br>&gt; Is that correct or there is a more complex algorithm involved?<br>&gt;<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>