[Gluster-users] Reconstructing files from shards

Jim Kinney jim.kinney at gmail.com
Fri Apr 27 11:45:09 UTC 2018

For me, the process of copying out the drive file from Ovirt is a tedious, very manual process. Each vm has a single drive file with tens of thousands of shards each. Typical vm size is 100G for me. And it's all mostly sparse. So, yes, a copy out from the gluster share is best. 

Did the outstanding bug of adding bricks to sharded domain causing data loss get fixed in release 3.12?

On April 27, 2018 12:00:15 AM EDT, Krutika Dhananjay <kdhananj at redhat.com> wrote:
>The short answer is - no there exists no script currently that can
>the shards together into a single file.
>Long answer:
>IMO the safest way to convert from sharded to a single file _is_ by
>the data out into a new volume at the moment.
>Picking up the files from the individual bricks directly and joining
>although fast, is a strict no-no for many reasons - for example, when
>have a replicated volume
>and the good copy needs to be carefully selected and must remain a good
>copy through the course of the copying process. There could be other
>consistency issues with
>file attributes changing while they are being copied. All of this is
>possible, unless you're open to taking the volume down.
>Then the other option is to have gluster client (perhaps in the shard
>translator itself)) do the conversion in the background within the
>translator stack, which is safer
>but would require that shard lock it until the copying is complete. And
>until then no IO can happen into this file.
>(I haven't found the time to work on this, as there exists a workaround
>I've been busy with other tasks. If anyone wants to volunteer to get
>done, I'll be happy to help).
>But anway, why is copying data into new unsharded volume disruptive for
>On Sat, Apr 21, 2018 at 1:14 AM, Jamie Lawrence
><jlawrence at squaretrade.com>
>> Hello,
>> So I have a volume on a gluster install (3.12.5) on which sharding
>> enabled at some point recently. (Don't know how it happened, it may
>> been an accidental run of an old script.) So it has been happily
>> behind our backs and it shouldn't have.
>> I'd like to turn sharding off and reverse the files back to normal. 
>> of these are sparse files, so I need to account for holes. There are
>> than enough that I need to write a tool to do it.
>> I saw notes ca. 3.7 saying the only way to do it was to read-off on
>> client-side, blow away the volume and start over. This would be
>> disruptive for us, and language I've seen reading tickets and old
>> to this list make me think that isn't needed anymore, but
>confirmation of
>> that would be good.
>> The only discussion I can find are these videos[1]:
>> http://opensource-storage.blogspot.com/2016/07/de-
>> mystifying-gluster-shards.html , and some hints[2] that are old
>> that I don't trust them without confirmation that nothing's changed.
>> video things don't acknowledge the existence of file holes. Also, the
>> in [2] mentions using trusted.glusterfs.shard.file-size to get the
>> of a partly filled hole; that value looks like base64, but when I
>> to decode it, base64 complains about invalid input.
>> In short, I can't find sufficient information to reconstruct these.
>> anyone written a current, step-by-step guide on reconstructing
>> files? Or has someone has written a tool so I don't have to?
>> Thanks,
>> -j
>> [1] Why one would choose to annoy the crap out of their fellow
>> users by using video to convey about 80 bytes of ASCII-encoded
>> I have no idea.
>> [2] http://lists.gluster.org/pipermail/gluster-devel/2017-
>> March/052212.html
>> _______________________________________________
>> Gluster-users mailing list
>> Gluster-users at gluster.org
>> http://lists.gluster.org/mailman/listinfo/gluster-users

Sent from my Android device with K-9 Mail. All tyopes are thumb related and reflect authenticity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gluster.org/pipermail/gluster-users/attachments/20180427/bfdc2563/attachment.html>

More information about the Gluster-users mailing list