[sheepdog] questions for sheepdog fresh

Hitoshi Mitake mitake.hitoshi at gmail.com
Fri Apr 14 07:39:21 CEST 2017


On Wed, Apr 12, 2017 at 9:03 PM, saxion <saxion at qq.com> wrote:
> Hello everyone, I'm learning distributed storage system sheepdog.
> But I have some questions about sheepdog after I googled what I want to know.
> As far as I know, consistent hashing is used in sheepdog for data distribution.
> For example, a sheepdog cluster with 3 repica policy, an object OID will be mapped to host1, hosti and hostj.
>
> My question is how we get those three host? For every object, an oid will be mapped to(using consistent hashing) only one host(host1 for example), how to select the other two host(hosti and hostj)? Or is there any details I got wrong idea?

Simply selecting three continuing nodes from the vnodes. You can find
the logic here:
https://github.com/sheepdog/sheepdog/blob/master/include/sheep.h#L109

>
> And, when host1 is down, how about the data rebalance/recovery, how to choose the right host to make sure there are 3 copied for every object?

The vnodes are updated during membership change (e.g. join and leave).
The membership is kept consistent for all living nodes by the atomic
broadcast functionality of corosync or zookeeper. So every living node
can have identical vnodes.

>
> Thanks.
>
> saxion
> --
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> https://lists.wpkg.org/mailman/listinfo/sheepdog


More information about the sheepdog mailing list