[Sheepdog] Option 'copies'

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Tue Aug 23 17:17:45 CEST 2011


At Mon, 22 Aug 2011 21:53:55 +0200,
Valerio Pachera wrote:
> 
> 2011/8/22 MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>:
> > I'm not sure this answers your questions, but currently you need to
> > run multiple sheep daemons to handle multiple directories.
> 
> "Multiple sheep daemons" means run more time 'sheep <dorectory>" right?
> 
> I did this: created a cluster on two nodes.
> storage1  'sheep /sheep_data' (sda6)
> storage2  'sheep /sheep_data' (sda6)
> 
> I run a vm and chunks have been writen on the two directories.
> 
> Then I added two directories:
> storage1 'sheep /sheep_data2' (sdb6)
> storage2 'sheep /sheep_data2' (sdb6)
> 
> No data have been writen in these last two directories.
> I also run 'dd if=/dev/zero of=tmp bs=1M count=2048' on the vm to make it grow.
> 
> Are the last two directories going to be used when no space is lefet
> on the firts two?

No.  I guess you didn't specify the port number, and the second and
third daemons failed to start.

Example usage:
 $ sheep /sheep_data0 -p 7000
 $ sheep /sheep_data2 -p 7001
 $ sheep /sheep_data2 -p 7002

> 
> 
> 
> >> If I shutdown a node after the other...
> > As you may know, you should run "collie cluster shutdown" before
> > stopping a Sheepdog cluster to avoid extra data copies..
> 
> No, I didn't know. Honestly I do no have very clear how sheepdog
> manage the chunks when a node goes down (e.g. black out).
> Or better: I aspect sheepdog to find out the chunks that have a single
> copy and replicate them in the available nodes.
> What is less clear to me is: what happens when the node comes up again?
> In the scenario of 3 nodes with copies=2, the third node goes down for
> some time; it's data should be replicated on the two nodes left; when
> it's back, it still have the 'old' chunks (some might be changed, some
> not)...
> So we have extra redoundance for some chunks plus some 'old/trash' chunks.
> How does sheepdog manage this?

In most cases, the node discards the old chunks and receives the new
chunks from the other alive nodes.  But if the gone node come back
before the other nodes replicates the lost chunks, the old chunks will
not be discarded because the chunks are up-to-date.


Thanks,

Kazutaka



More information about the sheepdog mailing list