[SOLVED] ProxMox 6 - CEPH - Backup - getrennter Pool?!?!

Quickly

Well-Known Member
Sep 16, 2012
97
4
48
Hallo.

Eigentlich sollte meine Aktion erst mal eine Testinstallation bzgl. Cluster und CEPH werden.
Da jedoch mit ProxMox 6 so viel geiles passiert ist (Resprekt an ProxMox)... könnte es sein, dass diese Testumgebung bald live geht. (Hoffnung) :cool:

Ich habe mal gelesen/gehört/verhört (!?!) der CEPH-Pool sich immer nach der langsamsten HDD richtet. Nun ja...

# Stand #
  • 3 Nodes mit frischem ProxMox 6 - Cluster - CEPH
  • 3x 4 (12x) 2TB NVMe - CEPH - DiskImage + Container -> hier sollen die hungrigen Windows VM´s laufen.
  • Wunsch >>> 3x 2 (6x) 8TB SAS - CEPH wäre schön... hier soll dann eine VM (UCS) laufen um als NAS zu fungieren.
Ich würde gerne absolut vermeiden, dass meine schönen NVMe hier gebremst werden. Also am liebsten hätte ich da gerne einen eigenen Pool.

Die bisherige Einrichtung vom ersten, schnellen Pool habe ich komplett per Klick, Klick Klick gemacht. Also keine spezifischen Parameter gesetzt (Shell).

# Frage #
Kann mir hier jemand auf die Sprünge helfen? Ich weiß gerade nicht wonach ich suchen sollte... also mit welchen Stichworten.
Vielleicht hat jemand auch Shell-Schnipsel oder es geht so gar nicht?!?!

Vielen Dank, Lars
 
Das ganze kann einfach über crushrules geregelt werden:

Code:
# rules
rule replicated_rule {
    id 0
    type replicated
    min_size 1
    max_size 10
    step take default
    step chooseleaf firstn 0 type host
    step emit
}
rule ssd-only {
    id 1
    type replicated
    min_size 1
    max_size 10
    step take default class ssd
    step chooseleaf firstn 0 type host
    step emit
}
rule hdd-only {
    id 2
    type replicated
    min_size 1
    max_size 10
    step take default class hdd
    step chooseleaf firstn 0 type host
    step emit
}

Setzt voraus, daß die devices korrekt ihren deviceklassen zugeordnet werden. Die RBD pools dann jeweils mit der entsprechenden Crushrule anlegen, fertig.
 
Na dann habe ich ja wieder Lesestoff für den Abend.
An dieser Stelle schon mal THX! ;)
 
Und es hat geklappt. Jedenfalls so wie es aussieht. :cool:
Hier meine kleine Mini-Anleitung.
Vielleicht mag mich jemand kontrollieren!?!?

ProxMox - CEPH - CRUSH - Pools nach Geräteklassen
Man kann Pools je Geräteklasse aufteilen. In diesem Beispiel habe ich NVMe (ssd) und SAS (hdd) Platten.
Ich möchte 2 geteilte Pools haben um die jeweiligen Klassen in unterschiedlichen Pools zu nutzen.

OSD & Pool
  • OSDs einhängen - per ProxMox GUI
  • Pools anlegen - per ProxMox GUI
  • Dann finden sich alle OSDs in allen Pools.
Code:
# Meine Namen der Pool´s
rbd_nvme
rbd_sas

OSD Tree anzeigen
Wir sehen die OSDs und die Geräteklasse.
Code:
ceph osd crush tree --show-shadow

CEPH Regelsatz erstellen
Ich habe den Regelsatz wie den Pool genannt. (rbd_nvme / rbd_sas)
Code:
# ceph osd crush rule create-replicated <rule-name> <root> <failure-domain> <class>
ceph osd crush rule create-replicated rbd_nvme default host ssd
ceph osd crush rule create-replicated rbd_sas default host hdd

Den jeweiligen Pool anweisen einen Regelsatz zu verwenden
Da hier der Pool-Name und Regelsatz identisch heißen...
Code:
# ceph osd pool set <pool-name> crush_rule <rule-name>
ceph osd pool set rbd_nvme crush_rule rbd_nvme
ceph osd pool set rbd_sas crush_rule rbd_sas

