能够查阅官方文档: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