


















The OSD map is one of the core cluster maps that Ceph monitors maintain and distribute to all cluster daemons and clients. It records the current state of every OSD and drives placement group (PG) calculations.
The OSD map stores:
up/down, in/out) and weightPrint a human-readable dump:
ceph osd dumpView only the OSD state tree:
ceph osd treeGet the current epoch:
ceph osd dump | grep epochceph osd getmap -o /tmp/osdmap.bin
osdmaptool --print /tmp/osdmap.binThis is useful for offline analysis or when comparing two epochs.
To understand what changed between epochs:
ceph osd dump --format json | jq '.epoch'
ceph mon dump | grep -i "epoch"Fetch a specific historical epoch:
ceph osd getmap <epoch> -o /tmp/osdmap-old.bin
osdmaptool --print /tmp/osdmap-old.binOSD flags are stored in the map and affect cluster behavior globally:
ceph osd dump | grep flagsCommon flags and their effect:
| Flag | Effect |
|---|---|
| noout | OSDs will not be marked out when they go down |
| nobackfill | Disables backfilling PGs to new OSDs |
| norecover | Stops object recovery |
| pause | Stops all client I/O |
When a client wants to write an object, it:
This means that every map update (new epoch) propagates to clients and OSDs, and stale maps can cause client I/O errors.
ceph health detail | grep -i "map"
ceph osd statIf OSDs are behind on map epochs, they log warnings and may refuse operations.
The Ceph OSD map is the authoritative record of OSD states and flags that drives placement group location for every I/O operation. Understanding how to read and compare OSD map epochs helps diagnose cluster state changes, flag settings, and client connectivity issues during incidents.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。