-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathceph-disk.8
400 lines (400 loc) · 9.41 KB
/
ceph-disk.8
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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
.\" Man page generated from reStructuredText.
.
.TH "CEPH-DISK" "8" "December 18, 2014" "dev" "Ceph"
.SH NAME
ceph-disk \- Ceph disk preparation and activation utility for OSD
.
.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\-disk\fP \fBprepare\fP [\-\-cluster \fIclustername\fP] [\-\-cluster\-uuid \fIuuid\fP]
[\-\-fs\-type \fIxfs|ext4|btrfs\fP] [\fIdata\-path\fP] [\fIjournal\-path\fP]
.fi
.sp
.nf
\fBceph\-disk\fP \fBactivate\fP [\fIdata\-path\fP] [\-\-activate\-key \fIpath\fP]
.fi
.sp
.nf
\fBceph\-disk\fP \fBactivate\-all\fP
.fi
.sp
.nf
\fBceph\-disk\fP \fBlist\fP
.fi
.sp
.SH DESCRIPTION
.sp
\fBceph\-disk\fP is a utility that can prepare and activate a disk, partition or
directory as a Ceph OSD. It is run directly or triggered by \fBceph\-deploy\fP
or \fBudev\fP\&. It can also be triggered by other deployment utilities like \fBChef\fP,
\fBJuju\fP, \fBPuppet\fP etc.
.sp
It actually automates the multiple steps involved in manual creation and start
of an OSD into two steps of preparing and activating the OSD by using the
subcommands \fBprepare\fP and \fBactivate\fP\&.
.SH SUBCOMMANDS
.SS prepare
.sp
Prepare a directory, disk or drive for a Ceph OSD. It creates a GPT partition,
marks the partition with Ceph type \fBuuid\fP, creates a file system, marks the
file system as ready for Ceph consumption, uses entire partition and adds a new
partition to the journal disk. It is run directly or triggered by
\fBceph\-deploy\fP\&.
.sp
Usage:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ceph\-disk prepare \-\-cluster [cluster\-name] \-\-cluster\-uuid [uuid] \-\-fs\-type
[ext4|xfs|btrfs] [data\-path] [journal\-path]
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Other options like \fI\%--osd-uuid\fP, \fI\%--journal-uuid\fP,
\fI\%--zap-disk\fP, \fI\%--data-dir\fP, \fI\%--data-dev\fP,
\fI\%--journal-file\fP, \fI\%--journal-dev\fP, \fI\%--dmcrypt\fP
and \fI\%--dmcrypt-key-dir\fP can also be used with the subcommand.
.SS activate
.sp
Activate the Ceph OSD. It mounts the volume in a temporary location, allocates
an OSD id (if needed), remounts in the correct location
\fB/var/lib/ceph/osd/$cluster\-$id\fP and starts ceph\-osd. It is triggered by
\fBudev\fP when it sees the OSD GPT partition type or on ceph service start with
\fBceph disk activate\-all\fP\&. It is also run directly or triggered by
\fBceph\-deploy\fP\&.
.sp
Usage:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ceph\-disk activate [PATH]
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Here, [PATH] is path to a block device or a directory.
.sp
An additional option \fI\%--activate-key\fP has to be used with this
subcommand when a copy of \fB/var/lib/ceph/bootstrap\-osd/{cluster}.keyring\fP
isn\(aqt present in the OSD node.
.sp
Usage:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ceph\-disk activate [PATH] [\-\-activate\-key PATH]
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Another option \fI\%--mark-init\fP can also be used with this subcommand.
\fB\-\-mark\-init\fP provides init system to manage the OSD directory.
.SS activate\-journal
.sp
Activate an OSD via it\(aqs journal device. \fBudev\fP triggers
\fBceph\-disk activate\-journal <dev>\fP based on the partition type.
.sp
Usage:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ceph\-disk activate\-journal [DEV]
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Here, [DEV] is the path to a journal block device.
.sp
Others options like \fI\%--activate-key\fP and \fI\%--mark-init\fP can also
be used with this subcommand.
.sp
\fB\-\-mark\-init\fP provides init system to manage the OSD directory.
.sp
Usage:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ceph\-disk activate\-journal [\-\-activate\-key PATH] [\-\-mark\-init INITSYSTEM] [DEV]
.ft P
.fi
.UNINDENT
.UNINDENT
.SS activate\-all
.sp
Activate all tagged OSD partitions. \fBactivate\-all\fP relies on
\fB/dev/disk/by\-parttype\-uuid/$typeuuid.$uuid\fP to find all partitions. Special
\fBudev\fP rules are installed to create these links. It is triggered on ceph
service start or run directly.
.sp
Usage:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ceph\-disk activate\-all
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Others options like \fI\%--activate-key\fP and \fI\%--mark-init\fP can
also be used with this subcommand.
.sp
\fB\-\-mark\-init\fP provides init system to manage the OSD directory.
.sp
Usage:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ceph\-disk activate\-all [\-\-activate\-key PATH] [\-\-mark\-init INITSYSTEM]
.ft P
.fi
.UNINDENT
.UNINDENT
.SS list
.sp
List disk partitions and Ceph OSDs. It is run directly or triggered by
\fBceph\-deploy\fP\&.
.sp
Usage:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ceph\-disk list
.ft P
.fi
.UNINDENT
.UNINDENT
.SS suppress\-activate
.sp
Suppress activate on a device (prefix). Mark devices that you don\(aqt want to
activate with a file like \fB/var/lib/ceph/tmp/suppress\-activate.sdb\fP where the
last bit is the sanitized device name (/dev/X without the /dev/ prefix). A
function \fBis_suppressed()\fP checks for and matches a prefix (/dev/). It means
suppressing sdb will stop activate on sdb1, sdb2, etc.
.sp
Usage:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ceph\-disk suppress\-activate [PATH]
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Here, [PATH] is path to a block device or a directory.
.SS unsuppress\-activate
.sp
Stop suppressing activate on a device (prefix). It is used to activate a device
that was earlier kept deactivated using \fBsuppress\-activate\fP\&.
.sp
Usage:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ceph\-disk unsuppress\-activate [PATH]
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Here, [PATH] is path to a block device or a directory.
.SS zap
.sp
Zap/erase/destroy a device\(aqs partition table and contents. It actually uses
\fBsgdisk\fP and it\(aqs option \fB\-\-zap\-all\fP to destroy both GPT and MBR data
structures so that the disk becomes suitable for repartitioning. \fBsgdisk\fP
then uses \fB\-\-mbrtogpt\fP to convert the MBR or BSD disklabel disk to a GPT
disk. The \fBprepare\fP subcommand can now be executed which will create a new
GPT partition. It is also run directly or triggered by \fBceph\-deploy\fP\&.
.sp
Usage:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
ceph\-disk zap [DEV]
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
Here, [DEV] is path to a block device.
.SH OPTIONS
.INDENT 0.0
.TP
.B \-\-prepend\-to\-path PATH
Prepend PATH to $PATH for backward compatibility (default \fB/usr/bin\fP).
.UNINDENT
.INDENT 0.0
.TP
.B \-\-statedir PATH
Directory in which ceph configuration is preserved (default \fB/usr/lib/ceph\fP).
.UNINDENT
.INDENT 0.0
.TP
.B \-\-sysconfdir PATH
Directory in which ceph configuration files are found (default \fB/etc/ceph\fP).
.UNINDENT
.INDENT 0.0
.TP
.B \-\-cluster
Provide name of the ceph cluster in which the OSD is being prepared.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-cluster\-uuid
Provide uuid of the ceph cluster in which the OSD is being prepared.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-fs\-type
Provide the filesytem type for the OSD. e.g. \fBxfs/ext4/btrfs\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-osd\-uuid
Unique OSD uuid to assign to the disk.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-journal\-uuid
Unique uuid to assign to the journal.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-zap\-disk
Destroy the partition table and content of a disk.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-data\-dir
Verify that \fB[data\-path]\fP is of a directory.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-data\-dev
Verify that \fB[data\-path]\fP is of a block device.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-journal\-file
Verify that journal is a file.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-journal\-dev
Verify that journal is a block device.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-dmcrypt
Encrypt \fB[data\-path]\fP and/or journal devices with \fBdm\-crypt\fP\&.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-dmcrypt\-key\-dir
Directory where \fBdm\-crypt\fP keys are stored.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-activate\-key
Use when a copy of \fB/var/lib/ceph/bootstrap\-osd/{cluster}.keyring\fP isn\(aqt
present in the OSD node. Suffix the option by the path to the keyring.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-mark\-init
Provide init system to manage the OSD directory.
.UNINDENT
.SH AVAILABILITY
.sp
\fBceph\-disk\fP is a part of Ceph, a massively scalable, open-source, distributed storage system. Please refer to
the Ceph documentation at \fI\%http://ceph.com/docs\fP for more information.
.SH SEE ALSO
.sp
\fBceph\-osd\fP(8),
\fBceph\-deploy\fP(8)
.SH COPYRIGHT
2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons BY-SA
.\" Generated by docutils manpage writer.
.