[Sheepdog] Drive snapshots and metadata

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Tue Feb 8 13:16:51 CET 2011


At Mon, 07 Feb 2011 23:11:35 +0100,
Leo "costela" Antunes wrote:
> 
> Hi,
> 
> On 04/02/11 18:37, MORITA Kazutaka wrote:
> >> Finally, I see the rather intrusive qemu patch I contributed in the early
> >> days of sheepdog to allow locking and live-migration to coexist has been
> >> superseded by the total removal of the sheepdog locking requirement in
> >> fe14318e31d8. This is a much nicer solution to the problem than mine! Out of
> >> interest, what happens if several clients do access a vdi at the same time?
> >> Is it identical behaviour to accessing (say) an iscsi block device from 2
> >> hosts, e.g. cluster filesystems can be made to work, or are there weaker
> >> ordering guarantees on the sequencing of writes and/or problems with
> >> read-cache consistency that make it less useful?
> > 
> > Both write ordering problem and read-cache consistency problem would
> > happen.  Sheepdog is not designed to support such situation; all
> > objects must be one of the following:
> >  - no writer and multiple reader
> >  - one writer and one reader
> > To use Sheepdog safely, something like a lock system is necessary.
> > 
> > But this assumption makes Sheepdog much simple and achieves low
> > latency.
> 
> Quick follow-up newbie question: does this locking system exist in any
> way? What _does_ happen if I start two kvm guests using the same image?

There is no locking system in Sheepdog codes now.  It is because most
administrators already have something like a management tool to know
which images are used, I think.

If two VMs use the same image at the same time, the following problems
could happen:

 - Even if one VM allocate a new data object, the other VM cannot know
   the fact and cannot read the data.

 - If two VMs send write requests simultaneously, the consistency of
   the replication could broken.  If this happens, there is no means
   to recover the consistency without shutdown and reboot of the VM.

These problems happens when write requests are issued; If two VMs
don't send any write request, no problem will happen.

Thanks,

Kazutaka



More information about the sheepdog mailing list