ceph-kvstore-tool – ceph kvstore manipulation tool

Synopsis

ceph-kvstore-tool <leveldb|rocksdb|bluestore-kv> <store path> command [args…]

Description

ceph-kvstore-tool is a kvstore manipulation tool. It allows users to manipulateleveldb/rocksdb’s data (like OSD’s omap) offline.

Commands

ceph-kvstore-tool utility uses many commands for debugging purposewhich are as follows:

  • list [prefix]
  • Print key of all KV pairs stored with the URL encoded prefix.

  • list-crc [prefix]

  • Print CRC of all KV pairs stored with the URL encoded prefix.

  • dump [prefix]

  • Print key and value of all KV pairs stored with the URL encoded prefix.

  • exists [key]

  • Check if there is any KV pair stored with the URL encoded prefix. If keyis also specified, check for the key with the prefix instead.

  • get [out ]

  • Get the value of the KV pair stored with the URL encoded prefix and key.If file is also specified, write the value to the file.

  • crc

  • Get the CRC of the KV pair stored with the URL encoded prefix and key.

  • get-size [ ]

  • Get estimated store size or size of value specified by prefix and key.

  • set [ver |in ]

  • Set the value of the KV pair stored with the URL encoded prefix and key.The value could be version_t or text.

  • rm

  • Remove the KV pair stored with the URL encoded prefix and key.

  • rm-prefix

  • Remove all KV pairs stored with the URL encoded prefix.

  • store-copy [num-keys-per-tx]

  • Copy all KV pairs to another directory specified by path.[num-keys-per-tx] is the number of KV pairs copied for a transaction.

  • store-crc

  • Store CRC of all KV pairs to a file specified by path.

  • compact

  • Subcommand compact is used to compact all data of kvstore. It will openthe database, and trigger a database’s compaction. After compaction, somedisk space may be released.

  • compact-prefix

  • Compact all entries specified by the URL encoded prefix.

  • compact-range

  • Compact some entries specified by the URL encoded prefix and range.

  • destructive-repair

  • Make a (potentially destructive) effort to recover a corrupted database.Note that in the case of rocksdb this may corrupt an otherwise uncorrupteddatabase–use this only as a last resort!

  • stats

  • Prints statistics from underlying key-value database. This is only for informative purposes.Format and information content may vary between releases. For RocksDB information includescompactions stats, performance counters, memory usage and internal RocksDB stats.

Availability

ceph-kvstore-tool is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer tothe Ceph documentation at http://ceph.com/docs for more information.

See also

ceph(8)