Intern Diskussion:Ora
Erstellen von Containern[Bearbeiten]
- Rechtsklick auf ein Node - Create CT
- General: hostname, passwort Festlegen, bei Turnkey "unpriviledged container" deaktivieren
- Template: CT-Template von einem Speicher laden, vermutlich CephFS
- Root Disk: Storage: storage (rbd), Disksize einstellen
- CPU, Memory einstellen wie man es braucht
- Network,DNS: Bridge: vmbr1, den Rest einstellen wie man es braucht
High Availability[Bearbeiten]
Man kann Container und VMs zum HA hinzufügen, sodass diese einen Neustart/Ausfall von einem Node überleben.
Die virtuelle HDD (Root Disk) dieser muss dafür im RDB-Storage liegen. Root-Disks im lokalen ZFS-Speicher führen zu Problemen!
- Auf den Container/VM gehen, dann im Menü Options "start at boot" auf Yes stellen
- auf Datacenter (cluster) gehen, im Menü "HA" bei Ressources auf add:
- Bei VM: den Container/VM auswählen
- Bei Group: HA_cluster wählen
- hinzufügen
Fehler im Cluster von Ceph[Bearbeiten]
Fehler von OSDs für Ceph[Bearbeiten]
osd.4 spackt erneut[Bearbeiten]
- (andauernde) Warnmeldung 1 daemons have recently crashed
- osd.4 crashed on host n3
ceph crash ls
ID ENTITY NEW 2021-04-12_13:05:29.248655Z_384845a2-f660-4c38-a9a8-3fde5eb66b25 osd.4 2021-07-09_14:28:03.207985Z_8519c6ab-d4e4-42b6-a5c0-16aaadbcea9e osd.4
ceph crash archive-all
- 2021-09-03
- nach dem Neustart vom Node (n3)
- Der Versuch vom Start vom OSD (osd.4) scheiterte.
- Der Versuch vom out und wieder in vom OSD (osd.4) scheiterte.
- Der Versuch vom Neustart vom Node (n3, wo osd.4 betrieben wird) war erfolgreich.
- Der Wert bei Apply/Commit Latency (ms) ist wieder überdurchschnittlich hoch (über 2000 bis 500).
- Es kam wieder die Meldung zur Warnung.
- (andauernde) Meldung zur Warnung 1 daemons have recently crashed
- osd.4 crashed on host n3
ceph crash ls
ID ENTITY NEW 2021-04-12_13:05:29.248655Z_384845a2-f660-4c38-a9a8-3fde5eb66b25 osd.4 2021-07-09_14:28:03.207985Z_8519c6ab-d4e4-42b6-a5c0-16aaadbcea9e osd.4 2021-08-09T21:29:34.296598Z_d58f1070-599d-456b-a52f-feaabd0db732 osd.4 2021-09-03T12:20:54.171787Z_4a0fb792-3d39-4a2a-b996-19526f394867 osd.4 *
ceph crash archive-all
- (andauernde) Meldung zur Warnung 1 daemons have recently crashed ist verschwunden (und der Status bei Health wieder auf "grün").
- 2021-09-14
- zur Prüfung nach dem Neustart nach dem power outage 2021-09-13
- (andauernde) Warnmeldung 3 daemons have recently crashed
osd.4 crashed on host n3 at 2021-09-03T13:58:01.976393Z osd.4 crashed on host n3 at 2021-09-03T14:02:51.448470Z osd.4 crashed on host n3 at 2021-09-03T14:11:26.984851Z
ceph crash ls
ID ENTITY NEW 2021-04-12_13:05:29.248655Z_384845a2-f660-4c38-a9a8-3fde5eb66b25 osd.4 2021-07-09_14:28:03.207985Z_8519c6ab-d4e4-42b6-a5c0-16aaadbcea9e osd.4 2021-08-09T21:29:34.296598Z_d58f1070-599d-456b-a52f-feaabd0db732 osd.4 2021-09-03T12:20:54.171787Z_4a0fb792-3d39-4a2a-b996-19526f394867 osd.4 2021-09-03T13:58:01.976393Z_bf4db85c-eec0-4825-ae2a-951d2ee8920e osd.4 * 2021-09-03T14:02:51.448470Z_a119bf9e-b04c-4a7d-9bf3-a161838eec10 osd.4 * 2021-09-03T14:11:26.984851Z_4afbdc48-44e9-4994-b30a-35872299eeb1 osd.4 *
ceph crash archive-all
ceph crash ls
ID ENTITY NEW ID ENTITY NEW 2021-04-12_13:05:29.248655Z_384845a2-f660-4c38-a9a8-3fde5eb66b25 osd.4 2021-07-09_14:28:03.207985Z_8519c6ab-d4e4-42b6-a5c0-16aaadbcea9e osd.4 2021-08-09T21:29:34.296598Z_d58f1070-599d-456b-a52f-feaabd0db732 osd.4 2021-09-03T12:20:54.171787Z_4a0fb792-3d39-4a2a-b996-19526f394867 osd.4 2021-09-03T13:58:01.976393Z_bf4db85c-eec0-4825-ae2a-951d2ee8920e osd.4 2021-09-03T14:02:51.448470Z_a119bf9e-b04c-4a7d-9bf3-a161838eec10 osd.4 2021-09-03T14:11:26.984851Z_4afbdc48-44e9-4994-b30a-35872299eeb1 osd.4
- (andauernde) Meldung zur Warnung 1 daemons have recently crashed ist verschwunden (und der Status bei Health wieder auf "grün").
- 2021-10-01
- vor update
ein PG ist gestorben...
sichtbar ist die PG Nummer in der GUI (kleines (i)) oder via "ceph health detail"
mit "ceph pg repair PG_Nummer" kann es repariert werden
Ersetzen von defekten Festplatten[Bearbeiten]
sollte eine Festplatte defekt sein (z.B. SMART Errors), so kann sie ersetzt werden...
Erkannt werden kann die Platte, indem man im Storage Manager das OSD ausliest. (Steht beim Verwendungszweck als "LVM, Ceph(OSDxxx)")
Dazu zunächst (sollte das nicht schon der Fall sein) die Platte unter Ceph -> OSDs zunächst als "Down", dann als "out" markiert werden. Nach einer kurzen Wartezeit (z.B. 1 min) kann man das OSD dann zerstören (auch über die GUI).
Jetzt die Platte rausnehmen, sollte einfach erkennbar sein (blinkt nicht mehr) und ersetzen.
Im Anschluss die Platte via "fdisk /dev/sdX" löschen und mit GPT initialisieren (Befehle d, g und schließlich w).
Nun kann bei OSDs die Platte wieder hinzugefügt werden. Das Re-Silvering dauert recht lange (6-24h, siehe Abschnitt weiter unten)
Aktualisierung (von Ceph 14 auf) Ceph 15[Bearbeiten]
nach https://pve.proxmox.com/wiki/Ceph_Nautilus_to_Octopus
sed -i 's/nautilus/octopus/' /etc/apt/sources.list.d/ceph.list
ceph osd set noout
- Im Übrigen kann das auch per GUI geklickt werden (beliebiger Server -> (Ceph) OSD -> (oben, über der Auflistung) Schaltfläche Manage Global Flags -> Checkbox (Zeile) noout angewählt).
GUI
noout flag(s) set
apt update && apt -y full-upgrade
systemctl restart ceph-mon.target
- Alle Monitore (Monitors) werden von gelb auf grün angezeigt.
- [unerwartet] Alle Manager (Manager) werden von gelb auf grün angezeigt.
systemctl restart ceph-mgr.target
(Achtung! Bei der Durchfühung auf den einzelnen Nodes zum Neustarten der OSDs für Ceph ist darauf zu achten, dass die Gesundheit nach dem Neustarten der OSDs für Ceph vom vorherigen Node "zurück" sind.)
systemctl restart ceph-osd.target
GUI
2 pools have too many placement groups
Pool storage has 128 placement groups, should have 32 Pool cephfs_data has 128 placement groups, should have 32
F……k!
Weitermachen?! Jo!
ceph config set osd bluestore_fsck_quick_fix_on_mount false
ceph osd require-osd-release octopus
ceph osd unset noout
- Im Übrigen kann das auch per GUI geklickt werden (beliebiger Server -> (Ceph) OSD -> (oben, über der Auflistung) Schaltfläche Manage Global Flags -> Checkbox (Zeile) noout abgewählt).
zu hohe Anzahl von placement groups für Ceph in einigen Pool für Ceph[Bearbeiten]
- Problem
- Ceph "meckert" (durch seine Funktionalität ), dass die Anzahl vom placement groups im P
ceph osd pool autoscale-status
POOL SIZE TARGET SIZE RATE RAW CAPACITY RATIO TARGET RATIO EFFECTIVE RATIO BIAS PG_NUM NEW PG_NUM AUTOSCALE storage 758.9G 3.0 11178G 0.2037 1.0 128 32 warn cephfs_data 277.4G 3.0 11178G 0.0745 1.0 128 32 warn cephfs_metadata 7789k 3.0 11178G 0.0000 4.0 32 warn device_health_metrics 1312k 3.0 11178G 0.0000 1.0 1 on
pveceph pool ls
┌───────────────────────┬──────┬──────────┬────────┬─────────────┬────────────────┬───────────────────┬──────────────────────────┬───────────────────────────┬─────────────────┬──────────────────────┬───────────────┐ │ Name │ Size │ Min Size │ PG Num │ min. PG Num │ Optimal PG Num │ PG Autoscale Mode │ PG Autoscale Target Size │ PG Autoscale Target Ratio │ Crush Rule Name │ %-Used │ Used │ ╞═══════════════════════╪══════╪══════════╪════════╪═════════════╪════════════════╪═══════════════════╪══════════════════════════╪═══════════════════════════╪═════════════════╪══════════════════════╪═══════════════╡ │ cephfs_data │ 3 │ 2 │ 128 │ │ 32 │ warn │ │ │ replicated_rule │ 0.10118156671524 │ 893843079168 │ ├───────────────────────┼──────┼──────────┼────────┼─────────────┼────────────────┼───────────────────┼──────────────────────────┼───────────────────────────┼─────────────────┼──────────────────────┼───────────────┤ │ cephfs_metadata │ 3 │ 2 │ 32 │ 16 │ 16 │ warn │ │ │ replicated_rule │ 3.23224207932071e-06 │ 25664757 │ ├───────────────────────┼──────┼──────────┼────────┼─────────────┼────────────────┼───────────────────┼──────────────────────────┼───────────────────────────┼─────────────────┼──────────────────────┼───────────────┤ │ device_health_metrics │ 3 │ 2 │ 1 │ 1 │ 1 │ on │ │ │ replicated_rule │ 5.0767386028383e-07 │ 4031038 │ ├───────────────────────┼──────┼──────────┼────────┼─────────────┼────────────────┼───────────────────┼──────────────────────────┼───────────────────────────┼─────────────────┼──────────────────────┼───────────────┤ │ storage │ 3 │ 2 │ 128 │ │ 32 │ warn │ │ │ replicated_rule │ 0.228989392518997 │ 2358233763477 │ └───────────────────────┴──────┴──────────┴────────┴─────────────┴────────────────┴───────────────────┴──────────────────────────┴───────────────────────────┴─────────────────┴──────────────────────┴───────────────┘
ceph osd pool get cephfs_data pg_num
pg_num: 128
ceph osd pool get cephfs_data pgp_num
pgp_num: 128
ceph osd pool get storage pg_num
pg_num: 128
ceph osd pool get storage pgp_num
pgp_num: 128
ceph osd pool get cephfs_data pgp_num
pgp_num: 128
ceph osd pool set cephfs_data pgp_num 32
set pool 2 pgp_num to 32
ceph osd pool get cephfs_data pgp_num
pgp_num: 123
w00t?
- Ceph hat begonnen zu arbeiten und
ceph osd pool set storage pgp_num 32
set pool 1 pgp_num to 32
ceph osd pool get storage pgp_num
pgp_num: 128
ceph osd pool set storage pgp_num 32
set pool 1 pgp_num to 32
ceph osd pool get storage pgp_num
pgp_num: 128
- Im Übrigen kann das auch per GUI geklickt werden (beliebiger Server -> (Ceph) Pools -> (Zeile für den bestimmten Pool für Ceph in der Auflistung anwählen) Schaltfläche Edit -> (Checkbox Advanced anwählen) Textfeld für Zahlen # of PGs).
GUI
2 pools have pg_num > pgp_num
pool storage pg_num 128 > pgp_num 32 pool cephfs_data pg_num 128 > pgp_num 32
Austüdeln lassen!
w00t? Das kann auch "autogescalet" werden? https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/4/html-single/storage_strategies_guide/index#auto-scaling-placement-groups
testpool ist die Variable für die Bezeichnung vom Pool für Ceph.
ceph osd pool set testpool pg_autoscale_mode on
Setzen der Variable, dass immmer beim Erstellen von einem Pool für Ceph
ceph config set global osd_pool_default_pg_autoscale_mode <mode>
https://ceph.com/rados/new-in-nautilus-pg-merging-and-autotuning/
Für den Pool für Ceph storage über die Oberfläche "geklickt".
- Die Anpassung der Anzahl von PGs kann über die GUI beobachtet werden.
ceph osd pool set cephfs_data pg_num 32
set pool 2 pg_num to 32
ceph osd pool get cephfs_data pg_num
pg_num: 123
ceph osd pool get cephfs_data pg_num
pg_num: 32
Streiken von einem einzelnen Gerät für Massenspeicher in einem Cluster für Ceph[Bearbeiten]
1 osds down
osd.4 (root=default,host=n3) is down
GUI
- Datacenter -> Ceph (Health)
1 daemons have recently crashed
osd.4 crashed on host n3 at 2021-08-09T21:29:34.296598Z
Es hilft auch kein Neustarten vom daemon (per GUI).
Archivieren aller (bisher vermerkten) Unfälle bei Ceph
ceph crash archive-all
ceph crash ls
ID ENTITY NEW 2021-04-12_13:05:29.248655Z_384845a2-f660-4c38-a9a8-3fde5eb66b25 osd.4 2021-07-09_14:28:03.207985Z_8519c6ab-d4e4-42b6-a5c0-16aaadbcea9e osd.4 2021-08-09T21:29:34.296598Z_d58f1070-599d-456b-a52f-feaabd0db732 osd.4 *
crash archive 2021-08-09T21:29:34.296598Z_d58f1070-599d-456b-a52f-feaabd0db732
ceph status | grep health
health: HEALTH_OK
GUI (Datacenter -> Ceph (Health)) grün
Zugriff von Anwendungen auf das ceph cluster[Bearbeiten]
https://docs.ceph.com/en/latest/rados/operations/user-management/
wie aus dem link ersichtlich ist, kann / muss man einen user erstellen.
User kann man listen mit ceph auth ls
erstellen mit (Beispielhaft:):
ceph auth get-or-create client.paul mon 'allow r' osd 'allow rw pool=liverpool'
Permissions anpassen mit :
ceph auth caps USERTYPE.USERID {daemon} 'allow [r|w|x|*|...] [pool={pool-name}] [namespace={namespace-name}]' [{daemon} 'allow [r|w|x|*|...] [pool={pool-name}] [namespace={namespace-name}]']
Aktualisierung (von Proxmox Virtual Environment (PVE) 7 auf) von Proxmox Virtual Environment (PVE) 6[Bearbeiten]
https://pro.stura.htw-dresden.de/issues/747
ssh root@10.1.0.32
root@10.1.0.32's password:
Linux n2 5.4.140-1-pve #1 SMP PVE 5.4.140-1 (Wed, 08 Sep 2021 16:21:59 +0200) x86_64 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Tue Sep 14 15:12:21 2021 from 10.1.0.31
pve6to7
= CHECKING VERSION INFORMATION FOR PVE PACKAGES = Checking for package updates.. PASS: all packages uptodate Checking proxmox-ve package version.. PASS: proxmox-ve package has version >= 6.4-1 Checking running kernel version.. PASS: expected running kernel '5.4.140-1-pve'. = CHECKING CLUSTER HEALTH/SETTINGS = PASS: systemd unit 'pve-cluster.service' is in state 'active' PASS: systemd unit 'corosync.service' is in state 'active' PASS: Cluster Filesystem is quorate. Analzying quorum settings and state.. INFO: configured votes - nodes: 3 INFO: configured votes - qdevice: 0 INFO: current expected votes: 3 INFO: current total votes: 3 Checking nodelist entries.. PASS: nodelist settings OK Checking totem settings.. PASS: totem settings OK INFO: run 'pvecm status' to get detailed cluster status.. = CHECKING HYPER-CONVERGED CEPH STATUS = INFO: hyper-converged ceph setup detected! INFO: getting Ceph status/health information.. PASS: Ceph health reported as 'HEALTH_OK'. INFO: getting Ceph daemon versions.. PASS: single running version detected for daemon type monitor. PASS: single running version detected for daemon type manager. PASS: single running version detected for daemon type MDS. PASS: single running version detected for daemon type OSD. PASS: single running overall version detected for all Ceph daemon types. WARN: 'noout' flag not set - recommended to prevent rebalancing during cluster-wide upgrades. INFO: checking Ceph config.. = CHECKING CONFIGURED STORAGES = PASS: storage 'cephfs' enabled and active. PASS: storage 'local' enabled and active. PASS: storage 'local-zfs' enabled and active. PASS: storage 'storage' enabled and active. = MISCELLANEOUS CHECKS = INFO: Checking common daemon services.. PASS: systemd unit 'pveproxy.service' is in state 'active' PASS: systemd unit 'pvedaemon.service' is in state 'active' PASS: systemd unit 'pvestatd.service' is in state 'active' INFO: Checking for running guests.. PASS: no running guest detected. INFO: Checking if the local node's hostname 'n2' is resolvable.. INFO: Checking if resolved IP is configured on local node.. PASS: Resolved node IP '10.1.0.32' configured and active on single interface. INFO: Checking backup retention settings.. PASS: no problems found. INFO: checking CIFS credential location.. PASS: no CIFS credentials at outdated location found. INFO: Checking custom roles for pool permissions.. INFO: Checking node and guest description/note legnth.. PASS: All node config descriptions fit in the new limit of 64 KiB PASS: All guest config descriptions fit in the new limit of 8 KiB INFO: Checking container configs for deprecated lxc.cgroup entries PASS: No legacy 'lxc.cgroup' keys found. INFO: Checking storage content type configuration.. PASS: no problems found INFO: Checking if the suite for the Debian security repository is correct.. INFO: Make sure to change the suite of the Debian security repository from 'buster/updates' to 'bullseye-security' - in /etc/apt/sources.list:6 SKIP: NOTE: Expensive checks, like CT cgroupv2 compat, not performed without '--full' parameter = SUMMARY = TOTAL: 31 PASSED: 29 SKIPPED: 1 WARNINGS: 1 FAILURES: 0 ATTENTION: Please check the output for detailed information!
pve6to7 --full
= CHECKING VERSION INFORMATION FOR PVE PACKAGES = Checking for package updates.. PASS: all packages uptodate Checking proxmox-ve package version.. PASS: proxmox-ve package has version >= 6.4-1 Checking running kernel version.. PASS: expected running kernel '5.4.140-1-pve'. = CHECKING CLUSTER HEALTH/SETTINGS = PASS: systemd unit 'pve-cluster.service' is in state 'active' PASS: systemd unit 'corosync.service' is in state 'active' PASS: Cluster Filesystem is quorate. Analzying quorum settings and state.. INFO: configured votes - nodes: 3 INFO: configured votes - qdevice: 0 INFO: current expected votes: 3 INFO: current total votes: 3 Checking nodelist entries.. PASS: nodelist settings OK Checking totem settings.. PASS: totem settings OK INFO: run 'pvecm status' to get detailed cluster status.. = CHECKING HYPER-CONVERGED CEPH STATUS = INFO: hyper-converged ceph setup detected! INFO: getting Ceph status/health information.. PASS: Ceph health reported as 'HEALTH_OK'. INFO: getting Ceph daemon versions.. PASS: single running version detected for daemon type monitor. PASS: single running version detected for daemon type manager. PASS: single running version detected for daemon type MDS. PASS: single running version detected for daemon type OSD. PASS: single running overall version detected for all Ceph daemon types. WARN: 'noout' flag not set - recommended to prevent rebalancing during cluster-wide upgrades. INFO: checking Ceph config.. = CHECKING CONFIGURED STORAGES = PASS: storage 'cephfs' enabled and active. PASS: storage 'local' enabled and active. PASS: storage 'local-zfs' enabled and active. PASS: storage 'storage' enabled and active. = MISCELLANEOUS CHECKS = INFO: Checking common daemon services.. PASS: systemd unit 'pveproxy.service' is in state 'active' PASS: systemd unit 'pvedaemon.service' is in state 'active' PASS: systemd unit 'pvestatd.service' is in state 'active' INFO: Checking for running guests.. PASS: no running guest detected. INFO: Checking if the local node's hostname 'n2' is resolvable.. INFO: Checking if resolved IP is configured on local node.. PASS: Resolved node IP '10.1.0.32' configured and active on single interface. INFO: Checking backup retention settings.. PASS: no problems found. INFO: checking CIFS credential location.. PASS: no CIFS credentials at outdated location found. INFO: Checking custom roles for pool permissions.. INFO: Checking node and guest description/note legnth.. PASS: All node config descriptions fit in the new limit of 64 KiB PASS: All guest config descriptions fit in the new limit of 8 KiB INFO: Checking container configs for deprecated lxc.cgroup entries PASS: No legacy 'lxc.cgroup' keys found. INFO: Checking storage content type configuration.. PASS: no problems found INFO: Checking if the suite for the Debian security repository is correct.. INFO: Make sure to change the suite of the Debian security repository from 'buster/updates' to 'bullseye-security' - in /etc/apt/sources.list:6 SKIP: No containers on node detected. = SUMMARY = TOTAL: 31 PASSED: 29 SKIPPED: 1 WARNINGS: 1 FAILURES: 0 ATTENTION: Please check the output for detailed information!
Option noout angewählt
Node -> OSD -> Manage Global Flags
gescheiterte Anpassung der Konfiguration für einen Container für Kubernetes auf PVE 6[Bearbeiten]
less /etc/pve/lxc/128.conf
arch: amd64 cores: 2 features: keyctl=1,nesting=1 hostname: kubernetes-test-1 memory: 4096 nameserver: 141.56.1.1 net1: name=eth0,bridge=vmbr1,firewall=1,gw=141.56.51.254,hwaddr=C6:CC:B9:91:16:70,ip=141.56.51.136/24,type=veth onboot: 0 ostype: debian rootfs: storage:vm-128-disk-0,size=32G swap: 4096 unprivileged: 1 lxc.apparmor.profile: unconfined lxc.cgroup.devices.allow: a lxc.cap.drop: lxc.mount.auto: proc:rw sys:rw
Geschwindigkeit von Recovery (und Rebalance) bei Cluster für Ceph[Bearbeiten]
Backfilling[Bearbeiten]
Backfilling meint das "Umfüllen" von Daten zum Ausgleich innerhalb vom Cluster für Ceph. Das ergibt sich beim Hinzufügen (also auch beim Ersetzen) eines Gerätes für Massenspeicher in das Cluster für Ceph.
Konfiguration osd_max_backfills
ceph daemon osd.1 config get osd_max_backfills
{ "osd_max_backfills": "1" }
Recovery[Bearbeiten]
Konfiguration osd_recovery_max_active
ceph daemon osd.1 config get osd_recovery_max_active
{ "osd_recovery_max_active": "0" }
ceph daemon osd.1 config get osd_recovery_max_active_hdd
{ "osd_recovery_max_active_hdd": "3" }
ceph daemon osd.1 config get osd_recovery_max_active_ssd
{ "osd_recovery_max_active_ssd": "10" }
Konfiguration osd_recovery_sleep
ceph daemon osd.1 config get osd_recovery_sleep
{ "osd_recovery_sleep": "0.000000" }
ceph daemon osd.1 config get osd_recovery_sleep_hdd
{ "osd_recovery_sleep_hdd": "0.100000" }
ceph daemon osd.1 config get osd_recovery_sleep_ssd
{ "osd_recovery_sleep_ssd": "0.000000" }
Konfiguration osd_client_op_priority
ceph daemon osd.1 config get osd_recovery_op_priority
{ "osd_recovery_op_priority": "3" }
Hinweise[Bearbeiten]
ceph bedienen[Bearbeiten]
ceph-volume raw list
weitere Pakete[Bearbeiten]
mit DanielPlominski
tmux htop smem
- für
smem -k
--Paul 13:14, 9. Dez. 2021 (CET)