~ubuntu-branches/ubuntu/utopic/ceph/utopic-proposed

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
.\" Man page generated from reStructuredText.
.
.TH "CEPH-DENCODER" "8" "January 12, 2014" "dev" "Ceph"
.SH NAME
ceph-dencoder \- ceph encoder/decoder utility
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.SH SYNOPSIS
.nf
\fBceph\-dencoder\fP [commands...]
.fi
.sp
.SH DESCRIPTION
.sp
\fBceph\-dencoder\fP is a utility to encode, decode, and dump ceph data
structures.  It is used for debugging and for testing inter\-version
compatibility.
.sp
\fBceph\-dencoder\fP takes a simple list of commands and performs them
in order.
.SH COMMANDS
.INDENT 0.0
.TP
.B version
Print the version string for the \fBceph\-dencoder\fP binary.
.UNINDENT
.INDENT 0.0
.TP
.B import <file>
Read a binary blob of encoded data from the given file.  It will be
placed in an in\-memory buffer.
.UNINDENT
.INDENT 0.0
.TP
.B export <file>
Write the contents of the current in\-memory buffer to the given
file.
.UNINDENT
.INDENT 0.0
.TP
.B list_types
List the data types known to this build of \fBceph\-dencoder\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B type <name>
Select the given type for future \fBencode\fP or \fBdecode\fP operations.
.UNINDENT
.INDENT 0.0
.TP
.B decode
Decode the contents of the in\-memory buffer into an instance of the
previously selected type.  If there is an error, report it.
.UNINDENT
.INDENT 0.0
.TP
.B encode
Encode the contents of the in\-memory instance of the previously
selected type to the in\-memory buffer.
.UNINDENT
.INDENT 0.0
.TP
.B dump_json
Print a JSON\-formatted description of the in\-memory object.
.UNINDENT
.INDENT 0.0
.TP
.B count_tests
Print the number of built\-in test instances of the previosly
selected type that \fBceph\-dencoder\fP is able to generate.
.UNINDENT
.INDENT 0.0
.TP
.B select_test <n>
Select the given build\-in test instance as a the in\-memory instance
of the type.
.UNINDENT
.INDENT 0.0
.TP
.B get_features
Print the decimal value of the feature set supported by this version
of \fBceph\-dencoder\fP\&.  Each bit represents a feature.  These correspond to
CEPH_FEATURE_* defines in src/include/ceph_features.h.
.UNINDENT
.INDENT 0.0
.TP
.B set_features <f>
Set the feature bits provided to \fBencode\fP to \fIf\fP\&.  This allows
you to encode objects such that they can be understood by old
versions of the software (for those types that support it).
.UNINDENT
.SH EXAMPLE
.sp
Say you want to examine an attribute on an object stored by \fBceph\-osd\fP\&.  You can do:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
$ 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\(aq1",
  "prior_version": "0\(aq0",
  "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": {}}
.ft P
.fi
.UNINDENT
.UNINDENT
.SH AVAILABILITY
.sp
\fBceph\-dencoder\fP is part of the Ceph distributed storage system. Please
refer to the Ceph documentation at \fI\%http://ceph.com/docs\fP for more
information.
.SH SEE ALSO
.sp
\fBceph\fP(8)
.SH COPYRIGHT
2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons BY-SA
.\" Generated by docutils manpage writer.
.