How to get a Ceph MON/OSD map at a specific epoch?


To get a MON map or an OSD map of a specific epoch, use:

# ceph osd getmap <epoch-value>
# ceph mon getmap <epoch-value>

The map can be forwarded to a file as following:

# ceph osd getmap <epoch-value> -o /tmp/ceph_osd_getmap.bin

This would be in a binary format, and hence will need to be dumped to a human-readable form.

# osdmaptool –print /tmp/ceph-osd-getmap.bin

This will print the current OSD map, similar to the output of ‘ceph osd dump’.

Where this command shines is when you can fetch maps from previous epochs, and pull information on specific placement groups in those epochs.

For example, I’ve had all the OSDs on one of my node down some time back (in a previous epoch). The ability to query a previous epoch gives the administrator the power to understand how exactly the cluster was at a specific time period.

One thought on “How to get a Ceph MON/OSD map at a specific epoch?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s