Kontrolle - Klassen auflisten
Code:
ceph osd crush class ls

OSDs auflisten, die der jeweiligen Klasse gehören
Code:
ceph osd crush class ls-osd ssd
ceph osd crush class ls-osd hdd

Und in der GUI sehen wir nun 2 Pools mit (in meinem Fall) unterschiedlichen Größen.
12x 2TB NVMe = Summary 7.07TB
6x 8TB SAS = Summary 13.82TB


Herzlichen Dank! Lars
 
Last edited:
  • Like
Reactions: Alwin
Und so sieht dann meine Crush Map aus. Ist hier was auffälliges, ein Fehler?

Code:
# begin crush map
tunable choose_local_tries 0
tunable choose_local_fallback_tries 0
tunable choose_total_tries 50
tunable chooseleaf_descend_once 1
tunable chooseleaf_vary_r 1
tunable chooseleaf_stable 1
tunable straw_calc_version 1
tunable allowed_bucket_algs 54

# devices
device 0 osd.0 class ssd
device 1 osd.1 class ssd
device 2 osd.2 class ssd
device 3 osd.3 class ssd
device 4 osd.4 class ssd
device 5 osd.5 class ssd
device 6 osd.6 class ssd
device 7 osd.7 class ssd
device 8 osd.8 class ssd
device 9 osd.9 class ssd
device 10 osd.10 class ssd
device 11 osd.11 class ssd
device 12 osd.12 class hdd
device 13 osd.13 class hdd
device 14 osd.14 class hdd
device 15 osd.15 class hdd
device 16 osd.16 class hdd
device 17 osd.17 class hdd

# types
type 0 osd
type 1 host
type 2 chassis
type 3 rack
type 4 row
type 5 pdu
type 6 pod
type 7 room
type 8 datacenter
type 9 zone
type 10 region
type 11 root

# buckets
host proxmox71 {
    id -3        # do not change unnecessarily
    id -2 class ssd        # do not change unnecessarily
    id -9 class hdd        # do not change unnecessarily
    # weight 22.004
    alg straw2
    hash 0    # rjenkins1
    item osd.0 weight 1.862
    item osd.1 weight 1.862
    item osd.2 weight 1.862
    item osd.3 weight 1.862
    item osd.12 weight 7.277
    item osd.13 weight 7.277
}
host proxmox73 {
    id -5        # do not change unnecessarily
    id -4 class ssd        # do not change unnecessarily
    id -10 class hdd        # do not change unnecessarily
    # weight 22.004
    alg straw2
    hash 0    # rjenkins1
    item osd.4 weight 1.862
    item osd.5 weight 1.862
    item osd.6 weight 1.862
    item osd.7 weight 1.862
    item osd.14 weight 7.277
    item osd.15 weight 7.277
}
host proxmox79 {
    id -7        # do not change unnecessarily
    id -6 class ssd        # do not change unnecessarily
    id -11 class hdd        # do not change unnecessarily
    # weight 22.004
    alg straw2
    hash 0    # rjenkins1
    item osd.8 weight 1.862
    item osd.9 weight 1.862
    item osd.10 weight 1.862
    item osd.11 weight 1.862
    item osd.16 weight 7.277
    item osd.17 weight 7.277
}
root default {
    id -1        # do not change unnecessarily
    id -8 class ssd        # do not change unnecessarily
    id -12 class hdd        # do not change unnecessarily
    # weight 66.011
    alg straw2
    hash 0    # rjenkins1
    item proxmox71 weight 22.004
    item proxmox73 weight 22.004
    item proxmox79 weight 22.004
}

# rules
rule replicated_rule {
    id 0
    type replicated
    min_size 1
    max_size 10
    step take default
    step chooseleaf firstn 0 type host
    step emit
}
rule rbd_nvme {
    id 1
    type replicated
    min_size 1
    max_size 10
    step take default class ssd
    step chooseleaf firstn 0 type host
    step emit
}
rule rbd_sas {
    id 2
    type replicated
    min_size 1
    max_size 10
    step take default class hdd
    step chooseleaf firstn 0 type host
    step emit
}

# end crush map
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!