Advanced CRUSH map rules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 14, 2014 at 9:56 AM, Fabrizio G. Ventola
<fabrizio.ventola at uniba.it> wrote:
> Hi everybody,
>
> Is it possible with CRUSH map to make a rule that puts R-1 replicas on
> a node and the remaining one on a different node of the same failure
> domain (for example datacenter) putting the replicas considering a
> deeper failure domain (e.g. room)? Statement "step emit" may help in
> this?
> Ideally I'm trying to put two of three replicas into same datacenter
> but in different rooms (or similar) and the remaining one in another
> datacenter. CRUSH map can do this or it's only achievable with
> zone/region configuration with rados gw?

CRUSH can do this. You'd have two choose <bucket>...emit sequences;
the first of which would descend down to a host and then choose n-1
devices within the host; the second would descend once. I think
something like this should work:

step take default
step choose firstn 1 datacenter
step chooseleaf firstn -1 room
step emit
step chooseleaf firstn 1 datacenter
step emit

Would pick one datacenter, and put R-1 copies of the data in separate
rooms. Then it would pick another datacenter and put 1 copy of the
data somewhere in it. I haven't tested this and it's been a while so
there might be some sharp edges, though (I *think* that should work
just fine, but you might need to use choose statements instead of
chooseleaf all the way down or something).
-Greg

> And it's even possible to specifiy the "primary affinity" in the sense
> that for specified clients (or for specified pools) ceph has to store
> the primary replica in the closest (to the client) datacenter and the
> other replica in another datacenter.

To do something like this you'd want to set up pools with special
rules to do that. Instead of "step take default" you'd do "step take
<primary_datacenter>".
-Greg
Software Engineer #42 @ http://inktank.com | http://ceph.com


[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux