ceph monitor 負責監控整個集羣的健康情況,以及維護集羣成員關係狀態,對等節點的狀態,和集羣的配置信息。cluster map是多個map的組合,包括monitor map,osd map,pg map,crush map 以及 mds map。node
1 monitor map:它包含監視節點端到端的信息,包括ceph集羣ID,monitor 節點名稱,IP地址和端口等。ui
ceph mon dumpes5
[root@ceph-admin opt]# ceph mon dump dumped monmap epoch 4 epoch 4 fsid 53fe37a5-7ee7-4190-a8ea-a0221648294c last_changed 2017-09-27 10:14:53.474525 created 2017-09-04 15:17:43.852911 0: 172.18.1.231:6789/0 mon.ceph-admin 1: 172.18.1.232:6789/0 mon.ceph-node1 您在 /var/spool/mail/root 中有新郵件
2 OSD map :它保存一些經常使用的信息,包括集羣ID,OSD map 自建立以來最新版本號本身最後修改時間,以及存儲池相關的信息,包括存儲名稱,ID,狀態,副本級別和PG。它還保存着OSD信息,好比數量,狀態,權重,最後清理間隔以及OSD節點信息。3d
ceph osd dumpcode
[root@ceph-admin opt]# ceph osd dump epoch 2473 fsid 53fe37a5-7ee7-4190-a8ea-a0221648294c created 2017-09-04 15:17:50.966548 modified 2017-10-12 13:55:20.042095 flags sortbitwise,require_jewel_osds pool 0 'rbd' replicated size 2 min_size 1 crush_ruleset 0 object_hash rjenkins pg_num 128 pgp_num 128 last_change 1621 flags hashpspool stripe_width 0 removed_snaps [1~3] pool 9 'cephfs_data' replicated size 2 min_size 1 crush_ruleset 0 object_hash rjenkins pg_num 10 pgp_num 10 last_change 1623 flags hashpspool crash_replay_interval 45 stripe_width 0 pool 10 'cephfs_metadata' replicated size 2 min_size 1 crush_ruleset 0 object_hash rjenkins pg_num 10 pgp_num 10 last_change 1625 flags hashpspool stripe_width 0 pool 12 'test_pool7' replicated size 2 min_size 1 crush_ruleset 0 object_hash rjenkins pg_num 128 pgp_num 128 last_change 1628 flags hashpspool stripe_width 0 removed_snaps [1~3] pool 17 'm8beta' replicated size 2 min_size 1 crush_ruleset 0 object_hash rjenkins pg_num 100 pgp_num 100 last_change 1682 flags hashpspool stripe_width 0 removed_snaps [1~3] pool 18 'm8dev' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 80 pgp_num 80 last_change 1689 flags hashpspool stripe_width 0 removed_snaps [1~3] pool 19 '.rgw.root' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 8 pgp_num 8 last_change 2366 owner 18446744073709551615 flags hashpspool stripe_width 0 pool 20 'default.rgw.control' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 8 pgp_num 8 last_change 2368 owner 18446744073709551615 flags hashpspool stripe_width 0 pool 21 'default.rgw.data.root' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 8 pgp_num 8 last_change 2370 owner 18446744073709551615 flags hashpspool stripe_width 0 pool 22 'default.rgw.gc' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 8 pgp_num 8 last_change 2371 owner 18446744073709551615 flags hashpspool stripe_width 0 pool 23 'default.rgw.log' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 8 pgp_num 8 last_change 2372 owner 18446744073709551615 flags hashpspool stripe_width 0 pool 24 'default.rgw.users.uid' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 8 pgp_num 8 last_change 2375 owner 18446744073709551615 flags hashpspool stripe_width 0 pool 25 'default.rgw.users.email' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 8 pgp_num 8 last_change 2377 owner 18446744073709551615 flags hashpspool stripe_width 0 pool 26 'default.rgw.users.keys' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 8 pgp_num 8 last_change 2379 owner 18446744073709551615 flags hashpspool stripe_width 0 pool 27 'vmpool1' replicated size 3 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 128 pgp_num 128 last_change 2469 flags hashpspool stripe_width 0 removed_snaps [1~3] max_osd 16 osd.0 up in weight 1 up_from 1961 up_thru 2466 down_at 1959 last_clean_interval [1809,1958) 172.18.1.232:6800/19718 172.18.1.232:6801/19718 172.18.1.232:6802/19718 172.18.1.232:6803/19718 exists,up 68aa9d74-3d45-49df-8c94-7ae5f0a8c48b osd.1 up in weight 1 up_from 2315 up_thru 2466 down_at 2311 last_clean_interval [2310,2314) 172.18.1.233:6800/2950 172.18.1.233:6804/1002950 172.18.1.233:6805/1002950 172.18.1.233:6806/1002950 exists,up 9bd0bc80-853c-46ab-8790-656827285750 osd.2 up in weight 1 up_from 1962 up_thru 2466 down_at 1955 last_clean_interval [1945,1954) 172.18.1.231:6800/11239 172.18.1.231:6801/11239 172.18.1.231:6802/11239 172.18.1.231:6803/11239 exists,up 6de000f4-63bd-4b10-b076-29c0de5b4364 blacklist 172.18.2.4:0/1125443 expires 2017-10-12 14:55:19.169719 blacklist 172.18.2.9:0/1028870 expires 2017-10-12 14:54:20.118506
3 PG map:它保存信息包括PG版本,時間戳,OSD map的最新版本號,容量已滿百分比,容量將滿百分比,它還記錄了每一個PG的ID,對象數量,狀態,狀態時間戳。對象
ceph pg dumpip
4 crush map : 它保存的信息包括集羣設備列表,bucket列表,故障域分層結構,爲故障域定義的規則等。rem
ceph osd crush dumpjenkins
[root@ceph-admin opt]# ceph osd crush dump { "devices": [ { "id": 0, "name": "osd.0" }, { "id": 1, "name": "osd.1" }, { "id": 2, "name": "osd.2" } ], "types": [ { "type_id": 0, "name": "osd" }, { "type_id": 1, "name": "host" }, { "type_id": 2, "name": "chassis" }, { "type_id": 3, "name": "rack" }, { "type_id": 4, "name": "row" }, { "type_id": 5, "name": "pdu" }, { "type_id": 6, "name": "pod" }, { "type_id": 7, "name": "room" }, { "type_id": 8, "name": "datacenter" }, { "type_id": 9, "name": "region" }, { "type_id": 10, "name": "root" } ], "buckets": [ { "id": -1, "name": "default", "type_id": 10, "type_name": "root", "weight": 38337, "alg": "straw", "hash": "rjenkins1", "items": [ { "id": -2, "weight": 12779, "pos": 0 }, { "id": -3, "weight": 12779, "pos": 1 }, { "id": -4, "weight": 12779, "pos": 2 } ] }, { "id": -2, "name": "ceph-admin", "type_id": 1, "type_name": "host", "weight": 12779, "alg": "straw", "hash": "rjenkins1", "items": [ { "id": 2, "weight": 12779, "pos": 0 } ] }, { "id": -3, "name": "ceph-node1", "type_id": 1, "type_name": "host", "weight": 12779, "alg": "straw", "hash": "rjenkins1", "items": [ { "id": 0, "weight": 12779, "pos": 0 } ] }, { "id": -4, "name": "ceph-node2", "type_id": 1, "type_name": "host", "weight": 12779, "alg": "straw", "hash": "rjenkins1", "items": [ { "id": 1, "weight": 12779, "pos": 0 } ] } ], "rules": [ { "rule_id": 0, "rule_name": "replicated_ruleset", "ruleset": 0, "type": 1, "min_size": 1, "max_size": 10, "steps": [ { "op": "take", "item": -1, "item_name": "default" }, { "op": "chooseleaf_firstn", "num": 0, "type": "host" }, { "op": "emit" } ] } ], "tunables": { "choose_local_tries": 0, "choose_local_fallback_tries": 0, "choose_total_tries": 50, "chooseleaf_descend_once": 1, "chooseleaf_vary_r": 1, "chooseleaf_stable": 0, "straw_calc_version": 1, "allowed_bucket_algs": 22, "profile": "firefly", "optimal_tunables": 0, "legacy_tunables": 0, "minimum_required_version": "firefly", "require_feature_tunables": 1, "require_feature_tunables2": 1, "has_v2_rules": 0, "require_feature_tunables3": 1, "has_v3_rules": 0, "has_v4_buckets": 0, "require_feature_tunables5": 0, "has_v5_rules": 0 } }
5 mds map:它保存的信息包括MDS map 當前版本號,MDS map 的建立和修改時間,數據和元數據存儲池ID,集羣MDS數量以及MDS狀態。hash
ceph mds map