Ceph CRUSH Map Reset nach Neustart

Maschde

New Member
Dec 20, 2021
12
0
1
35
Hallo zusammen,

ich nutze PVE seit über 5 Jahren zu Hause für etliche VMs, bisher mit ZFS. Als Host läuft ein HP DL380P Gen8 mit 56GB RAM.
Das funktioniert soweit einwandfrei.

Nun zu meinem Vorhaben:
Ich habe mich nun etwas in Ceph eingelesen und wollte mal testen ob das als Storage Pool bei mir herhalten könnte. Ich weiß dass ein einzelner Node nicht ideal ist für Ceph aber mir gefällt die Flexibilität was das Erweitern von Pools oder die Änderung der Anzahl der Replica angeht. Die CRUSH Map habe ich dahingehend abgeändert dass die PGs auf die OSDs verteilt werden anstatt Hosts. Soweit funktioniert alles.
Da ich nun gerne noch SSDs als WAL/DB einsetzen würde wollte ich die OSDs in der CRUSH Map gruppieren und für jeweils eine Gruppe dann eine OSD als WAL/DB einsetzen.
Hier die abgeänderte CRUSH Map:
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 hdd
device 1 osd.1 class hdd
device 2 osd.2 class hdd
device 3 osd.3 class hdd
device 4 osd.4 class hdd
device 5 osd.5 class hdd
device 6 osd.6 class hdd
device 7 osd.7 class hdd
device 8 osd.8 class hdd

# types
type 0 osd
type 1 group
type 2 host
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
group group2 {
        id -7           # do not change unnecessarily
        id -8 class hdd         # do not change unnecessarily
        # weight 12.372
        alg straw2
        hash 0  # rjenkins1
        item osd.0
        item osd.2
        item osd.3
}
group group1 {
        id -5           # do not change unnecessarily
        id -6 class hdd         # do not change unnecessarily
        # weight 12.372
        alg straw2
        hash 0  # rjenkins1
        item osd.1 weight
        item osd.4 weight
        item osd.6 weight
}
group group0 {
        id -3           # do not change unnecessarily
        id -4 class hdd         # do not change unnecessarily
        # weight 12.372
        alg straw2
        hash 0  # rjenkins1
        item osd.5 weight
        item osd.7 weight
        item osd.8 weight
}
root default {
        id -1           # do not change unnecessarily
        id -2 class hdd         # do not change unnecessarily
        # weight 12.372
        alg straw2
        hash 0  # rjenkins1
        item group0
        item group1
        item group2
}

# rules
rule replicated_rule {
        id 0
        type replicated
        min_size 1
        max_size 10
        step take default
        step chooseleaf firstn 0 type group
        step emit
}

# end crush map

Auch das hat noch funktioniert, die PGS wurden jeweils auf die groups verteilt wie ich das erwartet habe.
Bis ich den Host mal neustarten musste. Dann bin ich erst mal erschrocken weil ich eine Menge "unknown" PGs hatte. Habe dann relativ schnell den Fehler bemerkt:
Die OSDs wurden nach dem Neustart in das bucket des Hosts gepackt. Nachdem aber in der replicated_rule noch "step chooseleaf firstn 0 type group" steht kann das dann nicht mehr funktionieren.

Kann man dieses Verhalten irgendwie verhindern oder gibt es eine andere Lösung dafür?
Ich komme hier im Moment nicht mehr weiter und würde um eure Hilfe bitten.
 
Hi,
welche Proxmox-Version? Welche CEPH-Version?
Crushmap wie folgt bearbeitet?
Code:
**Crushmap holen**

ceph osd getcrushmap -o crushcompiled

**Crushmap umwandeln in Text**

crushtool -d crushcompiled -o crushdecompiled

**Crushmap bearbeiten**

nano crushdecompiled

**Crushmap wieder kompilieren**

crushtool -c crushdecompiled -o crushcompilednew

**Crushmap in CEPH-Cluster laden**

