On 08/28/2014 02:21 PM, yuelongguang wrote: > hi, joao,mark nelson, both of you. > > where monmap is stored? > how to dump monitor's data in > /var/lib/ceph/mon/ceph-cephosd1-mona/store.db/? > thanks monmap is stored in the monitor's db (default leveldb @ store.db). In all likelihood you won't have just one monmap but several versions of it. Each monmap is kept as the value for keys of format 'monmap:X', with X being a version between monmap:first_committed and monmap:last_committed. Both monmap:first_committed and monmap:last_committed are keys with an integer as value, the first being the first known version still kept, the latter the latest version known. In this case, ':' is not the real separator used by the store but a construct I used to mark its placement. In fact it's more like '\0' or something, but that's handled transparently by the monitor's store interface. If you just want to obtain a monmap you don't really need to access the store at all. You can simply run 'ceph-mon -i <ID> --extract-monmap /path/to/monmap -d'. '-d' will make sure to run ceph-mon in the foreground and allow you to see whatever it outputs while it executes, and ceph-mon will exit after dumping the monmap to /path/to/monmap. The contents of /path/to/monmap will be a monmap that will be understood my the monmaptool. If you want to check the store contents though, you will be able to do so using 'ceph-kvstore-tool' -- this is present in the ceph-test package or can be compiled from the source with 'make ceph-kvstore-tool'. 'ceph-kvstore-tool /path/to/store.db list' will output all the keys in the store. 'ceph-kvstore-tool --help' (or is it just help? can't recall) will show you usage information. Hope this helps. -Joao > > > > > > > > At 2014-08-28 09:00:41, "Mark Nelson" <mark.nelson at inktank.com> wrote: >>On 08/28/2014 07:48 AM, yuelongguang wrote: >>> hi,all >>> what is in directory, /var/lib/ceph/mon/ceph-cephosd1-mona/store.db/ >>> how to dump? >>> where monmap is stored? >> >>That directory is typically a leveldb store, though potentially could be >>rocksdb or maybe something else after firefly. You can use the leveldb >>api to access it. There may be other convenience tools to extract the >>data out of it too. Joao may know more. >> >> >>> thanks >>> >>> >>> >>> >>> _______________________________________________ >>> ceph-users mailing list >>> ceph-users at lists.ceph.com >>> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com >>> >> >>_______________________________________________ >>ceph-users mailing list >>ceph-users at lists.ceph.com >>http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com > > > -- Joao Eduardo Luis Software Engineer | http://inktank.com | http://ceph.com