<div dir="auto"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 4, 2019 at 5:01 AM Barak Sason Rofman <<a href="mailto:bsasonro@redhat.com" target="_blank" rel="noreferrer">bsasonro@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello everyone,<br><br>I'm about to post several threads with question regarding how Gluster handles different scenarios.<br>I'm looking for answers on architecture/design/"the is the idea" level, and not specifically implementation (however, it would be nice to know where the relevant code is).<br><br>In this thread I want to focus on the "adding servers/bricks" scenario.<br>From what I know at this point, every file that's created is given a 32-bit value based on it's name, and this hashing function is fixed and independent of any factors.<br>Next, there is a function (a routing method), located on the client side, that *is* dependent on outside factors, such as numbers of servers (or bricks) in the system which determines on which server a particular file is located.<br><br>Let's examine the following case:<br>Assume (for simplicity's sake) that the hashing function assign values to file in 1-100 range (instead of 32-bit) and currently there are 4 servers in the cluster.<br>In this case, files 1-25 would be located on server 1, 26-50 on server 2 and so on.<br>Now, if a 5th server is added to the cluster, then the ranges will change: files 1-20 will be located on server 1, 21-40 on server 2 and so on.<br><br>The questions regarding this scenarios are as follows:<br>1 - Does the servers update the clients that an additional server (or brick) has been added to the cluster? If not, how does this happen?<br></div></blockquote><div><br></div><div class="gmail_default" style="font-family:monospace,monospace">Yes, addition of a brick happens through a gluster cli command that updates the volume info in glusterd. Glusterd(the one which updated config and other peers) update clients about this change.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">2 - Does the server also know which files *should* be located on them? if so, does the servers create a link file (which specifies the "real" location of the file) for the files that are supposed to be moved (e.g. files 21-25) or actually move the data right away? Maybe this works in a completely different manner?<br></div></blockquote><div><br></div><div class="gmail_default" style="font-family:monospace,monospace">The addition of a brick has a step for updating the xattrs on the bricks which marks the range for them. The creation of link files happens lazily. Clients look up on all bricks when they don't find the file on the brick where it is supposed to be(called hashed brick), the brick where they find the file is called cached brick and a link file is created.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">For more information on distribute mechanism refer to <a href="https://docs.gluster.org/en/latest/Quick-Start-Guide/Architecture/#dhtdistributed-hash-table-translator" style="font-family:Arial,Helvetica,sans-serif" target="_blank" rel="noreferrer">https://docs.gluster.org/en/latest/Quick-Start-Guide/Architecture/#dhtdistributed-hash-table-translator</a></div><div class="gmail_default" style="font-family:monospace,monospace">For more information on how clients get update from glusterd refer to <a href="https://www.youtube.com/watch?v=Gq-yBYq8Gjg" target="_blank" rel="noreferrer">https://www.youtube.com/watch?v=Gq-yBYq8Gjg</a></div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br>I have additional questions regarding this, but they are dependent om the answers to these question.<br><br>Thank you all for your help.<br>-- <br><div dir="ltr" class="m_7599809399402061259gmail-m_1275532996918098551gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="margin-left:44px"><div style="margin-bottom:0px;margin-left:0px;padding-bottom:5px"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><font face="RedHatText, sans-serif"><span style="font-size:14px;text-transform:capitalize"><b>Barak Sason Rofman</b></span></font><br></div></div></div></div></div></div></div></div></div></div><div style="margin-left:44px"><div style="margin-bottom:0px;margin-left:0px;padding-bottom:5px"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p style="margin:0px;font-size:14px;color:rgb(0,0,0);font-family:overpass,sans-serif;font-weight:bold;padding:0px;text-transform:uppercase"><span style="font-family:RedHatText,sans-serif;font-size:12px;text-transform:capitalize;font-weight:normal;color:rgb(34,34,34)">Gluster Storage </span><span style="font-family:RedHatText,sans-serif;font-size:12px;text-transform:capitalize;font-weight:normal;color:rgb(34,34,34)">Development</span></p></div></div></div></div></div></div></div></div></div></div><div style="margin-left:44px"><div style="margin-bottom:0px;margin-left:0px;padding-bottom:5px"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p style="margin:0px 0px 4px;font-size:12px;font-family:RedHatText,sans-serif"><a href="https://www.redhat.com/" style="color:rgb(0,136,206);margin:0px" target="_blank" rel="noreferrer">Red Hat Israel</a></p><div style="margin-bottom:4px"><p style="margin:0px;font-size:12px;font-family:RedHatText,sans-serif">34 Jerusalem rd. Ra'anana, 43501</p></div><p style="margin:0px;font-size:12px;font-family:RedHatText,sans-serif"><span style="margin:0px;padding:0px">bsasonro<a href="mailto:adi@redhat.com" style="color:rgb(0,0,0);margin:0px" target="_blank" rel="noreferrer">@redhat.com</a> </span> T: <u>+972-9-7692304</u><br>M: <u>+972-52-4326355</u></p><div style="margin-top:12px"><table border="0"><tbody><tr><td width="100px"><a href="https://red.ht/sig" style="color:rgb(17,85,204)" target="_blank" rel="noreferrer"><img src="https://static.redhat.com/libs/redhat/brand-assets/latest/corp/logo.png" width="90" height="auto"></a></td></tr></tbody></table></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
<br>
Community Meeting Calendar:<br>
<br>
APAC Schedule -<br>
Every 2nd and 4th Tuesday at 11:30 AM IST<br>
Bridge: <a href="https://bluejeans.com/836554017" rel="noreferrer noreferrer" target="_blank">https://bluejeans.com/836554017</a><br>
<br>
NA/EMEA Schedule -<br>
Every 1st and 3rd Tuesday at 01:00 PM EDT<br>
Bridge: <a href="https://bluejeans.com/486278655" rel="noreferrer noreferrer" target="_blank">https://bluejeans.com/486278655</a><br>
<br>
Gluster-devel mailing list<br>
<a href="mailto:Gluster-devel@gluster.org" target="_blank" rel="noreferrer">Gluster-devel@gluster.org</a><br>
<a href="https://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer noreferrer" target="_blank">https://lists.gluster.org/mailman/listinfo/gluster-devel</a><br>
<br>
</blockquote></div></div></div>