On Thu, 2 Jan 2014, Wido den Hollander wrote:
> On 01/02/2014 10:40 AM, Dietmar Maurer wrote:
> > I try to understand the default crush rule:
> >
> > rule data {
> >
> > ruleset 0
> >
> > type replicated
> >
> > min_size 1
> >
> > max_size 10
> >
> > step take default
> >
> > step chooseleaf firstn 0 type host
> >
> > step emit
> >
> > }
> >
> > Is this the same as:
> >
> > rule data {
> >
> > ruleset 0
> >
> > type replicated
> >
> > min_size 1
> >
> > max_size 10
> >
> > step take default
> >
> > step choose firstn 0 type host
> >
> > step choose firstn 1 type osd
> >
> > step emit
> >
> > }
> >
> > Or what is the correct way to translate ?chooseleaf? into ?choose??
> >
>
> iirc, chooseleaf goes down the tree and descents into multiple leafs to find
> what you are looking for.
>
> choose goes into that leaf and tries to find what you are looking for without
> going into subtrees.
Right. To a first approximation, these rules are equivalent. The
difference is that the second won't handle the case where you have a host
with many/all OSDs tht are marked out (data will get shifted to the
surviving OSD or you will get no results), whereas the chooseleaf rule
will handle things properly and maintain a balanced distribution.
sage
>
> Wido
>
> >
> >
> > _______________________________________________
> > ceph-users mailing list
> > [email protected]
> > http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
> >
>
>
> --
> Wido den Hollander
> 42on B.V.
>
> Phone: +31 (0)20 700 9902
> Skype: contact42on
> _______________________________________________
> ceph-users mailing list
> [email protected]
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>
>
_______________________________________________
ceph-users mailing list
[email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com