summaryrefslogtreecommitdiff
path: root/man/rbd.8
blob: 0278137d8578cc69cbb9313ec4d189c81bcfe326 (plain)
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
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
.TH "RBD" "8" "September 22, 2011" "dev" "Ceph"
.SH NAME
rbd \- manage rados block device (RBD) images
.
.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
..
.\" Man page generated from reStructeredText.
.
.SH SYNOPSIS
.nf
\fBrbd\fP [ \-c \fIceph.conf\fP ] [ \-m \fImonaddr\fP ] [ \-p | \-\-pool \fIpool\fP ] [
\-\-size \fIsize\fP ] [ \-\-order \fIbits\fP ] [ \fIcommand\fP ... ]
.fi
.sp
.SH DESCRIPTION
.sp
\fBrbd\fP is a utility for manipulating rados block device (RBD) images,
used by the Linux rbd driver and the rbd storage driver for Qemu/KVM.
RBD images are simple block devices that are striped over objects and
stored in a RADOS object store. The size of the objects the image is
striped over must be a power of two.
.SH OPTIONS
.INDENT 0.0
.TP
.B \-c ceph.conf, \-\-conf ceph.conf
Use ceph.conf configuration file instead of the default /etc/ceph/ceph.conf to
determine monitor addresses during startup.
.UNINDENT
.INDENT 0.0
.TP
.B \-m monaddress[:port]
Connect to specified monitor (instead of looking through ceph.conf).
.UNINDENT
.INDENT 0.0
.TP
.B \-p pool, \-\-pool pool
Interact with the given pool. Required by most commands.
.UNINDENT
.SH PARAMETERS
.INDENT 0.0
.TP
.B \-\-size size\-in\-mb
Specifies the size (in megabytes) of the new rbd image.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-order bits
Specifies the object size expressed as a number of bits, such that
the object size is \fB1 << order\fP. The default is 22 (4 MB).
.UNINDENT
.INDENT 0.0
.TP
.B \-\-snap snap
Specifies the snapshot name for the specific operation.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-user username
Specifies the username to use with the map command.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-secret filename
Specifies a file containing the secret to use with the map command.
.UNINDENT
.SH COMMANDS
.INDENT 0.0
.TP
.B \fBls\fP [\fIpool\-name\fP]
Will list all rbd images listed in the rbd_directory object.
.TP
.B \fBinfo\fP [\fIimage\-name\fP]
Will dump information (such as size and order) about a specific rbd image.
.TP
.B \fBcreate\fP [\fIimage\-name\fP]
Will create a new rbd image. You must also specify the size via \-\-size.
.TP
.B \fBresize\fP [\fIimage\-name\fP]
Resizes rbd image. The size parameter also needs to be specified.
.TP
.B \fBrm\fP [\fIimage\-name\fP]
Deletes an rbd image (including all data blocks). If the image has
snapshots, this fails and nothing is deleted.
.TP
.B \fBexport\fP [\fIimage\-name\fP] [\fIdest\-path\fP]
Exports image to dest path.
.TP
.B \fBimport\fP [\fIpath\fP] [\fIdest\-image\fP]
Creates a new image and imports its data from path.
.TP
.B \fBcp\fP [\fIsrc\-image\fP] [\fIdest\-image\fP]
Copies the content of a src\-image into the newly created dest\-image.
.TP
.B \fBmv\fP [\fIsrc\-image\fP] [\fIdest\-image\fP]
Renames an image.
.TP
.B \fBsnap\fP ls [\fIimage\-name\fP]
Dumps the list of snapshots inside a specific image.
.TP
.B \fBsnap\fP create [\fIimage\-name\fP]
Creates a new snapshot. Requires the snapshot name parameter specified.
.TP
.B \fBsnap\fP rollback [\fIimage\-name\fP]
Rollback image content to snapshot. This will iterate through the entire blocks
array and update the data head content to the snapshotted version.
.TP
.B \fBsnap\fP rm [\fIimage\-name\fP]
Removes the specified snapshot.
.TP
.B \fBsnap\fP purge [\fIimage\-name\fP]
Removes all snapshots from an image.
.TP
.B \fBmap\fP [\fIimage\-name\fP]
Maps the specified image to a block device via the rbd kernel module.
.TP
.B \fBunmap\fP [\fIdevice\-path\fP]
Unmaps the block device that was mapped via the rbd kernel module.
.TP
.B \fBshowmapped\fP
Show the rbd images that are mapped via the rbd kernel module.
.UNINDENT
.SH IMAGE NAME
.sp
In addition to using the \-\-pool and the \-\-snap options, the image name can include both
the pool name and the snapshot name. The image name format is as follows:
.sp
.nf
.ft C
[pool/]image\-name[@snap]
.ft P
.fi
.sp
Thus an image name that contains a slash character (\(aq/\(aq) requires specifying the pool
name explicitly.
.SH EXAMPLES
.sp
To create a new rbd image that is 100 GB:
.sp
.nf
.ft C
rbd \-p mypool create myimage \-\-size 102400
.ft P
.fi
.sp
or alternatively:
.sp
.nf
.ft C
rbd create mypool/myimage \-\-size 102400
.ft P
.fi
.sp
To use a non\-default object size (8 MB):
.sp
.nf
.ft C
rbd create mypool/myimage \-\-size 102400 \-\-order 23
.ft P
.fi
.sp
To delete an rbd image (be careful!):
.sp
.nf
.ft C
rbd rm mypool/myimage
.ft P
.fi
.sp
To create a new snapshot:
.sp
.nf
.ft C
rbd create mypool/myimage@mysnap
.ft P
.fi
.sp
To map an image via the kernel with cephx enabled:
.sp
.nf
.ft C
rbd map myimage \-\-user admin \-\-secret secretfile
.ft P
.fi
.sp
To unmap an image:
.sp
.nf
.ft C
rbd unmap /dev/rbd0
.ft P
.fi
.SH AVAILABILITY
.sp
\fBrbd\fP is part of the Ceph distributed file system. Please refer to
the Ceph wiki at \fI\%http://ceph.newdream.net/wiki\fP for more information.
.SH SEE ALSO
.sp
\fBceph\fP(8),
\fBrados\fP(8)
.SH COPYRIGHT
2011, New Dream Network
.\" Generated by docutils manpage writer.
.\" 
.