CEPH-DENCODER(8)
π CEPH-DENCODER β bestie edition π
okay so this is the manual page for ceph-dencoder (section 8 of the Ceph manual, iykyk), and I'm about to make it make sense for you. grab a snack. π
β¨ NAME β¨
ceph-dencoder β the ceph encoder/decoder utility, and yes she is that girl π
β¨ SYNOPSIS β¨
ceph-dencoder [commands...]
β¨ DESCRIPTION β¨
so ceph-dencoder is this little utility that encodes, decodes, and dumps ceph data structures. it's a debugging girlie and also a testing girlie β specifically she tests inter-version compatibility. main character energy fr fr. π
the way it works is so simple it's actually iconic: ceph-dencoder takes a plain list of commands and does them in order. that's it. that's the whole vibe.
β¨ COMMANDS β¨
here's the whole roster, no skips, no cuts, we're doing all of them π
versionβ prints the version string for theceph-dencoderbinary. just a lil hello, who she is.import<file> β reads a binary blob of encoded data out of the file you name. it gets parked in an in-memory buffer (her little purse π).export<file> β writes whatever's currently in the in-memory buffer out to the file you name.list_typesβ lists all the data types this particular build ofceph-dencoderknows about.type<name> β picks the type you named, and everything you encode or decode after this uses it.skip<bytes> β seeks <bytes> into the imported file before reading the data structure. use this when your object has a preamble/header sitting in front of the actual object of interest. she's just skipping past the intro, respectfully. πdecodeβ decodes the contents of the in-memory buffer into an instance of the type you previously selected. if something goes wrong, she reports the error. no hiding it.encodeβ encodes the in-memory instance of the previously selected type into the in-memory buffer. the reverse girlie.dump_jsonβ prints a JSON-formatted description of the in-memory object. pretty print, slay.count_testsβ prints how many built-in test instances of the previously selected typeceph-dencoderis able to generate.select_test<n> β selects the built-in test instance you named and makes it the in-memory instance of the type.get_featuresβ prints the decimal value of the feature set supported by this version ofceph-dencoder. every single bit represents a feature, and these line up with theCEPH_FEATURE_*defines over insrc/include/ceph_features.h.set_features<f> β sets the feature bits that get provided toencodeto <f>. this is the time-travel option: it lets you encode objects so that old versions of the software can still understand them (for those types that support it).
β¨ EXAMPLE β¨
okay so say you wanna peek at an attribute on an object that ceph-osd stored. you can do exactly 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": {}}
and alternatively β plot twist π¦ β maybe you wanna dump an internal CephFS metadata object instead. that looks 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": []}}
see how skip 8 is doing all the heavy lifting there? that's the preamble/header thing we talked about. periodt. π
β¨ AVAILABILITY β¨
ceph-dencoder is part of Ceph, a massively scalable, open-source, distributed storage system. if you want more, the Ceph documentation lives at <https://docs.ceph.com> and she has so much more to say. π
β¨ SEE ALSO β¨
ceph<>(8)
β¨ Copyright β¨
2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0).
mwah π that's the whole page. this build is from the dev source, dated Oct 06, 2026, and it's the CEPH-DENCODER(8) page of the Ceph manual β go forth and decode, bestie. πβ¨
π¦ where this page comes from
- ubuntu stonking: ceph-common 20.2.4+ds1-0ubuntu1 Β· LGPL2.1 (see COPYING-LGPL2.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms