Ceph cria pool / Crush map max_size

1

Eu tenho os tipos de depósito padrão

type 0 osd
type 1 host
...
type 10 root

e três depósitos de host:

host cluster01a {
id -2       # do not change unnecessarily
# weight 1.607
alg straw
hash 0  # rjenkins1
item osd.0 weight 0.268
item osd.1 weight 0.268
item osd.2 weight 0.268
item osd.3 weight 0.268
item osd.4 weight 0.268
item osd.5 weight 0.268
}

host cluster01b {
id -3       # do not change unnecessarily
# weight 1.607
alg straw
hash 0  # rjenkins1
item osd.6 weight 0.268
item osd.7 weight 0.268
item osd.8 weight 0.268
item osd.9 weight 0.268
item osd.10 weight 0.268
item osd.11 weight 0.268
}

host cluster01c {
id -4       # do not change unnecessarily
# weight 1.607
alg straw
hash 0  # rjenkins1
item osd.12 weight 0.268
item osd.13 weight 0.268
item osd.14 weight 0.268
item osd.15 weight 0.268
item osd.16 weight 0.268
item osd.17 weight 0.268
}

e uma raiz do tipo de depósito

root default {
id -1       # do not change unnecessarily
# weight 4.820
alg straw
hash 0  # rjenkins1
item cluster01a weight 1.607
item cluster01b weight 1.607
item cluster01c weight 1.607
}

e isso governa

rule replicated_ruleset {
ruleset 0
type replicated
min_size 1
max_size 10
step take default
step chooseleaf firstn 0 type host
step emit
}
rule replicated_ruleset_over2hosts {
ruleset 1
type replicated
min_size 2
max_size 2
step take default
step chooseleaf firstn 2 type host
step emit

Por que recebo o erro:

$ceph osd pool create 2hostspool 512 512 replicated replicated_ruleset_over2hosts
Error EINVAL: pool size is bigger than the crush rule max size

min_size: If a pool makes fewer replicas than this number, CRUSH will NOT select this rule. max_size: If a pool makes more replicas than this number, CRUSH will NOT select this rule.

Fonte: link

    
por FaxMax 10.09.2018 / 16:00

1 resposta

0

seu tamanho de pool padrão é provavelmente 3 (ou até mais alto?). Você pode conseguir isso com:

host:~ # ceph daemon mon.<MON> config show | grep osd_pool_default_size
    "osd_pool_default_size": "3",

e altere isso de acordo com sua regra:

host:~ # ceph daemon mon.<MON> config set osd_pool_default_size 2
{
    "success": "osd_pool_default_size = '2' (not observed, change may require restart) "
}

Mudanças permanentes nos tamanhos padrão do pool devem ser configuradas em /etc/ceph/ceph.conf

    
por 21.09.2018 / 14:32

Tags