<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 <<a href="mailto:hunter86_bg@yahoo.com">hunter86_bg@yahoo.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">On March 22, 2020 7:55:16 AM GMT+02:00, Amar Tumballi <<a href="mailto:amar@kadalu.io" target="_blank">amar@kadalu.io</a>> wrote:<br>
>On Sun, Mar 22, 2020 at 4:29 AM Gionatan Danti <<a href="mailto:g.danti@assyoma.it" target="_blank">g.danti@assyoma.it</a>><br>
>wrote:<br>
><br>
>> Il 2020-03-21 21:02 Strahil Nikolov ha scritto:<br>
>> > WARNING: DO NOT DISABLE SHARDING!!!<br>
>> > EVER!<br>
>><br>
>> Sorry to hijack, but I am genuinely curious: why sharding should not<br>
>be<br>
>> disabled? What does happen if/when disabling sharding?<br>
>><br>
>><br>
>When 'Sharding' is enabled, a single file gets broken into multiple<br>
>files,<br>
>based on offset. But when one does 'readdir()' (ie, ls), those files<br>
>are<br>
>hidden, and only the valid entry is shown from the Shard xlator in the<br>
>graph.<br>
><br>
>Now, when shard is disabled, these files are exposed directly on the<br>
>mountpoint, confusing the user, and making the previously successfully<br>
>written files inaccessible.<br>
><br>
>Hope this helps you to understand why disabling Shard once enabled is<br>
>hard!<br>
><br>
>-Amar<br>
><br>
><br>
>> Thanks.<br>
>><br>
>> --<br>
>> Danti Gionatan<br>
>> Supporto Tecnico<br>
>> Assyoma S.r.l. - <a href="http://www.assyoma.it" rel="noreferrer" target="_blank">www.assyoma.it</a> [1]<br>
>> 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>
>> GPG public key ID: FF5F32A8<br>
>> ________<br>
>><br>
>><br>
>><br>
>> Community Meeting Calendar:<br>
>><br>
>> Schedule -<br>
>> Every 2nd and 4th Tuesday at 14:30 IST / 09:00 UTC<br>
>> Bridge: <a href="https://bluejeans.com/441850968" rel="noreferrer" target="_blank">https://bluejeans.com/441850968</a><br>
>><br>
>> Gluster-users mailing list<br>
>> <a href="mailto:Gluster-users@gluster.org" target="_blank">Gluster-users@gluster.org</a><br>
>> <a href="https://lists.gluster.org/mailman/listinfo/gluster-users" rel="noreferrer" target="_blank">https://lists.gluster.org/mailman/listinfo/gluster-users</a><br>
>><br>
<br>
Hey Amar,<br>
<br>
I was thinking if it'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 >> 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>