On Mon, Jan 5, 2015 at 6:01 PM, Gregory Farnum <g...@gregs42.com> wrote:
> On Thu, Dec 18, 2014 at 1:21 PM, Robert LeBlanc <rob...@leblancnet.us> wrote:
>> Before we base thousands of VM image clones off of one or more snapshots, I
>> want to test what happens when the snapshot becomes corrupted. I don't
>> believe the snapshot will become corrupted through client access to the
>> snapshot, but some weird issue with PGs being lost or forced to be lost,
>> solar flares or alien invasions.
>>
>> My initial thought was to export a snapshot image and import it over the top
>> of the existing snapshot so that children would be preserved. No such luck.
>> I was hoping there would be a "i-really-really-want-to-do-this" option that
>> would let me restore the snapshot.
>
> I don't get it. This is to try and corrupt the snapshot? To repair it
> in the failure case?

Yes, the idea is to backup/export the snapshot and if it becomes
corrupted to re-import it back in.

>> Am I going about this the wrong way? I can see having to restore a number of
>> VM because of corrupted clone, but I'd hate to lose all the clones because
>> of corruption in the snapshot. I would be happy if the restored snapshot
>> would be flattened if it was a clone of another image previously.
>
> I don't remember exactly what metadata is stored how, that's related
> to this. I believe all the RBD images references are via a GUID that's
> distinct from the image name, which would make this non-trivial. It
> might be easier to upload the snapshot into a new rbd image and then
> change the headers on the children to point at the new image as the
> parent, but I don't think there's any easy tooling to allow that. The
> RBD guys would know better.

If the image could be overwritten, it could preserve the GUID as it
would just overwrite the blocks. If the snapshot is removed, then
either specifying the GUID or repointing the children would be
necessary, but I don't think this would be possible if there are
children (at least without a i-really-really-want-to-do-this option).
Honestly, I only really see restoring the snapshot in place as the
only recovery option that makes sense.

Thanks for the discussion.
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to