[PVE-User] Crush map ruleset for 2 room setup

Karsten Becker karsten.becker at ecologic.eu
Fri Feb 16 21:56:36 CET 2018


Hi.

I want to run my Ceph cluster in a 2 datacenter/room setup with pool
size/replica 3.

But I don't get it done to define the ruleset correctly - or at least I
am unsure if it is correct.

I have the following setup of my Ceph cluster:

> ID  CLASS WEIGHT   TYPE NAME                          STATUS REWEIGHT
PRI-AFF
>  -1       91.00598 root company_spinning

> -12       45.50299     room dc3_spinning

> -11       45.50299         rack lan3_spinning

>  -2       33.66600             host kong_spinning

>   8   hdd  3.73799                 osd.8                  up  1.00000
1.00000
> [...]
>  45   hdd  3.73799                 osd.45                 up  1.00000
1.00000
> -43       11.83699             host predator_spinning

>  21   hdd  1.69099                 osd.21                 up  1.00000
1.00000
> [...]
>  27   hdd  1.69099                 osd.27                 up  1.00000
1.00000
>
>  [...]
>
> -10       45.50299     room dc6_spinning

> -49       11.83699         rack dev6_spinning

> -58       11.83699             host alien_spinning

>  29   hdd  1.69099                 osd.29                 up  1.00000
1.00000
> [...]
>  35   hdd  1.69099                 osd.35                 up  1.00000
1.00000
>  -8       33.66600         rack lan6_spinning

>  -3       33.66600             host king_spinning

>   3   hdd  1.87299                 osd.3                  up  1.00000
1.00000
> []...
>  47   hdd  3.73799                 osd.47                 up  1.00000
1.00000
>
>  [...]

What I want to archieve is that at least one replica lives in another
datacenter than the remaining two. On which racks/hosts/osds within a
specific datacenter does not matter.


My ruleset looks like:

> rule replicated_ruleset_spinning {
>     id 0
>     type replicated
>     min_size 1
>     max_size 10
>     step take company_spinning
>     step choose firstn 2 type room
>     step chooseleaf firstn -1 type host
>     step emit
>

Is this correct... I'm in doubt...

Best from Berlin/Germany
Karsten

Ecologic Institut gemeinnuetzige GmbH
Pfalzburger Str. 43/44, D-10717 Berlin
Geschaeftsfuehrerin / Director: Dr. Camilla Bausch
Sitz der Gesellschaft / Registered Office: Berlin (Germany)
Registergericht / Court of Registration: Amtsgericht Berlin (Charlottenburg), HRB 57947



More information about the pve-user mailing list