<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<br>
<div class="moz-cite-prefix">On 06/08/2015 11:51 AM, Mathieu Chateau
wrote:<br>
</div>
<blockquote
cite="mid:CACpSnaL0bDP2EBcYgcqxFavwp9ZMhuAd6GHeCALAwnx3oA_x5w@mail.gmail.com"
type="cite">
<div dir="ltr">From this slide (maybe outdated) it says that reads
are also balanced (in replication scenario slide 22):
<div><a moz-do-not-send="true"
href="http://www.gluster.org/community/documentation/images/8/80/GlusterFS_Architecture_%26_Roadmap-Vijay_Bellur-LinuxCon_EU_2013.pdf">http://www.gluster.org/community/documentation/images/8/80/GlusterFS_Architecture_%26_Roadmap-Vijay_Bellur-LinuxCon_EU_2013.pdf</a><br>
</div>
<div><br>
</div>
<div>Except for write, having an option to do only "failover"
for reads & lookup would be possible I guess ?</div>
<div><br>
</div>
</div>
</blockquote>
<br>
Lookups have to be sent to both bricks because AFR uses the response
to determine if there is a stale copy etc (and then serve from the
good copy). For reads, if a client is also mounted on the same
machine as the brick, reads will be served from that brick
automatically. You can also use the cluster.read-subvolume option to
explicitly force the client to read from a brick:<br>
<br>
<i>`gluster volume set help</i><i>`<br>
</i><i><br>
<snip></i><i><br>
</i><i><br>
Option: cluster.read-subvolume</i><i><br>
</i><i>Default Value: (null)</i><i><br>
</i><i>Description: inode-read fops happen only on one of the bricks
in replicate. Afr will prefer the one specified using this option
if it is not stale. Option value must be one of the xlator names
of the children. Ex: <volname>-client-0 till
<volname>-client-<number-of-bricks - 1></i><i><br>
</i><i><br>
</i><i></snip></i><i><br>
</i><i><br>
</i>
<blockquote
cite="mid:CACpSnaL0bDP2EBcYgcqxFavwp9ZMhuAd6GHeCALAwnx3oA_x5w@mail.gmail.com"
type="cite">
<div class="gmail_extra"><br clear="all">
<div>
<div class="gmail_signature">Cordialement,<br>
Mathieu CHATEAU<br>
<a moz-do-not-send="true" href="http://www.lotp.fr"
target="_blank">http://www.lotp.fr</a></div>
</div>
<br>
<div class="gmail_quote">2015-06-08 8:11 GMT+02:00 Ravishankar N
<span dir="ltr"><<a moz-do-not-send="true"
href="mailto:ravishankar@redhat.com" target="_blank">ravishankar@redhat.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"><span class=""> <br>
<br>
<div>On 06/08/2015 11:34 AM, Mathieu Chateau wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello Ravi,
<div><br>
</div>
<div>thanks for clearing things up.</div>
<div><br>
</div>
<div>Anything on the roadmap that would help my
case?</div>
</div>
<div class="gmail_extra"><br clear="all">
</div>
</blockquote>
<br>
<br>
</span> I don't think it would be possible for clients to
do I/O only on its local brick and yet expect the bricks'
contents to be in sync in real-time..
<div>
<div class="h5"><br>
<br>
<br>
<blockquote type="cite">
<div class="gmail_extra">
<div>
<div>Cordialement,<br>
Mathieu CHATEAU<br>
<a moz-do-not-send="true"
href="http://www.lotp.fr" target="_blank">http://www.lotp.fr</a></div>
</div>
<br>
<div class="gmail_quote">2015-06-08 6:37 GMT+02:00
Ravishankar N <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:ravishankar@redhat.com"
target="_blank">ravishankar@redhat.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0
0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"><span> <br>
<br>
<div>On 06/06/2015 12:49 AM, Mathieu
Chateau wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello,
<div><br>
</div>
<div>sorry to bother again but I am
still facing this issue.</div>
<div><br>
</div>
<div>client still looks on the "other
side" and not using the node
declared in fstab:</div>
<div>prd-sta-sto01:/gluster-preprod
/mnt/gluster-preprod glusterfs
defaults,_netdev,backupvolfile-server=prd-sta-sto02
0 0<br>
</div>
<div><br>
</div>
<div>I expect client to use sto01 and
not sto02 as it's available.</div>
</div>
</blockquote>
<br>
</span> Hi Mathieu,<br>
When you do lookups (`ls` etc), they are
sent to both bricks of the replica. If you
write to a file, the write is also sent to
both bricks. This is how it works. Only
reads are served from the local brick.<br>
-Ravi
<div>
<div><br>
<br>
<blockquote type="cite">
<div dir="ltr">
<div><br>
</div>
<div>If I add a static route to
break connectivity to sto02 and do
a "df", I have around 30s before
it works.</div>
<div>Then it works ok.</div>
<div><br>
</div>
<div>Questions:</div>
<div>
<ul>
<li>How to force node to stick
as possible with one specific
(local) node ?</li>
<li>How to know where a client
is currently connected?</li>
</ul>
<div>Thanks for your help :)</div>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br
clear="all">
<div>
<div>Cordialement,<br>
Mathieu CHATEAU<br>
<a moz-do-not-send="true"
href="http://www.lotp.fr"
target="_blank">http://www.lotp.fr</a></div>
</div>
<br>
<div class="gmail_quote">2015-05-11
7:26 GMT+02:00 Mathieu Chateau <span
dir="ltr"><<a
moz-do-not-send="true"
href="mailto:mathieu.chateau@lotp.fr"
target="_blank">mathieu.chateau@lotp.fr</a>></span>:<br>
<blockquote class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div dir="ltr">Hello,
<div><br>
</div>
<div>thanks for helping :)</div>
<div><br>
</div>
<div>If gluster server is
rebooted, any way to make
client failback on node
after reboot ?</div>
<div><br>
</div>
<div>How to know which node is
using a client ? I see TCP
connection to both node </div>
<div><br>
</div>
<div>Regards,</div>
</div>
<div class="gmail_extra"><br
clear="all">
<div>
<div>Cordialement,<br>
Mathieu CHATEAU<br>
<a moz-do-not-send="true"
href="http://www.lotp.fr" target="_blank">http://www.lotp.fr</a></div>
</div>
<div>
<div> <br>
<div class="gmail_quote">2015-05-11
7:13 GMT+02:00
Ravishankar N <span
dir="ltr"><<a
moz-do-not-send="true"
href="mailto:ravishankar@redhat.com" target="_blank">ravishankar@redhat.com</a>></span>:<br>
<blockquote
class="gmail_quote"
style="margin:0 0 0
.8ex;border-left:1px
#ccc
solid;padding-left:1ex">
<div text="#000000"
bgcolor="#FFFFFF"><span>
<br>
<br>
<div>On 05/10/2015
08:29 PM,
Mathieu Chateau
wrote:<br>
</div>
<blockquote
type="cite">
<div dir="ltr">Hello,
<div><br>
</div>
<div>Short
way: Is there
any way to
define a
preferred
Gluster server
?<br>
<div><br>
</div>
<div>Long way:</div>
<div>I have
the following
setup (version
3.6.3) :</div>
<div><br>
</div>
<div>Gluster A
<==>
VPN <==>
Gluster B</div>
<div><br>
</div>
<div>Volume is
replicated
between A and
B.</div>
<div><br>
</div>
<div>They are
in same
datacenter,
using a 1Gb/s
connection,
low latency
(0.5ms)</div>
<div><br>
</div>
<div>I have
gluster
clients in lan
A & B.</div>
<div><br>
</div>
<div>When
doing a "ls"
on big folder
(~60k files),
both gluster
node are used,
and so it need
9mn instead on
1mn if only
the local
gluster is
reachable.</div>
<div><br>
</div>
</div>
</div>
</blockquote>
<br>
</span> Lookups (and
writes of course)
from clients are
sent to both bricks
because AFR uses the
result of the lookup
to select which
brick to read from
if there is a
pending heal etc.<br>
If the file is clean
on both A and B,
then reads are
always served from
the local brick.
i.e. reads on
clients mounted on A
will be served from
the brick in A (and
likewise for B).<br>
<br>
Hope that helps,<br>
Ravi<br>
<br>
<br>
<blockquote
type="cite"><span>
<div dir="ltr">
<div>
<div>It's HA
setup,
application is
present on
both side. I
would like a
master/master
setup, but
using only
local node as
possible.</div>
<div><br>
</div>
<div><br
clear="all">
<div>
<div>Regards,<br>
Mathieu
CHATEAU<br>
<a
moz-do-not-send="true"
href="http://www.lotp.fr" target="_blank">http://www.lotp.fr</a></div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</span>
<pre>_______________________________________________
Gluster-users mailing list
<a moz-do-not-send="true" href="mailto:Gluster-users@gluster.org" target="_blank">Gluster-users@gluster.org</a>
<a moz-do-not-send="true" href="http://www.gluster.org/mailman/listinfo/gluster-users" target="_blank">http://www.gluster.org/mailman/listinfo/gluster-users</a></pre>
</blockquote>
<br>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>