ceph osd setcrushmap -i crushcompilednew
 
Ich bin mit PVE auf Version 7.1-8 und Ceph 16.2.7
Ich habe kürzlich Updates installiert, der Fehler ist aber mit diesen Versionen aufgetreten.
Die Crushmap habe ich genau nach deiner Vorgehensweise bearbeitet. Es wurden auch nach dem Inject der neuen Crushmap die PGs richtig umsortiert. Habe ich in der Crushmap noch einen Fehler oder etwas übersehen?
So richtig gute Anleitungen über Crushmaps habe ich noch nicht gefunden und habe mir das so zusammen gebastelt.
 
Last edited:
Dann gib mal bitte die CrushMap nach dem Neustart, sowie das CEPH-Log und Syslog um den Neustart rum zum besten....
 
Guten Morgen,

ich habe nun unten die beiden Logs angehängt, Zeitpunkt Neustart.
Die Crushmap nach dem Neustart habe ich leider nicht abgespeichert, da war ich wohl zu erschrocken dass nichts mehr läuft.
Die nachfolgende habe ich aus meiner Erinnerung erstellt.
Die OSDs wurden alle ins bucket proxmox01 verschoben, die buckets group0 bis group2 waren aber noch vorhanden (ohne OSDs).
Und in der Rule war dann natürlich "step chooseleaf firstn 0 type group" nicht mehr so ideal...
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 hdd
device 1 osd.1 class hdd
device 2 osd.2 class hdd
device 3 osd.3 class hdd
device 4 osd.4 class hdd
device 5 osd.5 class hdd
device 6 osd.6 class hdd
device 7 osd.7 class hdd
device 8 osd.8 class hdd

# types
type 0 osd
type 1 group
type 2 host
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
group group2 {
        id -7           # do not change unnecessarily
        id -8 class hdd         # do not change unnecessarily
        # weight 12.372
        alg straw2
        hash 0  # rjenkins1
}
group group1 {
        id -5           # do not change unnecessarily
        id -6 class hdd         # do not change unnecessarily
        # weight 12.372
        alg straw2
        hash 0  # rjenkins1
}
group group0 {
        id -3           # do not change unnecessarily
        id -4 class hdd         # do not change unnecessarily
        # weight 12.372
        alg straw2
        hash 0  # rjenkins1
}
host proxmox01 {
    id -9        # do not change unnecessarily
    id -10 class hdd        # do not change unnecessarily
    # weight 10.920
    alg straw2
    hash 0    # rjenkins1
    item osd.0
    item osd.2
    item osd.3
    item osd.1
    item osd.4
    item osd.6
    item osd.5
    item osd.7
    item osd.8
}
root default {
        id -1           # do not change unnecessarily
        id -2 class hdd         # do not change unnecessarily
        # weight 12.372
        alg straw2
        hash 0  # rjenkins1
        item proxmox01
        item group0
        item group1
        item group2
}

# rules
rule replicated_rule {
        id 0
        type replicated
        min_size 1
        max_size 10
        step take default
        step chooseleaf firstn 0 type group
        step emit
}

# end crush map
 

Attachments

  • ceph.log
    51.9 KB · Views: 1
  • syslog.txt
    455.6 KB · Views: 1
Hi,
dem verhalten nach sieht das ein bisschen so aus als wenn der Parameter "osd_crush_update_on_start", der per Default aktiviert ist das verursacht.
Es gab da mal ein Maillist-Eintrag zu http://lists.ceph.com/pipermail/ceph-users-ceph.com/2018-May/026759.html

Ich denke da könnte man mal ansetzen und den entsprechenden Parameter auf deaktiviert setzen....
 
Das hört sich plausibel an, das werde ich mal versuchen. Bin ich richtig in der Annahme dass ich den Wert nur in der ceph.conf eintragen muss?
 
Das hört sich plausibel an, das werde ich mal versuchen. Bin ich richtig in der Annahme dass ich den Wert nur in der ceph.conf eintragen muss?
Ja
 

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!