一、概述
每个osd目录下都保存了osdmap以及pglog等等,我们可以从osdmap中解析出crushmap,操作如下:
1、跳转到meta目录下:cd /var/lib/ceph/osd/ceph-0/current/meta
2、[root@docker meta]# ls * |grep osdmap
.......
incuosdmap.228043__0_2993DE0B__none
incuosdmap.228044__0_2993DFDB__none
incuosdmap.228045__0_2993DF6B__none
incuosdmap.228046__0_2993DC3B__none
incuosdmap.228047__0_2993DDCB__none
incuosdmap.228048__0_2993D29B__none
3、find ./ -name *osdmap.228017*
4、cp osdmap.228016__0_C0CF1234__none /root/cp/
5、osdmaptool osdmap.228016__0_C0CF1234__none --export-crush crushmap
6、crushtool -d crushmap -o 1.txt