CEPH-DENCODER(8) | Ceph | CEPH-DENCODER(8) |
ceph-dencoder - ceph encoder/decoder utility
ceph-dencoder [commands...]
ceph-dencoder is a utility to encode, decode, and dump ceph data structures. It is used for debugging and for testing inter-version compatibility.
ceph-dencoder takes a simple list of commands and performs them in order.
Say you want to examine an attribute on an object stored by ceph-osd. You can do this:
$ cd /mnt/osd.12/current/2.b_head $ attr -l foo_bar_head_EFE6384B Attribute "ceph.snapset" has a 31 byte value for foo_bar_head_EFE6384B Attribute "ceph._" has a 195 byte value for foo_bar_head_EFE6384B $ attr foo_bar_head_EFE6384B -g ceph._ -q > /tmp/a $ ceph-dencoder type object_info_t import /tmp/a decode dump_json { "oid": { "oid": "foo",
"key": "bar",
"snapid": -2,
"hash": 4024842315,
"max": 0},
"locator": { "pool": 2,
"preferred": -1,
"key": "bar"},
"category": "",
"version": "9'1",
"prior_version": "0'0",
"last_reqid": "client.4116.0:1",
"size": 1681,
"mtime": "2012-02-21 08:58:23.666639",
"lost": 0,
"wrlock_by": "unknown.0.0:0",
"snaps": [],
"truncate_seq": 0,
"truncate_size": 0,
"watchers": {}}
Alternatively, perhaps you wish to dump an internal CephFS metadata object, you might do that like this:
$ rados -p metadata get mds_snaptable mds_snaptable.bin $ ceph-dencoder type SnapServer skip 8 import mds_snaptable.bin decode dump_json { "snapserver": { "last_snap": 1,
"pending_noop": [],
"snaps": [],
"need_to_purge": {},
"pending_create": [],
"pending_destroy": []}}
ceph-dencoder is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to the Ceph documentation at http://ceph.com/docs for more information.
2010-2021, Inktank Storage, Inc. and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)
May 27, 2021 | dev |