Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / doc / man / 8 / ceph-kvstore-tool.rst
1 :orphan:
2
3 =====================================================
4  ceph-kvstore-tool -- ceph kvstore manipulation tool
5 =====================================================
6
7 .. program:: ceph-kvstore-tool
8
9 Synopsis
10 ========
11
12 | **ceph-kvstore-tool** <leveldb|rocksdb|bluestore-kv> <store path> *command* [args...]
13
14
15 Description
16 ===========
17
18 :program:`ceph-kvstore-tool` is a kvstore manipulation tool. It allows users to manipule
19 leveldb/rocksdb's data (like OSD's omap) offline.
20
21 Commands
22 ========
23
24 :program:`ceph-kvstore-tool` utility uses many commands for debugging purpose
25 which are as follows:
26
27 :command:`list [prefix]`
28     Print key of all KV pairs stored with the URL encoded prefix.
29
30 :command:`list-crc [prefix]`
31     Print CRC of all KV pairs stored with the URL encoded prefix.
32
33 :command:`exists <prefix> [key]`
34     Check if there is any KV pair stored with the URL encoded prefix. If key
35     is also specified, check for the key with the prefix instead.
36
37 :command:`get <prefix> <key> [out <file>]`
38     Get the value of the KV pair stored with the URL encoded prefix and key.
39     If file is also specified, write the value to the file.
40
41 :command:`crc <prefix> <key>`
42     Get the CRC of the KV pair stored with the URL encoded prefix and key. 
43
44 :command:`get-size [<prefix> <key>]`
45     Get estimated store size or size of value specified by prefix and key.
46
47 :command:`set <prefix> <key> [ver <N>|in <file>]`
48     Set the value of the KV pair stored with the URL encoded prefix and key. 
49     The value could be *version_t* or text.
50
51 :command:`rm <prefix> <key>`
52     Remove the KV pair stored with the URL encoded prefix and key.
53
54 :command:`rm-prefix <prefix>`
55     Remove all KV pairs stored with the URL encoded prefix.
56
57 :command:`store-copy <path> [num-keys-per-tx]`
58     Copy all KV pairs to another directory specified by ``path``. 
59     [num-keys-per-tx] is the number of KV pairs copied for a transaction.
60
61 :command:`store-crc <path>`
62     Store CRC of all KV pairs to a file specified by ``path``.
63
64 :command:`compact`
65     Subcommand ``compact`` is used to compact all data of kvstore. It will open
66     the database, and trigger a database's compaction. After compaction, some 
67     disk space may be released.
68
69 :command:`compact-prefix <prefix>`
70     Compact all entries specified by the URL encoded prefix. 
71    
72 :command:`compact-range <prefix> <start> <end>`
73     Compact some entries specified by the URL encoded prefix and range.
74
75 Availability
76 ============
77
78 **ceph-kvstore-tool** is part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to
79 the Ceph documentation at http://ceph.com/docs for more information.
80
81
82 See also
83 ========
84
85 :doc:`ceph <ceph>`\(8)