<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Mar 22, 2020 at 11:47 AM Strahil Nikolov &lt;<a href="mailto:hunter86_bg@yahoo.com">hunter86_bg@yahoo.com</a>&gt; 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">On March 22, 2020 7:55:16 AM GMT+02:00, Amar Tumballi &lt;<a href="mailto:amar@kadalu.io" target="_blank">amar@kadalu.io</a>&gt; wrote:<br>
&gt;On Sun, Mar 22, 2020 at 4:29 AM Gionatan Danti &lt;<a href="mailto:g.danti@assyoma.it" target="_blank">g.danti@assyoma.it</a>&gt;<br>
&gt;wrote:<br>
&gt;<br>
&gt;&gt; Il 2020-03-21 21:02 Strahil Nikolov ha scritto:<br>
&gt;&gt; &gt; WARNING: DO NOT DISABLE  SHARDING!!!<br>
&gt;&gt; &gt; EVER!<br>
&gt;&gt;<br>
&gt;&gt; Sorry to hijack, but I am genuinely curious: why sharding should not<br>
&gt;be<br>
&gt;&gt; disabled? What does happen if/when disabling sharding?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;When &#39;Sharding&#39; is enabled, a single file gets broken into multiple<br>
&gt;files,<br>
&gt;based on offset. But when one does &#39;readdir()&#39; (ie, ls), those files<br>
&gt;are<br>
&gt;hidden, and only the valid entry is shown from the Shard xlator in the<br>
&gt;graph.<br>
&gt;<br>
&gt;Now, when shard is disabled, these files are exposed directly on the<br>
&gt;mountpoint, confusing the user, and making the previously successfully<br>
&gt;written files inaccessible.<br>
&gt;<br>
&gt;Hope this helps you to understand why disabling Shard once enabled is<br>
&gt;hard!<br>
&gt;<br>
&gt;-Amar<br>
&gt;<br>
&gt;<br>
&gt;&gt; Thanks.<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Danti Gionatan<br>
&gt;&gt; Supporto Tecnico<br>
&gt;&gt; Assyoma S.r.l. - <a href="http://www.assyoma.it" rel="noreferrer" target="_blank">www.assyoma.it</a> [1]<br>
&gt;&gt; email: <a href="mailto:g.danti@assyoma.it" target="_blank">g.danti@assyoma.it</a> - <a href="mailto:info@assyoma.it" target="_blank">info@assyoma.it</a><br>
&gt;&gt; GPG public key ID: FF5F32A8<br>
&gt;&gt; ________<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Community Meeting Calendar:<br>
&gt;&gt;<br>
&gt;&gt; Schedule -<br>
&gt;&gt; Every 2nd and 4th Tuesday at 14:30 IST / 09:00 UTC<br>
&gt;&gt; Bridge: <a href="https://bluejeans.com/441850968" rel="noreferrer" target="_blank">https://bluejeans.com/441850968</a><br>
&gt;&gt;<br>
&gt;&gt; Gluster-users mailing list<br>
&gt;&gt; <a href="mailto:Gluster-users@gluster.org" target="_blank">Gluster-users@gluster.org</a><br>
&gt;&gt; <a href="https://lists.gluster.org/mailman/listinfo/gluster-users" rel="noreferrer" target="_blank">https://lists.gluster.org/mailman/listinfo/gluster-users</a><br>
&gt;&gt;<br>
<br>
Hey Amar,<br>
<br>
I was  thinking if  it&#39;s possible to retrieve a  sharded file from the brick by concatenating the file + all  shards  one after another.<br>
Do you think that this is possible ?<br>
<br></blockquote><div><br></div><div>Hi Strahil, yes. It is possible. </div><div><br></div><div>Steps:</div><div><br></div><div>1. Find out the GFID of the file. (gfid)</div><div><br></div><div>2. Get all the files with ${gfid}.${idx} (idx ~= 0-NN) from the bricks.</div><div><br></div><div>3. Now merge the files. (cat $shard_file &gt;&gt; bigger_file), in order.</div><div><br></div><div>You should have the content of one big file.</div><div><br></div><div>-Amar</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Best Regards,<br>
Strahil Nikolov<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">--<div><a href="https://kadalu.io" target="_blank">https://kadalu.io</a></div><div>Container Storage made easy!</div><div><br></div></div></div></div>