1CEPH-VOLUME(8)                       Ceph                       CEPH-VOLUME(8)
2
3
4

NAME

6       ceph-volume - Ceph OSD deployment and inspection tool
7

SYNOPSIS

9       ceph-volume [-h] [--cluster CLUSTER] [--log-level LOG_LEVEL]
10         [--log-path LOG_PATH]
11
12       ceph-volume inventory
13
14       ceph-volume lvm [ trigger | create | activate | prepare
15       zap | list | batch]
16
17       ceph-volume simple [ trigger | scan | activate ]
18
19

DESCRIPTION

21       ceph-volume  is  a  single  purpose command line tool to deploy logical
22       volumes as OSDs, trying to maintain a similar  API  to  ceph-disk  when
23       preparing, activating, and creating OSDs.
24
25       It  deviates  from  ceph-disk by not interacting or relying on the udev
26       rules that come installed for Ceph. These rules allow automatic  detec‐
27       tion of previously setup devices that are in turn fed into ceph-disk to
28       activate them.
29

COMMANDS

31   inventory
32       This subcommand provides  information  about  a  host's  physical  disc
33       inventory  and  reports metadata about these discs. Among this metadata
34       one can find disc specific data items (like model, size, rotational  or
35       solid  state)  as  well  as data items specific to ceph using a device,
36       such as if it is available for use with ceph or if logical volumes  are
37       present.
38
39       Examples:
40
41          ceph-volume inventory
42          ceph-volume inventory /dev/sda
43          ceph-volume inventory --format json-pretty
44
45       Optional arguments:
46
47       · [-h, --help]          show the help message and exit
48
49       ·
50
51         [--format] report format, valid values are plain (default),
52                json and json-pretty
53
54   lvm
55       By  making  use  of  LVM tags, the lvm sub-command is able to store and
56       later re-discover and query devices associated with OSDs so  that  they
57       can later activated.
58
59       Subcommands:
60
61       batch  Creates  OSDs  from a list of devices using a filestore or blue‐
62       store (default) setup. It will create all necessary volume  groups  and
63       logical volumes required to have a working OSD.
64
65       Example usage with three devices:
66
67          ceph-volume lvm batch --bluestore /dev/sda /dev/sdb /dev/sdc
68
69       Optional arguments:
70
71       · [-h, --help]          show the help message and exit
72
73       · [--bluestore]         Use the bluestore objectstore (default)
74
75       · [--filestore]         Use the filestore objectstore
76
77       · [--yes]                Skip  the report and prompt to continue provi‐
78         sioning
79
80       · [--prepare]           Only prepare OSDs, do not activate
81
82       · [--dmcrypt]            Enable  encryption  for  the  underlying   OSD
83         devices
84
85       · [--crush-device-class]  Define a CRUSH device class to assign the OSD
86         to
87
88       · [--no-systemd]         Do not enable or create any systemd units
89
90       ·
91
92         [--report] Report what the potential outcome would be for the
93                current input (requires devices to be passed in)
94
95       ·
96
97         [--format] Output format when reporting (used along with
98                --report), can be one of 'pretty' (default) or 'json'
99
100       ·
101
102         [--block-db-size]  Set  (or  override)  the   bluestore_block_db_size
103         value,
104                in bytes
105
106       · [--journal-size]        Override  the  "osd_journal_size"  value,  in
107         megabytes
108
109       Required positional arguments:
110
111       ·
112
113         <DEVICE> Full path to a raw device, like /dev/sda. Multiple
114                <DEVICE> paths can be passed in.
115
116       activate Enables a systemd unit that persists the OSD ID and  its  UUID
117       (also  called  fsid  in  Ceph  CLI  tools), so that at boot time it can
118       understand what OSD is enabled and needs to be mounted.
119
120       Usage:
121
122          ceph-volume lvm activate --bluestore <osd id> <osd fsid>
123
124       Optional Arguments:
125
126       · [-h, --help]  show the help message and exit
127
128       · [--auto-detect-objectstore] Automatically detect  the  objecstore  by
129         inspecting the OSD
130
131       · [--bluestore] bluestore objectstore (default)
132
133       · [--filestore] filestore objectstore
134
135       · [--all] Activate all OSDs found in the system
136
137       · [--no-systemd]  Skip creating and enabling systemd units and starting
138         of OSD services
139
140       Multiple OSDs can be activated at once by using the (idempotent)  --all
141       flag:
142
143          ceph-volume lvm activate --all
144
145       prepare  Prepares  a  logical  volume  to be used as an OSD and journal
146       using a filestore or bluestore (default) setup. It will not  create  or
147       modify the logical volumes except for adding extra metadata.
148
149       Usage:
150
151          ceph-volume lvm prepare --filestore --data <data lv> --journal <journal device>
152
153       Optional arguments:
154
155       · [-h, --help]          show the help message and exit
156
157       · [--journal JOURNAL]   A logical group name, path to a logical volume,
158         or path to a device
159
160       · [--bluestore]         Use the bluestore objectstore (default)
161
162       · [--block.wal]         Path to a bluestore block.wal logical volume or
163         partition
164
165       · [--block.db]           Path to a bluestore block.db logical volume or
166         partition
167
168       · [--filestore]         Use the filestore objectstore
169
170       · [--dmcrypt]            Enable  encryption  for  the  underlying   OSD
171         devices
172
173       · [--osd-id OSD_ID]     Reuse an existing OSD id
174
175       · [--osd-fsid OSD_FSID] Reuse an existing OSD fsid
176
177       · [--crush-device-class]  Define a CRUSH device class to assign the OSD
178         to
179
180       Required arguments:
181
182       ·
183
184         --data A logical group name or a path to a logical volume
185
186       For encrypting an OSD, the --dmcrypt flag must be added when  preparing
187       (also supported in the create sub-command).
188
189       create  Wraps the two-step process to provision a new osd (calling pre‐
190       pare first and then activate) into a single one. The reason  to  prefer
191       prepare  and  then  activate  is to gradually introduce new OSDs into a
192       cluster, and avoiding large amounts of data being rebalanced.
193
194       The single-call process unifies exactly what prepare and  activate  do,
195       with  the  convenience of doing it all at once. Flags and general usage
196       are equivalent to those of the prepare and activate subcommand.
197
198       trigger This subcommand is not meant to be used  directly,  and  it  is
199       used by systemd so that it proxies input to ceph-volume lvm activate by
200       parsing the input from systemd, detecting the UUID  and  ID  associated
201       with an OSD.
202
203       Usage:
204
205          ceph-volume lvm trigger <SYSTEMD-DATA>
206
207       The systemd "data" is expected to be in the format of:
208
209          <OSD ID>-<OSD UUID>
210
211       The  lvs associated with the OSD need to have been prepared previously,
212       so that all needed tags and metadata exist.
213
214       Positional arguments:
215
216       · <SYSTEMD_DATA>  Data from a systemd unit containing ID  and  UUID  of
217         the OSD.
218
219       list  List devices or logical volumes associated with Ceph. An associa‐
220       tion is determined if a device has information relating to an OSD. This
221       is verified by querying LVM's metadata and correlating it with devices.
222
223       The  lvs  associated with the OSD need to have been prepared previously
224       by ceph-volume so that all needed tags and metadata exist.
225
226       Usage:
227
228          ceph-volume lvm list
229
230       List a particular device, reporting all metadata about it:
231
232          ceph-volume lvm list /dev/sda1
233
234       List a logical volume, along with all its  metadata  (vg  is  a  volume
235       group, and lv the logical volume name):
236
237          ceph-volume lvm list {vg/lv}
238
239       Positional arguments:
240
241       · <DEVICE>    Either   in  the  form  of  vg/lv  for  logical  volumes,
242         /path/to/sda1 or /path/to/sda for regular devices.
243
244       zap Zaps the given logical volume or partition. If given a  path  to  a
245       logical  volume  it  must  be  in  the format of vg/lv. Any filesystems
246       present on the given lv or partition will be removed and all data  will
247       be purged.
248
249       However, the lv or partition will be kept intact.
250
251       Usage, for logical volumes:
252
253          ceph-volume lvm zap {vg/lv}
254
255       Usage, for logical partitions:
256
257          ceph-volume lvm zap /dev/sdc1
258
259       For  full removal of the device use the --destroy flag (allowed for all
260       device types):
261
262          ceph-volume lvm zap --destroy /dev/sdc1
263
264       Multiple devices can be removed by specifying the OSD ID and/or the OSD
265       FSID:
266
267          ceph-volume lvm zap --destroy --osd-id 1
268          ceph-volume lvm zap --destroy --osd-id 1 --osd-fsid C9605912-8395-4D76-AFC0-7DFDAC315D59
269
270       Positional arguments:
271
272       · <DEVICE>    Either   in  the  form  of  vg/lv  for  logical  volumes,
273         /path/to/sda1 or /path/to/sda for regular devices.
274
275   simple
276       Scan legacy OSD directories or data devices that may have been  created
277       by ceph-disk, or manually.
278
279       Subcommands:
280
281       activate  Enables  a systemd unit that persists the OSD ID and its UUID
282       (also called fsid in Ceph CLI tools), so  that  at  boot  time  it  can
283       understand  what  OSD is enabled and needs to be mounted, while reading
284       information that was previously created and persisted at /etc/ceph/osd/
285       in JSON format.
286
287       Usage:
288
289          ceph-volume simple activate --bluestore <osd id> <osd fsid>
290
291       Optional Arguments:
292
293       · [-h, --help]  show the help message and exit
294
295       · [--bluestore] bluestore objectstore (default)
296
297       · [--filestore] filestore objectstore
298
299       Note: It requires a matching JSON file with the following format:
300
301          /etc/ceph/osd/<osd id>-<osd fsid>.json
302
303       scan Scan a running OSD or data device for an OSD for metadata that can
304       later be used to activate and manage the OSD with ceph-volume. The scan
305       method  will create a JSON file with the required information plus any‐
306       thing found in the OSD directory as well.
307
308       Optionally, the JSON blob can be sent to stdout for further inspection.
309
310       Usage on all running OSDs:
311
312          ceph-voume simple scan
313
314       Usage on data devices:
315
316          ceph-volume simple scan <data device>
317
318       Running OSD directories:
319
320          ceph-volume simple scan <path to osd dir>
321
322       Optional arguments:
323
324       · [-h, --help]          show the help message and exit
325
326       · [--stdout]            Send the JSON blob to stdout
327
328       · [--force]             If the JSON file exists at  destination,  over‐
329         write it
330
331       Optional Positional arguments:
332
333       · <DATA DEVICE or OSD DIR>  Actual data partition or a path to the run‐
334         ning OSD
335
336       trigger This subcommand is not meant to be used  directly,  and  it  is
337       used by systemd so that it proxies input to ceph-volume simple activate
338       by parsing the input from systemd, detecting the UUID and ID associated
339       with an OSD.
340
341       Usage:
342
343          ceph-volume simple trigger <SYSTEMD-DATA>
344
345       The systemd "data" is expected to be in the format of:
346
347          <OSD ID>-<OSD UUID>
348
349       The  JSON file associated with the OSD need to have been persisted pre‐
350       viously by a scan (or manually), so that all  needed  metadata  can  be
351       used.
352
353       Positional arguments:
354
355       · <SYSTEMD_DATA>   Data  from  a systemd unit containing ID and UUID of
356         the OSD.
357

AVAILABILITY

359       ceph-volume is part of Ceph, a massively  scalable,  open-source,  dis‐
360       tributed   storage   system.  Please  refer  to  the  documentation  at
361       http://docs.ceph.com/ for more information.
362

SEE ALSO

364       ceph-osd(8), ceph-disk(8),
365
367       2010-2014, Inktank Storage, Inc. and contributors. Licensed under  Cre‐
368       ative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)
369
370
371
372
373dev                              Apr 14, 2019                   CEPH-VOLUME(8)
Impressum