前言:
最近生产环境出现一个异常,设备系统卡一天写入量达到270多G,这样的压力下一个系统卡使用不了多久就会挂掉。os组同事使用blacktrace命令发现系统卡上有一个进程名称为rocksdb的进程在频繁的刷入数据,直接咬定这270G数据是我们ceph写入的。最终发现,ceph mon的数据库是放在系统卡里的,为了有效卸锅,特地调研了一下该工具(这个工具好像默认是不装的,需要单独安装一下)
首先看一下该命令的man page
NAME
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 manipule leveldb/rocksdb's data (like OSD's omap) offline.
COMMANDS
ceph-kvstore-tool utility uses many commands for debugging purpose which 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.
exists <prefix> [key]
Check if there is any KV pair stored with the URL encoded prefix. If key is also specified, check for the key with the prefix instead.
get <prefix> <key> [out <file>]
Get the value of the KV pair stored with the URL encoded prefix and key. If file is also specified, write the value