能夠查閱官方文檔:osdmaptool、monmaptoolnode
方法一:經過ceph命令ide
# ceph osd dump
epoch 95
fsid ced59665-9de8-42b7-b2c3-5a19cffe97c7
created 2016-03-25 21:13:13.595390
modified 2016-03-31 12:36:39.588974
flags sortbitwise
pool 0 'rbd' replicated size 2 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 128 pgp_num 128 last_change 16 flags hashpspool stripe_width 0
pool 1 'testpool' replicated size 2 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 512 pgp_num 512 last_change 95 flags hashpspool stripe_width 0
removed_snaps [1~3]
max_osd 6
osd.0 up in weight 1 up_from 77 up_thru 88 down_at 70 last_clean_interval [54,61) 10.167.225.35:6812/3979 10.167.225.35:6813/3979 10.167.225.35:6814/3979 10.167.225.35:6815/3979 exists,up 5c0194c3-351b-4ce9-9864-083819a3e0cb
osd.1 up in weight 1 up_from 74 up_thru 91 down_at 70 last_clean_interval [51,61) 10.167.225.35:6808/3668 10.167.225.35:6809/3668 10.167.225.35:6810/3668 10.167.225.35:6811/3668 exists,up 02327243-d1e4-4ea5-9688-9c5e6f46ec44
osd.2 up in weight 1 up_from 68 up_thru 89 down_at 67 last_clean_interval [57,61) 10.167.225.35:6804/3107 10.167.225.35:6805/3107 10.167.225.35:6806/3107 10.167.225.35:6807/3107 exists,up 03a50780-9924-4f66-bf5c-71fa0b37bf2f
osd.3 up in weight 1 up_from 63 up_thru 89 down_at 62 last_clean_interval [48,61) 10.167.225.35:6800/2728 10.167.225.35:6801/2728 10.167.225.35:6802/2728 10.167.225.35:6803/2728 exists,up edaf6eda-6683-48bd-adf3-f9c748148036
osd.4 up in weight 1 up_from 85 up_thru 90 down_at 80 last_clean_interval [71,84) 10.167.225.63:6804/3048 10.167.225.63:6808/1003048 10.167.225.63:6809/1003048 10.167.225.63:6810/1003048 exists,up f57ba6b1-54e9-4bfc-930f-42adbdd036fb
osd.5 up in weight 1 up_from 85 up_thru 91 down_at 80 last_clean_interval [65,84) 10.167.225.63:6800/2559 10.167.225.63:6805/1002559 10.167.225.63:6807/1002559 10.167.225.63:6811/1002559 exists,up 583e265c-11c1-4230-81d6-7c9a58d0f463
工具
方法二:經過osdmaptool工具this
獲取osdmap的二進制文件代理
# sudo ceph osd getmap -o osds.map
got osdmap epoch 95
rest
使用文本方式查看osdmap日誌
# osdmaptool --print osds.map
osdmaptool: osdmap file 'osds.map'
epoch 95
fsid ced59665-9de8-42b7-b2c3-5a19cffe97c7
created 2016-03-25 21:13:13.595390
modified 2016-03-31 12:36:39.588974
flags sortbitwiseorm
pool 0 'rbd' replicated size 2 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 128 pgp_num 128 last_change 16 flags hashpspool stripe_width 0
pool 1 'testpool' replicated size 2 min_size 2 crush_ruleset 0 object_hash rjenkins pg_num 512 pgp_num 512 last_change 95 flags hashpspool stripe_width 0
removed_snaps [1~3]對象
max_osd 6
osd.0 up in weight 1 up_from 77 up_thru 88 down_at 70 last_clean_interval [54,61) 10.167.225.35:6812/3979 10.167.225.35:6813/3979 10.167.225.35:6814/3979 10.167.225.35:6815/3979 exists,up 5c0194c3-351b-4ce9-9864-083819a3e0cb
osd.1 up in weight 1 up_from 74 up_thru 91 down_at 70 last_clean_interval [51,61) 10.167.225.35:6808/3668 10.167.225.35:6809/3668 10.167.225.35:6810/3668 10.167.225.35:6811/3668 exists,up 02327243-d1e4-4ea5-9688-9c5e6f46ec44
osd.2 up in weight 1 up_from 68 up_thru 89 down_at 67 last_clean_interval [57,61) 10.167.225.35:6804/3107 10.167.225.35:6805/3107 10.167.225.35:6806/3107 10.167.225.35:6807/3107 exists,up 03a50780-9924-4f66-bf5c-71fa0b37bf2f
osd.3 up in weight 1 up_from 63 up_thru 89 down_at 62 last_clean_interval [48,61) 10.167.225.35:6800/2728 10.167.225.35:6801/2728 10.167.225.35:6802/2728 10.167.225.35:6803/2728 exists,up edaf6eda-6683-48bd-adf3-f9c748148036
osd.4 up in weight 1 up_from 85 up_thru 90 down_at 80 last_clean_interval [71,84) 10.167.225.63:6804/3048 10.167.225.63:6808/1003048 10.167.225.63:6809/1003048 10.167.225.63:6810/1003048 exists,up f57ba6b1-54e9-4bfc-930f-42adbdd036fb
osd.5 up in weight 1 up_from 85 up_thru 91 down_at 80 last_clean_interval [65,84) 10.167.225.63:6800/2559 10.167.225.63:6805/1002559 10.167.225.63:6807/1002559 10.167.225.63:6811/1002559 exists,up 583e265c-11c1-4230-81d6-7c9a58d0f463ip
其中(TODO)
fsid
The fsid is a unique identifier for the cluster, and stands for File System ID from the days when the Ceph Storage Cluster was principally for the Ceph Filesystem. Ceph now supports native interfaces, block devices, and object storage gateway interfaces too, so fsid is a bit of a misnomer.
每一個OSD說明更新日誌條目,若是它們表示更新的對象的內容,增長了該對象所需的更新列表。 這個列表爲了<OSD,PG>調用 Missing Set .
Before a Primary can successfully complete the Peering process, it must inform a monitor that is alive through the current OSD map Epoch by having the monitor set its up_thru in the osd map. This helps Peering ignore previous Acting Sets for which Peering never completed after certain sequences of failures, such as the second interval below:
在一個主要部分能順利完成對等的過程以前,它必須經過現有的osd映射Epoch,由在osd映射上設置監視器的up_thru來確認一個狀態爲active監視器。這幫助對等操做那些先前對等操做在一系列的失敗後從沒完成的代理設置,例以下面的第二個時間間隔後:
方法一:所有經過montoolmap工具,優勢是能夠查看指定Monitor的monmap
(1)用montoolmap生成指定的monitors 的map,添加mon能夠經過 --add參數
# monmaptool --create --add mon.a 10.167.225.35:6789 --clobber monmap
monmaptool: monmap file monmap
monmaptool: generated fsid 7c2bd6f1-a32b-462c-8287-a326a46a15c6
monmaptool: writing epoch 0 to monmap (1 monitors)
(2) 使用montoolmap工具查看map
# monmaptool --print monmap
monmaptool: monmap file monmap
epoch 0
fsid 7c2bd6f1-a32b-462c-8287-a326a46a15c6
last_changed 2016-03-31 18:35:09.778357
created 2016-03-31 18:35:09.778357
0: 10.167.225.35:6789/0 mon.mon.a
方法二:獲取全部的monitor的信息
# ceph mon getmap -o monmap.map
got monmap epoch 1
# monmaptool --print monmap.map
monmaptool: monmap file monmap.map
epoch 1
fsid ced59665-9de8-42b7-b2c3-5a19cffe97c7
last_changed 0.000000
created 0.000000
0: 10.167.225.35:6789/0 mon.node1
方法3、經過「ceph mon dump」命令
# ceph mon dumpdumped monmap epoch 1epoch 1fsid ced59665-9de8-42b7-b2c3-5a19cffe97c7last_changed 0.000000created 0.0000000: 10.167.225.35:6789/0 mon.node1