]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- |
2 | // vim: ts=8 sw=2 smarttab | |
3 | /* | |
4 | * Ceph - scalable distributed file system | |
5 | * | |
6 | * Copyright (C) 2013 Inktank Storage, Inc. | |
7 | * Copyright (C) 2013,2014 Cloudwatt <libre.licensing@cloudwatt.com> | |
8 | * | |
9 | * Author: Loic Dachary <loic@dachary.org> | |
10 | * | |
11 | * This is free software; you can redistribute it and/or | |
12 | * modify it under the terms of the GNU Lesser General Public | |
13 | * License version 2.1, as published by the Free Software | |
14 | * Foundation. See file COPYING. | |
15 | * | |
16 | */ | |
17 | ||
18 | /* no guard; may be included multiple times */ | |
19 | ||
20 | /* | |
21 | * Define commands that are reported by the monitor's | |
22 | * "get_command_descriptions" command, and parsed by the Python | |
23 | * frontend 'ceph' (and perhaps by other frontends, such as a RESTful | |
24 | * server). The format is: | |
25 | * | |
26 | * COMMAND(signature, helpstring, modulename, req perms, availability) | |
27 | * where: | |
28 | * signature: describes the command and its parameters (more below) | |
29 | * helpstring: displays in CLI help, API help (nice if it refers to | |
30 | * parameter names from signature, 40-a few hundred chars) | |
31 | * modulename: the monitor module or daemon this applies to: | |
31f18b77 | 32 | * mds, osd, pg (osd), mon, auth, log, config-key, mgr |
7c673cae FG |
33 | * req perms: required permission in that modulename space to execute command |
34 | * this also controls what type of REST command is accepted | |
7c673cae FG |
35 | * |
36 | * The commands describe themselves completely enough for the separate | |
37 | * frontend(s) to be able to accept user input and validate it against | |
38 | * the command descriptions, and generate a JSON object that contains | |
39 | * key:value mappings of parameter names to validated parameter values. | |
40 | * | |
41 | * 'signature' is a space-separated list of individual command descriptors; | |
42 | * each descriptor is either a literal string, which can contain no spaces or | |
43 | * '=' signs (for instance, in "pg stat", both "pg" and "stat" are literal | |
44 | * strings representing one descriptor each), or a list of key=val[,key=val...] | |
45 | * which also includes no spaces. | |
46 | * | |
47 | * The key=val form describes a non-literal parameter. Each will have at | |
48 | * least a name= and type=, and each type can have its own type-specific | |
49 | * parameters. The parser is the arbiter of these types and their | |
50 | * interpretation. A few more non-type-specific key=val pairs exist: | |
51 | * | |
52 | * req=false marks an optional parameter (default for req is 'true') | |
53 | * n=<n> is a repeat count for how many of this argument must be supplied. | |
54 | * n=1 is the default. | |
55 | * n=N is a special case that means "1 or more". | |
56 | * | |
57 | * A perhaps-incomplete list of types: | |
58 | * | |
59 | * CephInt: Optional: range=min[|max] | |
60 | * CephFloat: Optional range | |
61 | * CephString: optional badchars | |
62 | * CephSocketpath: validation involves "is it S_ISSOCK" | |
63 | * CephIPAddr: v4 or v6 addr with optional port, syntax validated | |
64 | * CephEntityAddr: CephIPAddr + optional '/nonce' | |
65 | * CephPoolname: Plainold string | |
66 | * CephObjectname: Another plainold string | |
67 | * CephPgid: n.xxx where n is an int > 0, xxx is a hex number > 0 | |
68 | * CephName: daemon name, '*' or '<type>.<id>' (id must be int for type osd) | |
69 | * CephOsdName: osd name, '*' or '<id> or 'osd.<id>' (id must be int) | |
70 | * CephChoices: strings="foo|bar" means this param can be either | |
71 | * CephFilepath: openable file | |
72 | * CephFragment: cephfs 'fragID': val/bits, val in hex 0xnnn, bits in dec | |
73 | * CephUUID: uuid in text matching Python uuid.UUID() | |
74 | * CephPrefix: special type assigned to literals | |
75 | * | |
76 | * Example: | |
77 | * | |
78 | * COMMAND("auth add " \ | |
79 | * "name=entity,type=CephString " \ | |
80 | * "name=caps,type=CephString,n=N,req=false", \ | |
81 | * "add auth info for <name> from input file, or random key " \ | |
82 | * "if no input given, and/or any caps specified in the command") | |
83 | * | |
84 | * defines a command "auth add" that takes a required argument "entity" | |
85 | * of type "CephString", and from 1 to N arguments named "caps" of type | |
86 | * CephString, at least one of which is required. The front end will | |
87 | * validate user input against this description. Let's say the user | |
88 | * enters auth add client.admin 'mon rwx' 'osd *'. The result will be a | |
89 | * JSON object like {"prefix":"auth add", "entity":"client.admin", | |
90 | * "caps":["mon rwx", "osd *"]}. | |
91 | * Note that | |
92 | * - string literals are accumulated into 'prefix' | |
93 | * - n=1 descriptors are given normal string or int object values | |
94 | * - n=N descriptors are given array values | |
95 | * | |
96 | * NOTE: be careful with spaces. Each descriptor must be separated by | |
97 | * one space, no other characters, so if you split lines as above, be | |
98 | * sure to close and reopen the quotes, and be careful to include the ' | |
99 | * separating spaces in the quoted string. | |
100 | * | |
101 | * The monitor marshals this JSON into a std::map<string, cmd_vartype> | |
102 | * where cmd_vartype is a boost::variant type-enforcing discriminated | |
103 | * type, so the monitor is expected to know the type of each argument. | |
104 | * See cmdparse.cc/h for more details. | |
105 | * | |
106 | * The flag parameter for COMMAND_WITH_FLAGS macro must be passed using | |
107 | * FLAG(f), where 'f' may be one of the following: | |
108 | * | |
109 | * NONE - no flag assigned | |
110 | * NOFORWARD - command may not be forwarded | |
111 | * OBSOLETE - command is considered obsolete | |
112 | * DEPRECATED - command is considered deprecated | |
113 | * MGR - command goes to ceph-mgr (for luminous+) | |
11fdf7f2 TL |
114 | * POLL - command is intended to be called periodically by the |
115 | * client (see iostat) | |
116 | * HIDDEN - command is hidden (no reported by help etc) | |
7c673cae FG |
117 | * |
118 | * A command should always be first considered DEPRECATED before being | |
119 | * considered OBSOLETE, giving due consideration to users and conforming | |
120 | * to any guidelines regarding deprecating commands. | |
121 | */ | |
122 | ||
7c673cae | 123 | COMMAND("pg map name=pgid,type=CephPgid", "show mapping of pg to osds", \ |
11fdf7f2 TL |
124 | "pg", "r") |
125 | COMMAND("pg repeer name=pgid,type=CephPgid", "force a PG to repeer", | |
126 | "osd", "rw") | |
31f18b77 FG |
127 | COMMAND("osd last-stat-seq name=id,type=CephOsdName", \ |
128 | "get the last pg stats sequence number reported for this osd", \ | |
11fdf7f2 | 129 | "osd", "r") |
7c673cae FG |
130 | |
131 | /* | |
132 | * auth commands AuthMonitor.cc | |
133 | */ | |
134 | ||
135 | COMMAND("auth export name=entity,type=CephString,req=false", \ | |
136 | "write keyring for requested entity, or master keyring if none given", \ | |
11fdf7f2 | 137 | "auth", "rx") |
7c673cae | 138 | COMMAND("auth get name=entity,type=CephString", \ |
11fdf7f2 | 139 | "write keyring file with requested key", "auth", "rx") |
7c673cae | 140 | COMMAND("auth get-key name=entity,type=CephString", "display requested key", \ |
11fdf7f2 | 141 | "auth", "rx") |
7c673cae | 142 | COMMAND("auth print-key name=entity,type=CephString", "display requested key", \ |
11fdf7f2 | 143 | "auth", "rx") |
7c673cae | 144 | COMMAND("auth print_key name=entity,type=CephString", "display requested key", \ |
11fdf7f2 TL |
145 | "auth", "rx") |
146 | COMMAND_WITH_FLAG("auth list", "list authentication state", "auth", "rx", | |
c07f9fc5 | 147 | FLAG(DEPRECATED)) |
11fdf7f2 | 148 | COMMAND("auth ls", "list authentication state", "auth", "rx") |
7c673cae | 149 | COMMAND("auth import", "auth import: read keyring file from -i <file>", \ |
11fdf7f2 | 150 | "auth", "rwx") |
7c673cae FG |
151 | COMMAND("auth add " \ |
152 | "name=entity,type=CephString " \ | |
153 | "name=caps,type=CephString,n=N,req=false", \ | |
154 | "add auth info for <entity> from input file, or random key if no " \ | |
155 | "input is given, and/or any caps specified in the command", | |
11fdf7f2 | 156 | "auth", "rwx") |
7c673cae FG |
157 | COMMAND("auth get-or-create-key " \ |
158 | "name=entity,type=CephString " \ | |
159 | "name=caps,type=CephString,n=N,req=false", \ | |
160 | "get, or add, key for <name> from system/caps pairs specified in the command. If key already exists, any given caps must match the existing caps for that key.", \ | |
11fdf7f2 | 161 | "auth", "rwx") |
7c673cae FG |
162 | COMMAND("auth get-or-create " \ |
163 | "name=entity,type=CephString " \ | |
164 | "name=caps,type=CephString,n=N,req=false", \ | |
165 | "add auth info for <entity> from input file, or random key if no input given, and/or any caps specified in the command", \ | |
11fdf7f2 | 166 | "auth", "rwx") |
d2e6a577 FG |
167 | COMMAND("fs authorize " \ |
168 | "name=filesystem,type=CephString " \ | |
169 | "name=entity,type=CephString " \ | |
170 | "name=caps,type=CephString,n=N", \ | |
171 | "add auth for <entity> to access file system <filesystem> based on following directory and permissions pairs", \ | |
11fdf7f2 | 172 | "auth", "rwx") |
7c673cae FG |
173 | COMMAND("auth caps " \ |
174 | "name=entity,type=CephString " \ | |
175 | "name=caps,type=CephString,n=N", \ | |
176 | "update caps for <name> from caps specified in the command", \ | |
11fdf7f2 TL |
177 | "auth", "rwx") |
178 | COMMAND_WITH_FLAG("auth del " \ | |
7c673cae FG |
179 | "name=entity,type=CephString", \ |
180 | "delete all caps for <name>", \ | |
11fdf7f2 TL |
181 | "auth", "rwx", \ |
182 | FLAG(DEPRECATED)) | |
7c673cae FG |
183 | COMMAND("auth rm " \ |
184 | "name=entity,type=CephString", \ | |
185 | "remove all caps for <name>", \ | |
11fdf7f2 | 186 | "auth", "rwx") |
7c673cae FG |
187 | |
188 | /* | |
189 | * Monitor commands (Monitor.cc) | |
190 | */ | |
11fdf7f2 TL |
191 | COMMAND_WITH_FLAG("compact", "cause compaction of monitor's leveldb/rocksdb storage", \ |
192 | "mon", "rw", \ | |
7c673cae FG |
193 | FLAG(NOFORWARD)|FLAG(DEPRECATED)) |
194 | COMMAND_WITH_FLAG("scrub", "scrub the monitor stores", \ | |
11fdf7f2 | 195 | "mon", "rw", \ |
7c673cae | 196 | FLAG(DEPRECATED)) |
11fdf7f2 | 197 | COMMAND("fsid", "show cluster FSID/UUID", "mon", "r") |
7c673cae | 198 | COMMAND("log name=logtext,type=CephString,n=N", \ |
11fdf7f2 | 199 | "log supplied text to the monitor log", "mon", "rw") |
224ce89b WB |
200 | COMMAND("log last " |
201 | "name=num,type=CephInt,range=1,req=false " | |
202 | "name=level,type=CephChoices,strings=debug|info|sec|warn|error,req=false " | |
203 | "name=channel,type=CephChoices,strings=*|cluster|audit,req=false", \ | |
31f18b77 | 204 | "print last few lines of the cluster log", \ |
11fdf7f2 | 205 | "mon", "r") |
7c673cae FG |
206 | COMMAND_WITH_FLAG("injectargs " \ |
207 | "name=injected_args,type=CephString,n=N", \ | |
11fdf7f2 | 208 | "inject config arguments into monitor", "mon", "rw", |
7c673cae | 209 | FLAG(NOFORWARD)) |
11fdf7f2 TL |
210 | |
211 | COMMAND("status", "show cluster status", "mon", "r") | |
7c673cae | 212 | COMMAND("health name=detail,type=CephChoices,strings=detail,req=false", \ |
11fdf7f2 TL |
213 | "show cluster health", "mon", "r") |
214 | COMMAND("time-sync-status", "show time sync status", "mon", "r") | |
7c673cae | 215 | COMMAND("df name=detail,type=CephChoices,strings=detail,req=false", \ |
11fdf7f2 | 216 | "show cluster free space stats", "mon", "r") |
7c673cae FG |
217 | COMMAND("report name=tags,type=CephString,n=N,req=false", \ |
218 | "report full status of cluster, optional title tag strings", \ | |
11fdf7f2 | 219 | "mon", "r") |
31f18b77 | 220 | COMMAND("features", "report of connected features", \ |
11fdf7f2 | 221 | "mon", "r") |
7c673cae | 222 | COMMAND("quorum_status", "report status of monitor quorum", \ |
11fdf7f2 TL |
223 | "mon", "r") |
224 | COMMAND("mon ok-to-stop " \ | |
225 | "name=ids,type=CephString,n=N", | |
226 | "check whether mon(s) can be safely stopped without reducing immediate " \ | |
227 | "availability", | |
228 | "mon", "r") | |
229 | COMMAND("mon ok-to-add-offline", | |
230 | "check whether adding a mon and not starting it would break quorum", | |
231 | "mon", "r") | |
232 | COMMAND("mon ok-to-rm " \ | |
233 | "name=id,type=CephString", | |
234 | "check whether removing the specified mon would break quorum", | |
235 | "mon", "r") | |
7c673cae | 236 | |
11fdf7f2 | 237 | COMMAND_WITH_FLAG("mon_status", "report status of monitors", "mon", "r", |
7c673cae FG |
238 | FLAG(NOFORWARD)) |
239 | COMMAND_WITH_FLAG("sync force " \ | |
11fdf7f2 TL |
240 | "name=yes_i_really_mean_it,type=CephBool,req=false " \ |
241 | "name=i_know_what_i_am_doing,type=CephBool,req=false", \ | |
7c673cae | 242 | "force sync of and clear monitor store", \ |
11fdf7f2 | 243 | "mon", "rw", \ |
7c673cae FG |
244 | FLAG(NOFORWARD)|FLAG(DEPRECATED)) |
245 | COMMAND_WITH_FLAG("heap " \ | |
246 | "name=heapcmd,type=CephChoices,strings=dump|start_profiler|stop_profiler|release|stats", \ | |
247 | "show heap usage info (available only if compiled with tcmalloc)", \ | |
11fdf7f2 | 248 | "mon", "rw", FLAG(NOFORWARD)) |
7c673cae | 249 | COMMAND("quorum name=quorumcmd,type=CephChoices,strings=enter|exit,n=1", \ |
11fdf7f2 | 250 | "enter or exit quorum", "mon", "rw") |
7c673cae FG |
251 | COMMAND("tell " \ |
252 | "name=target,type=CephName " \ | |
253 | "name=args,type=CephString,n=N", \ | |
11fdf7f2 TL |
254 | "send a command to a specific daemon", "mon", "rw") |
255 | COMMAND_WITH_FLAG("version", "show mon daemon version", "mon", "r", | |
7c673cae FG |
256 | FLAG(NOFORWARD)) |
257 | ||
258 | COMMAND("node ls " \ | |
11fdf7f2 TL |
259 | "name=type,type=CephChoices,strings=all|osd|mon|mds|mgr,req=false", |
260 | "list all nodes in cluster [type]", "mon", "r") | |
7c673cae FG |
261 | /* |
262 | * Monitor-specific commands under module 'mon' | |
263 | */ | |
264 | COMMAND_WITH_FLAG("mon compact", \ | |
11fdf7f2 TL |
265 | "cause compaction of monitor's leveldb/rocksdb storage", \ |
266 | "mon", "rw", \ | |
7c673cae FG |
267 | FLAG(NOFORWARD)) |
268 | COMMAND_WITH_FLAG("mon scrub", | |
269 | "scrub the monitor stores", \ | |
11fdf7f2 | 270 | "mon", "rw", \ |
7c673cae FG |
271 | FLAG(NONE)) |
272 | COMMAND_WITH_FLAG("mon sync force " \ | |
11fdf7f2 TL |
273 | "name=yes_i_really_mean_it,type=CephBool,req=false " \ |
274 | "name=i_know_what_i_am_doing,type=CephBool,req=false", \ | |
7c673cae | 275 | "force sync of and clear monitor store", \ |
11fdf7f2 | 276 | "mon", "rw", \ |
7c673cae FG |
277 | FLAG(NOFORWARD)) |
278 | COMMAND("mon metadata name=id,type=CephString,req=false", | |
279 | "fetch metadata for mon <id>", | |
11fdf7f2 | 280 | "mon", "r") |
31f18b77 FG |
281 | COMMAND("mon count-metadata name=property,type=CephString", |
282 | "count mons by metadata field property", | |
11fdf7f2 | 283 | "mon", "r") |
31f18b77 FG |
284 | COMMAND("mon versions", |
285 | "check running versions of monitors", | |
11fdf7f2 | 286 | "mon", "r") |
c07f9fc5 FG |
287 | COMMAND("versions", |
288 | "check running versions of ceph daemons", | |
11fdf7f2 | 289 | "mon", "r") |
c07f9fc5 | 290 | |
7c673cae FG |
291 | |
292 | ||
293 | /* | |
294 | * MDS commands (MDSMonitor.cc) | |
295 | */ | |
296 | ||
11fdf7f2 | 297 | COMMAND_WITH_FLAG("mds stat", "show MDS status", "mds", "r", FLAG(HIDDEN)) |
7c673cae FG |
298 | COMMAND_WITH_FLAG("mds dump " |
299 | "name=epoch,type=CephInt,req=false,range=0", \ | |
300 | "dump legacy MDS cluster info, optionally from epoch", | |
11fdf7f2 | 301 | "mds", "r", FLAG(OBSOLETE)) |
7c673cae FG |
302 | COMMAND("fs dump " |
303 | "name=epoch,type=CephInt,req=false,range=0", \ | |
11fdf7f2 | 304 | "dump all CephFS status, optionally from epoch", "mds", "r") |
7c673cae FG |
305 | COMMAND_WITH_FLAG("mds getmap " \ |
306 | "name=epoch,type=CephInt,req=false,range=0", \ | |
11fdf7f2 | 307 | "get MDS map, optionally from epoch", "mds", "r", FLAG(OBSOLETE)) |
7c673cae | 308 | COMMAND("mds metadata name=who,type=CephString,req=false", |
11fdf7f2 TL |
309 | "fetch metadata for mds <role>", |
310 | "mds", "r") | |
31f18b77 FG |
311 | COMMAND("mds count-metadata name=property,type=CephString", |
312 | "count MDSs by metadata field property", | |
11fdf7f2 | 313 | "mds", "r") |
31f18b77 FG |
314 | COMMAND("mds versions", |
315 | "check running versions of MDSs", | |
11fdf7f2 | 316 | "mds", "r") |
7c673cae FG |
317 | COMMAND_WITH_FLAG("mds tell " \ |
318 | "name=who,type=CephString " \ | |
319 | "name=args,type=CephString,n=N", \ | |
11fdf7f2 | 320 | "send command to particular mds", "mds", "rw", FLAG(OBSOLETE)) |
7c673cae | 321 | COMMAND("mds compat show", "show mds compatibility settings", \ |
11fdf7f2 TL |
322 | "mds", "r") |
323 | COMMAND_WITH_FLAG("mds stop name=role,type=CephString", "stop mds", \ | |
324 | "mds", "rw", FLAG(OBSOLETE)) | |
325 | COMMAND_WITH_FLAG("mds deactivate name=role,type=CephString", | |
224ce89b | 326 | "clean up specified MDS rank (use with `set max_mds` to shrink cluster)", \ |
11fdf7f2 TL |
327 | "mds", "rw", FLAG(OBSOLETE)) |
328 | COMMAND("mds ok-to-stop name=ids,type=CephString,n=N", | |
329 | "check whether stopping the specified MDS would reduce immediate availability", | |
330 | "mds", "r") | |
7c673cae FG |
331 | COMMAND_WITH_FLAG("mds set_max_mds " \ |
332 | "name=maxmds,type=CephInt,range=0", \ | |
11fdf7f2 | 333 | "set max MDS index", "mds", "rw", FLAG(OBSOLETE)) |
7c673cae | 334 | COMMAND_WITH_FLAG("mds set " \ |
11fdf7f2 TL |
335 | "name=var,type=CephChoices,strings=max_mds|max_file_size|inline_data|" |
336 | "allow_new_snaps|allow_multimds|allow_multimds_snaps|allow_dirfrags " \ | |
7c673cae | 337 | "name=val,type=CephString " \ |
11fdf7f2 TL |
338 | "name=yes_i_really_mean_it,type=CephBool,req=false", \ |
339 | "set mds parameter <var> to <val>", "mds", "rw", FLAG(OBSOLETE)) | |
340 | COMMAND_WITH_FLAG("mds freeze name=role_or_gid,type=CephString" | |
341 | " name=val,type=CephString", | |
342 | "freeze MDS yes/no", "mds", "rw", FLAG(HIDDEN)) | |
7c673cae FG |
343 | // arbitrary limit 0-20 below; worth standing on head to make it |
344 | // relate to actual state definitions? | |
345 | // #include "include/ceph_fs.h" | |
11fdf7f2 | 346 | COMMAND_WITH_FLAG("mds set_state " \ |
7c673cae FG |
347 | "name=gid,type=CephInt,range=0 " \ |
348 | "name=state,type=CephInt,range=0|20", \ | |
11fdf7f2 TL |
349 | "set mds state of <gid> to <numeric-state>", "mds", "rw", FLAG(HIDDEN)) |
350 | COMMAND("mds fail name=role_or_gid,type=CephString", \ | |
224ce89b | 351 | "Mark MDS failed: trigger a failover if a standby is available", |
11fdf7f2 TL |
352 | "mds", "rw") |
353 | COMMAND("mds repaired name=role,type=CephString", \ | |
354 | "mark a damaged MDS rank as no longer damaged", "mds", "rw") | |
7c673cae FG |
355 | COMMAND("mds rm " \ |
356 | "name=gid,type=CephInt,range=0", \ | |
11fdf7f2 TL |
357 | "remove nonactive mds", "mds", "rw") |
358 | COMMAND_WITH_FLAG("mds rmfailed name=role,type=CephString " \ | |
359 | "name=yes_i_really_mean_it,type=CephBool,req=false", \ | |
360 | "remove failed rank", "mds", "rw", FLAG(HIDDEN)) | |
361 | COMMAND_WITH_FLAG("mds cluster_down", "take MDS cluster down", "mds", "rw", FLAG(OBSOLETE)) | |
362 | COMMAND_WITH_FLAG("mds cluster_up", "bring MDS cluster up", "mds", "rw", FLAG(OBSOLETE)) | |
7c673cae FG |
363 | COMMAND("mds compat rm_compat " \ |
364 | "name=feature,type=CephInt,range=0", \ | |
11fdf7f2 | 365 | "remove compatible feature", "mds", "rw") |
7c673cae FG |
366 | COMMAND("mds compat rm_incompat " \ |
367 | "name=feature,type=CephInt,range=0", \ | |
11fdf7f2 | 368 | "remove incompatible feature", "mds", "rw") |
7c673cae FG |
369 | COMMAND_WITH_FLAG("mds add_data_pool " \ |
370 | "name=pool,type=CephString", \ | |
11fdf7f2 | 371 | "add data pool <pool>", "mds", "rw", FLAG(OBSOLETE)) |
7c673cae FG |
372 | COMMAND_WITH_FLAG("mds rm_data_pool " \ |
373 | "name=pool,type=CephString", \ | |
11fdf7f2 TL |
374 | "remove data pool <pool>", "mds", "rw", FLAG(OBSOLETE)) |
375 | COMMAND_WITH_FLAG("mds remove_data_pool " \ | |
376 | "name=pool,type=CephString", \ | |
377 | "remove data pool <pool>", "mds", "rw", FLAG(OBSOLETE)) | |
7c673cae FG |
378 | COMMAND_WITH_FLAG("mds newfs " \ |
379 | "name=metadata,type=CephInt,range=0 " \ | |
380 | "name=data,type=CephInt,range=0 " \ | |
11fdf7f2 | 381 | "name=yes_i_really_mean_it,type=CephBool,req=false", \ |
7c673cae | 382 | "make new filesystem using pools <metadata> and <data>", \ |
11fdf7f2 | 383 | "mds", "rw", FLAG(OBSOLETE)) |
7c673cae FG |
384 | COMMAND("fs new " \ |
385 | "name=fs_name,type=CephString " \ | |
386 | "name=metadata,type=CephString " \ | |
387 | "name=data,type=CephString " \ | |
11fdf7f2 TL |
388 | "name=force,type=CephBool,req=false " \ |
389 | "name=allow_dangerous_metadata_overlay,type=CephBool,req=false", \ | |
7c673cae | 390 | "make new filesystem using named pools <metadata> and <data>", \ |
11fdf7f2 TL |
391 | "fs", "rw") |
392 | COMMAND("fs fail " \ | |
393 | "name=fs_name,type=CephString ", \ | |
394 | "bring the file system down and all of its ranks", \ | |
395 | "fs", "rw") | |
7c673cae FG |
396 | COMMAND("fs rm " \ |
397 | "name=fs_name,type=CephString " \ | |
11fdf7f2 | 398 | "name=yes_i_really_mean_it,type=CephBool,req=false", \ |
7c673cae | 399 | "disable the named filesystem", \ |
11fdf7f2 | 400 | "fs", "rw") |
7c673cae FG |
401 | COMMAND("fs reset " \ |
402 | "name=fs_name,type=CephString " \ | |
11fdf7f2 | 403 | "name=yes_i_really_mean_it,type=CephBool,req=false", \ |
7c673cae | 404 | "disaster recovery only: reset to a single-MDS map", \ |
11fdf7f2 | 405 | "fs", "rw") |
7c673cae FG |
406 | COMMAND("fs ls ", \ |
407 | "list filesystems", \ | |
11fdf7f2 | 408 | "fs", "r") |
7c673cae FG |
409 | COMMAND("fs get name=fs_name,type=CephString", \ |
410 | "get info about one filesystem", \ | |
11fdf7f2 | 411 | "fs", "r") |
7c673cae FG |
412 | COMMAND("fs set " \ |
413 | "name=fs_name,type=CephString " \ | |
414 | "name=var,type=CephChoices,strings=max_mds|max_file_size" | |
11fdf7f2 TL |
415 | "|allow_new_snaps|inline_data|cluster_down|allow_dirfrags|balancer" \ |
416 | "|standby_count_wanted|session_timeout|session_autoclose" \ | |
417 | "|allow_standby_replay|down|joinable|min_compat_client " \ | |
7c673cae | 418 | "name=val,type=CephString " \ |
11fdf7f2 TL |
419 | "name=yes_i_really_mean_it,type=CephBool,req=false", \ |
420 | "set fs parameter <var> to <val>", "mds", "rw") | |
7c673cae FG |
421 | COMMAND("fs flag set name=flag_name,type=CephChoices,strings=enable_multiple " |
422 | "name=val,type=CephString " \ | |
11fdf7f2 | 423 | "name=yes_i_really_mean_it,type=CephBool,req=false", \ |
7c673cae | 424 | "Set a global CephFS flag", \ |
11fdf7f2 | 425 | "fs", "rw") |
7c673cae FG |
426 | COMMAND("fs add_data_pool name=fs_name,type=CephString " \ |
427 | "name=pool,type=CephString", \ | |
11fdf7f2 | 428 | "add data pool <pool>", "mds", "rw") |
7c673cae FG |
429 | COMMAND("fs rm_data_pool name=fs_name,type=CephString " \ |
430 | "name=pool,type=CephString", \ | |
11fdf7f2 | 431 | "remove data pool <pool>", "mds", "rw") |
7c673cae FG |
432 | COMMAND_WITH_FLAG("fs set_default name=fs_name,type=CephString", \ |
433 | "set the default to the named filesystem", \ | |
11fdf7f2 | 434 | "fs", "rw", \ |
7c673cae FG |
435 | FLAG(DEPRECATED)) |
436 | COMMAND("fs set-default name=fs_name,type=CephString", \ | |
437 | "set the default to the named filesystem", \ | |
11fdf7f2 | 438 | "fs", "rw") |
7c673cae FG |
439 | |
440 | /* | |
441 | * Monmap commands | |
442 | */ | |
443 | COMMAND("mon dump " \ | |
444 | "name=epoch,type=CephInt,range=0,req=false", \ | |
445 | "dump formatted monmap (optionally from epoch)", \ | |
11fdf7f2 TL |
446 | "mon", "r") |
447 | COMMAND("mon stat", "summarize monitor status", "mon", "r") | |
7c673cae FG |
448 | COMMAND("mon getmap " \ |
449 | "name=epoch,type=CephInt,range=0,req=false", \ | |
11fdf7f2 | 450 | "get monmap", "mon", "r") |
7c673cae FG |
451 | COMMAND("mon add " \ |
452 | "name=name,type=CephString " \ | |
453 | "name=addr,type=CephIPAddr", \ | |
11fdf7f2 | 454 | "add new monitor named <name> at <addr>", "mon", "rw") |
7c673cae FG |
455 | COMMAND("mon rm " \ |
456 | "name=name,type=CephString", \ | |
11fdf7f2 TL |
457 | "remove monitor named <name>", "mon", "rw") |
458 | COMMAND_WITH_FLAG("mon remove " \ | |
459 | "name=name,type=CephString", \ | |
460 | "remove monitor named <name>", "mon", "rw", \ | |
461 | FLAG(DEPRECATED)) | |
224ce89b | 462 | COMMAND("mon feature ls " \ |
7c673cae FG |
463 | "name=with_value,type=CephChoices,strings=--with-value,req=false", \ |
464 | "list available mon map features to be set/unset", \ | |
11fdf7f2 | 465 | "mon", "r") |
7c673cae FG |
466 | COMMAND("mon feature set " \ |
467 | "name=feature_name,type=CephString " \ | |
11fdf7f2 | 468 | "name=yes_i_really_mean_it,type=CephBool,req=false", \ |
7c673cae | 469 | "set provided feature on mon map", \ |
11fdf7f2 TL |
470 | "mon", "rw") |
471 | COMMAND("mon set-rank " \ | |
472 | "name=name,type=CephString " \ | |
473 | "name=rank,type=CephInt", | |
474 | "set the rank for the specified mon", | |
475 | "mon", "rw") | |
476 | COMMAND("mon set-addrs " \ | |
477 | "name=name,type=CephString " \ | |
478 | "name=addrs,type=CephString", | |
479 | "set the addrs (IPs and ports) a specific monitor binds to", | |
480 | "mon", "rw") | |
481 | COMMAND("mon enable-msgr2", | |
482 | "enable the msgr2 protocol on port 3300", | |
483 | "mon", "rw") | |
7c673cae FG |
484 | |
485 | /* | |
486 | * OSD commands | |
487 | */ | |
11fdf7f2 | 488 | COMMAND("osd stat", "print summary of OSD map", "osd", "r") |
7c673cae FG |
489 | COMMAND("osd dump " \ |
490 | "name=epoch,type=CephInt,range=0,req=false", | |
11fdf7f2 | 491 | "print summary of OSD map", "osd", "r") |
7c673cae | 492 | COMMAND("osd tree " \ |
31f18b77 | 493 | "name=epoch,type=CephInt,range=0,req=false " \ |
c07f9fc5 | 494 | "name=states,type=CephChoices,strings=up|down|in|out|destroyed,n=N,req=false", \ |
11fdf7f2 TL |
495 | "print OSD tree", "osd", "r") |
496 | COMMAND("osd tree-from " \ | |
497 | "name=epoch,type=CephInt,range=0,req=false " \ | |
498 | "name=bucket,type=CephString " \ | |
499 | "name=states,type=CephChoices,strings=up|down|in|out|destroyed,n=N,req=false", \ | |
500 | "print OSD tree in bucket", "osd", "r") | |
7c673cae FG |
501 | COMMAND("osd ls " \ |
502 | "name=epoch,type=CephInt,range=0,req=false", \ | |
11fdf7f2 | 503 | "show all OSD ids", "osd", "r") |
7c673cae FG |
504 | COMMAND("osd getmap " \ |
505 | "name=epoch,type=CephInt,range=0,req=false", \ | |
11fdf7f2 | 506 | "get OSD map", "osd", "r") |
7c673cae FG |
507 | COMMAND("osd getcrushmap " \ |
508 | "name=epoch,type=CephInt,range=0,req=false", \ | |
11fdf7f2 TL |
509 | "get CRUSH map", "osd", "r") |
510 | COMMAND("osd getmaxosd", "show largest OSD id", "osd", "r") | |
31f18b77 FG |
511 | COMMAND("osd ls-tree " \ |
512 | "name=epoch,type=CephInt,range=0,req=false " | |
513 | "name=name,type=CephString,req=true", \ | |
514 | "show OSD ids under bucket <name> in the CRUSH map", \ | |
11fdf7f2 | 515 | "osd", "r") |
7c673cae FG |
516 | COMMAND("osd find " \ |
517 | "name=id,type=CephOsdName", \ | |
518 | "find osd <id> in the CRUSH map and show its location", \ | |
11fdf7f2 | 519 | "osd", "r") |
7c673cae FG |
520 | COMMAND("osd metadata " \ |
521 | "name=id,type=CephOsdName,req=false", \ | |
522 | "fetch metadata for osd {id} (default all)", \ | |
11fdf7f2 | 523 | "osd", "r") |
31f18b77 FG |
524 | COMMAND("osd count-metadata name=property,type=CephString", |
525 | "count OSDs by metadata field property", | |
11fdf7f2 | 526 | "osd", "r") |
31f18b77 FG |
527 | COMMAND("osd versions", \ |
528 | "check running versions of OSDs", | |
11fdf7f2 TL |
529 | "osd", "r") |
530 | COMMAND("osd numa-status", | |
531 | "show NUMA status of OSDs", | |
532 | "osd", "r") | |
7c673cae FG |
533 | COMMAND("osd map " \ |
534 | "name=pool,type=CephPoolname " \ | |
535 | "name=object,type=CephObjectname " \ | |
536 | "name=nspace,type=CephString,req=false", \ | |
11fdf7f2 TL |
537 | "find pg for <object> in <pool> with [namespace]", "osd", "r") |
538 | COMMAND_WITH_FLAG("osd lspools", \ | |
539 | "list pools", "osd", "r", FLAG(DEPRECATED)) | |
540 | COMMAND_WITH_FLAG("osd crush rule list", "list crush rules", "osd", "r", | |
c07f9fc5 | 541 | FLAG(DEPRECATED)) |
11fdf7f2 | 542 | COMMAND("osd crush rule ls", "list crush rules", "osd", "r") |
b5b8bbf5 FG |
543 | COMMAND("osd crush rule ls-by-class " \ |
544 | "name=class,type=CephString,goodchars=[A-Za-z0-9-_.]", \ | |
545 | "list all crush rules that reference the same <class>", \ | |
11fdf7f2 | 546 | "osd", "r") |
7c673cae FG |
547 | COMMAND("osd crush rule dump " \ |
548 | "name=name,type=CephString,goodchars=[A-Za-z0-9-_.],req=false", \ | |
549 | "dump crush rule <name> (default all)", \ | |
11fdf7f2 | 550 | "osd", "r") |
7c673cae FG |
551 | COMMAND("osd crush dump", \ |
552 | "dump crush map", \ | |
11fdf7f2 | 553 | "osd", "r") |
31f18b77 FG |
554 | COMMAND("osd setcrushmap name=prior_version,type=CephInt,req=false", \ |
555 | "set crush map from input file", \ | |
11fdf7f2 | 556 | "osd", "rw") |
31f18b77 FG |
557 | COMMAND("osd crush set name=prior_version,type=CephInt,req=false", \ |
558 | "set crush map from input file", \ | |
11fdf7f2 | 559 | "osd", "rw") |
7c673cae FG |
560 | COMMAND("osd crush add-bucket " \ |
561 | "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \ | |
11fdf7f2 TL |
562 | "name=type,type=CephString " \ |
563 | "name=args,type=CephString,n=N,goodchars=[A-Za-z0-9-_.=],req=false", \ | |
564 | "add no-parent (probably root) crush bucket <name> of type <type> " \ | |
565 | "to location <args>", \ | |
566 | "osd", "rw") | |
7c673cae FG |
567 | COMMAND("osd crush rename-bucket " \ |
568 | "name=srcname,type=CephString,goodchars=[A-Za-z0-9-_.] " \ | |
569 | "name=dstname,type=CephString,goodchars=[A-Za-z0-9-_.]", \ | |
570 | "rename bucket <srcname> to <dstname>", \ | |
11fdf7f2 | 571 | "osd", "rw") |
7c673cae FG |
572 | COMMAND("osd crush set " \ |
573 | "name=id,type=CephOsdName " \ | |
574 | "name=weight,type=CephFloat,range=0.0 " \ | |
575 | "name=args,type=CephString,n=N,goodchars=[A-Za-z0-9-_.=]", \ | |
576 | "update crushmap position and weight for <name> to <weight> with location <args>", \ | |
11fdf7f2 | 577 | "osd", "rw") |
7c673cae FG |
578 | COMMAND("osd crush add " \ |
579 | "name=id,type=CephOsdName " \ | |
580 | "name=weight,type=CephFloat,range=0.0 " \ | |
581 | "name=args,type=CephString,n=N,goodchars=[A-Za-z0-9-_.=]", \ | |
582 | "add or update crushmap position and weight for <name> with <weight> and location <args>", \ | |
11fdf7f2 | 583 | "osd", "rw") |
3efd9988 FG |
584 | COMMAND("osd crush set-all-straw-buckets-to-straw2", |
585 | "convert all CRUSH current straw buckets to use the straw2 algorithm", | |
11fdf7f2 TL |
586 | "osd", "rw") |
587 | COMMAND("osd crush class create " \ | |
588 | "name=class,type=CephString,goodchars=[A-Za-z0-9-_]", \ | |
589 | "create crush device class <class>", \ | |
590 | "osd", "rw") | |
591 | COMMAND("osd crush class rm " \ | |
592 | "name=class,type=CephString,goodchars=[A-Za-z0-9-_]", \ | |
593 | "remove crush device class <class>", \ | |
594 | "osd", "rw") | |
7c673cae | 595 | COMMAND("osd crush set-device-class " \ |
224ce89b WB |
596 | "name=class,type=CephString " \ |
597 | "name=ids,type=CephString,n=N", \ | |
598 | "set the <class> of the osd(s) <id> [<id>...]," \ | |
11fdf7f2 TL |
599 | "or use <all|any> to set all.", \ |
600 | "osd", "rw") | |
c07f9fc5 FG |
601 | COMMAND("osd crush rm-device-class " \ |
602 | "name=ids,type=CephString,n=N", \ | |
603 | "remove class of the osd(s) <id> [<id>...]," \ | |
11fdf7f2 TL |
604 | "or use <all|any> to remove all.", \ |
605 | "osd", "rw") | |
35e4c445 FG |
606 | COMMAND("osd crush class rename " \ |
607 | "name=srcname,type=CephString,goodchars=[A-Za-z0-9-_] " \ | |
608 | "name=dstname,type=CephString,goodchars=[A-Za-z0-9-_]", \ | |
609 | "rename crush device class <srcname> to <dstname>", \ | |
11fdf7f2 | 610 | "osd", "rw") |
7c673cae FG |
611 | COMMAND("osd crush create-or-move " \ |
612 | "name=id,type=CephOsdName " \ | |
613 | "name=weight,type=CephFloat,range=0.0 " \ | |
614 | "name=args,type=CephString,n=N,goodchars=[A-Za-z0-9-_.=]", \ | |
615 | "create entry or move existing entry for <name> <weight> at/to location <args>", \ | |
11fdf7f2 | 616 | "osd", "rw") |
7c673cae FG |
617 | COMMAND("osd crush move " \ |
618 | "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \ | |
619 | "name=args,type=CephString,n=N,goodchars=[A-Za-z0-9-_.=]", \ | |
620 | "move existing entry for <name> to location <args>", \ | |
11fdf7f2 | 621 | "osd", "rw") |
31f18b77 FG |
622 | COMMAND("osd crush swap-bucket " \ |
623 | "name=source,type=CephString,goodchars=[A-Za-z0-9-_.] " \ | |
624 | "name=dest,type=CephString,goodchars=[A-Za-z0-9-_.] " \ | |
11fdf7f2 | 625 | "name=yes_i_really_mean_it,type=CephBool,req=false", \ |
31f18b77 | 626 | "swap existing bucket contents from (orphan) bucket <source> and <target>", \ |
11fdf7f2 | 627 | "osd", "rw") |
7c673cae FG |
628 | COMMAND("osd crush link " \ |
629 | "name=name,type=CephString " \ | |
630 | "name=args,type=CephString,n=N,goodchars=[A-Za-z0-9-_.=]", \ | |
631 | "link existing entry for <name> under location <args>", \ | |
11fdf7f2 | 632 | "osd", "rw") |
7c673cae FG |
633 | COMMAND("osd crush rm " \ |
634 | "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \ | |
635 | "name=ancestor,type=CephString,req=false,goodchars=[A-Za-z0-9-_.]", \ | |
636 | "remove <name> from crush map (everywhere, or just at <ancestor>)",\ | |
11fdf7f2 TL |
637 | "osd", "rw") |
638 | COMMAND_WITH_FLAG("osd crush remove " \ | |
7c673cae FG |
639 | "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \ |
640 | "name=ancestor,type=CephString,req=false,goodchars=[A-Za-z0-9-_.]", \ | |
641 | "remove <name> from crush map (everywhere, or just at <ancestor>)", \ | |
11fdf7f2 TL |
642 | "osd", "rw", \ |
643 | FLAG(DEPRECATED)) | |
7c673cae FG |
644 | COMMAND("osd crush unlink " \ |
645 | "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \ | |
646 | "name=ancestor,type=CephString,req=false,goodchars=[A-Za-z0-9-_.]", \ | |
647 | "unlink <name> from crush map (everywhere, or just at <ancestor>)", \ | |
11fdf7f2 | 648 | "osd", "rw") |
7c673cae FG |
649 | COMMAND("osd crush reweight-all", |
650 | "recalculate the weights for the tree to ensure they sum correctly", | |
11fdf7f2 | 651 | "osd", "rw") |
7c673cae FG |
652 | COMMAND("osd crush reweight " \ |
653 | "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \ | |
654 | "name=weight,type=CephFloat,range=0.0", \ | |
655 | "change <name>'s weight to <weight> in crush map", \ | |
11fdf7f2 | 656 | "osd", "rw") |
7c673cae FG |
657 | COMMAND("osd crush reweight-subtree " \ |
658 | "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \ | |
659 | "name=weight,type=CephFloat,range=0.0", \ | |
660 | "change all leaf items beneath <name> to <weight> in crush map", \ | |
11fdf7f2 | 661 | "osd", "rw") |
7c673cae FG |
662 | COMMAND("osd crush tunables " \ |
663 | "name=profile,type=CephChoices,strings=legacy|argonaut|bobtail|firefly|hammer|jewel|optimal|default", \ | |
11fdf7f2 | 664 | "set crush tunables values to <profile>", "osd", "rw") |
7c673cae FG |
665 | COMMAND("osd crush set-tunable " \ |
666 | "name=tunable,type=CephChoices,strings=straw_calc_version " \ | |
667 | "name=value,type=CephInt", | |
668 | "set crush tunable <tunable> to <value>", | |
11fdf7f2 | 669 | "osd", "rw") |
7c673cae FG |
670 | COMMAND("osd crush get-tunable " \ |
671 | "name=tunable,type=CephChoices,strings=straw_calc_version", | |
672 | "get crush tunable <tunable>", | |
11fdf7f2 | 673 | "osd", "r") |
7c673cae | 674 | COMMAND("osd crush show-tunables", \ |
11fdf7f2 | 675 | "show current crush tunables", "osd", "r") |
7c673cae FG |
676 | COMMAND("osd crush rule create-simple " \ |
677 | "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \ | |
678 | "name=root,type=CephString,goodchars=[A-Za-z0-9-_.] " \ | |
679 | "name=type,type=CephString,goodchars=[A-Za-z0-9-_.] " \ | |
680 | "name=mode,type=CephChoices,strings=firstn|indep,req=false", | |
681 | "create crush rule <name> to start from <root>, replicate across buckets of type <type>, using a choose mode of <firstn|indep> (default firstn; indep best for erasure pools)", \ | |
11fdf7f2 | 682 | "osd", "rw") |
224ce89b WB |
683 | COMMAND("osd crush rule create-replicated " \ |
684 | "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \ | |
685 | "name=root,type=CephString,goodchars=[A-Za-z0-9-_.] " \ | |
686 | "name=type,type=CephString,goodchars=[A-Za-z0-9-_.] " \ | |
687 | "name=class,type=CephString,goodchars=[A-Za-z0-9-_.],req=false", | |
11fdf7f2 TL |
688 | "create crush rule <name> for replicated pool to start from <root>, replicate across buckets of type <type>, use devices of type <class> (ssd or hdd)", \ |
689 | "osd", "rw") | |
7c673cae FG |
690 | COMMAND("osd crush rule create-erasure " \ |
691 | "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \ | |
692 | "name=profile,type=CephString,req=false,goodchars=[A-Za-z0-9-_.=]", \ | |
693 | "create crush rule <name> for erasure coded pool created with <profile> (default default)", \ | |
11fdf7f2 | 694 | "osd", "rw") |
7c673cae FG |
695 | COMMAND("osd crush rule rm " \ |
696 | "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] ", \ | |
11fdf7f2 | 697 | "remove crush rule <name>", "osd", "rw") |
b5b8bbf5 FG |
698 | COMMAND("osd crush rule rename " \ |
699 | "name=srcname,type=CephString,goodchars=[A-Za-z0-9-_.] " \ | |
700 | "name=dstname,type=CephString,goodchars=[A-Za-z0-9-_.]", \ | |
701 | "rename crush rule <srcname> to <dstname>", | |
11fdf7f2 | 702 | "osd", "rw") |
c07f9fc5 FG |
703 | COMMAND("osd crush tree " |
704 | "name=shadow,type=CephChoices,strings=--show-shadow,req=false", \ | |
7c673cae | 705 | "dump crush buckets and items in a tree view", |
11fdf7f2 TL |
706 | "osd", "r") |
707 | COMMAND("osd crush ls name=node,type=CephString,goodchars=[A-Za-z0-9-_.]", | |
d2e6a577 | 708 | "list items beneath a node in the CRUSH tree", |
11fdf7f2 | 709 | "osd", "r") |
7c673cae FG |
710 | COMMAND("osd crush class ls", \ |
711 | "list all crush device classes", \ | |
11fdf7f2 | 712 | "osd", "r") |
224ce89b WB |
713 | COMMAND("osd crush class ls-osd " \ |
714 | "name=class,type=CephString,goodchars=[A-Za-z0-9-_]", \ | |
715 | "list all osds belonging to the specific <class>", \ | |
11fdf7f2 TL |
716 | "osd", "r") |
717 | COMMAND("osd crush get-device-class " \ | |
718 | "name=ids,type=CephString,n=N", \ | |
719 | "get classes of specified osd(s) <id> [<id>...]", \ | |
720 | "osd", "r") | |
c07f9fc5 FG |
721 | COMMAND("osd crush weight-set ls", |
722 | "list crush weight sets", | |
11fdf7f2 | 723 | "osd", "r") |
c07f9fc5 FG |
724 | COMMAND("osd crush weight-set dump", |
725 | "dump crush weight sets", | |
11fdf7f2 | 726 | "osd", "r") |
c07f9fc5 FG |
727 | COMMAND("osd crush weight-set create-compat", |
728 | "create a default backward-compatible weight-set", | |
11fdf7f2 | 729 | "osd", "rw") |
c07f9fc5 FG |
730 | COMMAND("osd crush weight-set create " \ |
731 | "name=pool,type=CephPoolname "\ | |
732 | "name=mode,type=CephChoices,strings=flat|positional", | |
733 | "create a weight-set for a given pool", | |
11fdf7f2 | 734 | "osd", "rw") |
c07f9fc5 FG |
735 | COMMAND("osd crush weight-set rm name=pool,type=CephPoolname", |
736 | "remove the weight-set for a given pool", | |
11fdf7f2 | 737 | "osd", "rw") |
c07f9fc5 FG |
738 | COMMAND("osd crush weight-set rm-compat", |
739 | "remove the backward-compatible weight-set", | |
11fdf7f2 | 740 | "osd", "rw") |
c07f9fc5 FG |
741 | COMMAND("osd crush weight-set reweight " \ |
742 | "name=pool,type=CephPoolname " \ | |
743 | "name=item,type=CephString " \ | |
744 | "name=weight,type=CephFloat,range=0.0,n=N", | |
745 | "set weight for an item (bucket or osd) in a pool's weight-set", | |
11fdf7f2 | 746 | "osd", "rw") |
c07f9fc5 FG |
747 | COMMAND("osd crush weight-set reweight-compat " \ |
748 | "name=item,type=CephString " \ | |
749 | "name=weight,type=CephFloat,range=0.0,n=N", | |
750 | "set weight for an item (bucket or osd) in the backward-compatible weight-set", | |
11fdf7f2 | 751 | "osd", "rw") |
7c673cae FG |
752 | COMMAND("osd setmaxosd " \ |
753 | "name=newmax,type=CephInt,range=0", \ | |
11fdf7f2 | 754 | "set new maximum osd value", "osd", "rw") |
7c673cae FG |
755 | COMMAND("osd set-full-ratio " \ |
756 | "name=ratio,type=CephFloat,range=0.0|1.0", \ | |
757 | "set usage ratio at which OSDs are marked full", | |
11fdf7f2 | 758 | "osd", "rw") |
7c673cae FG |
759 | COMMAND("osd set-backfillfull-ratio " \ |
760 | "name=ratio,type=CephFloat,range=0.0|1.0", \ | |
761 | "set usage ratio at which OSDs are marked too full to backfill", | |
11fdf7f2 | 762 | "osd", "rw") |
7c673cae FG |
763 | COMMAND("osd set-nearfull-ratio " \ |
764 | "name=ratio,type=CephFloat,range=0.0|1.0", \ | |
765 | "set usage ratio at which OSDs are marked near-full", | |
11fdf7f2 TL |
766 | "osd", "rw") |
767 | COMMAND("osd get-require-min-compat-client", | |
768 | "get the minimum client version we will maintain compatibility with", | |
769 | "osd", "r") | |
7c673cae | 770 | COMMAND("osd set-require-min-compat-client " \ |
31f18b77 | 771 | "name=version,type=CephString " \ |
11fdf7f2 | 772 | "name=yes_i_really_mean_it,type=CephBool,req=false", \ |
7c673cae | 773 | "set the minimum client version we will maintain compatibility with", |
11fdf7f2 TL |
774 | "osd", "rw") |
775 | COMMAND("osd pause", "pause osd", "osd", "rw") | |
776 | COMMAND("osd unpause", "unpause osd", "osd", "rw") | |
7c673cae FG |
777 | COMMAND("osd erasure-code-profile set " \ |
778 | "name=name,type=CephString,goodchars=[A-Za-z0-9-_.] " \ | |
11fdf7f2 TL |
779 | "name=profile,type=CephString,n=N,req=false " \ |
780 | "name=force,type=CephBool,req=false", \ | |
7c673cae | 781 | "create erasure code profile <name> with [<key[=value]> ...] pairs. Add a --force at the end to override an existing profile (VERY DANGEROUS)", \ |
11fdf7f2 | 782 | "osd", "rw") |
7c673cae FG |
783 | COMMAND("osd erasure-code-profile get " \ |
784 | "name=name,type=CephString,goodchars=[A-Za-z0-9-_.]", \ | |
785 | "get erasure code profile <name>", \ | |
11fdf7f2 | 786 | "osd", "r") |
7c673cae FG |
787 | COMMAND("osd erasure-code-profile rm " \ |
788 | "name=name,type=CephString,goodchars=[A-Za-z0-9-_.]", \ | |
789 | "remove erasure code profile <name>", \ | |
11fdf7f2 | 790 | "osd", "rw") |
7c673cae FG |
791 | COMMAND("osd erasure-code-profile ls", \ |
792 | "list all erasure code profiles", \ | |
11fdf7f2 | 793 | "osd", "r") |
7c673cae | 794 | COMMAND("osd set " \ |
11fdf7f2 TL |
795 | "name=key,type=CephChoices,strings=full|pause|noup|nodown|" \ |
796 | "noout|noin|nobackfill|norebalance|norecover|noscrub|nodeep-scrub|" \ | |
797 | "notieragent|nosnaptrim|pglog_hardlimit " \ | |
798 | "name=yes_i_really_mean_it,type=CephBool,req=false", \ | |
799 | "set <key>", "osd", "rw") | |
7c673cae | 800 | COMMAND("osd unset " \ |
11fdf7f2 TL |
801 | "name=key,type=CephChoices,strings=full|pause|noup|nodown|"\ |
802 | "noout|noin|nobackfill|norebalance|norecover|noscrub|nodeep-scrub|" \ | |
803 | "notieragent|nosnaptrim", \ | |
804 | "unset <key>", "osd", "rw") | |
31f18b77 | 805 | COMMAND("osd require-osd-release "\ |
11fdf7f2 TL |
806 | "name=release,type=CephChoices,strings=luminous|mimic|nautilus " \ |
807 | "name=yes_i_really_mean_it,type=CephBool,req=false", \ | |
31f18b77 | 808 | "set the minimum allowed OSD release to participate in the cluster", |
11fdf7f2 | 809 | "osd", "rw") |
7c673cae FG |
810 | COMMAND("osd down " \ |
811 | "type=CephString,name=ids,n=N", \ | |
31f18b77 | 812 | "set osd(s) <id> [<id>...] down, " \ |
11fdf7f2 TL |
813 | "or use <any|all> to set all osds down", \ |
814 | "osd", "rw") | |
7c673cae FG |
815 | COMMAND("osd out " \ |
816 | "name=ids,type=CephString,n=N", \ | |
31f18b77 | 817 | "set osd(s) <id> [<id>...] out, " \ |
11fdf7f2 TL |
818 | "or use <any|all> to set all osds out", \ |
819 | "osd", "rw") | |
7c673cae FG |
820 | COMMAND("osd in " \ |
821 | "name=ids,type=CephString,n=N", \ | |
31f18b77 | 822 | "set osd(s) <id> [<id>...] in, " |
11fdf7f2 TL |
823 | "can use <any|all> to automatically set all previously out osds in", \ |
824 | "osd", "rw") | |
825 | COMMAND_WITH_FLAG("osd rm " \ | |
7c673cae | 826 | "name=ids,type=CephString,n=N", \ |
31f18b77 | 827 | "remove osd(s) <id> [<id>...], " |
11fdf7f2 TL |
828 | "or use <any|all> to remove all osds", \ |
829 | "osd", "rw", | |
830 | FLAG(DEPRECATED)) | |
81eedcae | 831 | COMMAND_WITH_FLAG("osd add-noup " \ |
31f18b77 FG |
832 | "name=ids,type=CephString,n=N", \ |
833 | "mark osd(s) <id> [<id>...] as noup, " \ | |
11fdf7f2 | 834 | "or use <all|any> to mark all osds as noup", \ |
81eedcae TL |
835 | "osd", "rw", |
836 | FLAG(DEPRECATED)) | |
837 | COMMAND_WITH_FLAG("osd add-nodown " \ | |
31f18b77 FG |
838 | "name=ids,type=CephString,n=N", \ |
839 | "mark osd(s) <id> [<id>...] as nodown, " \ | |
11fdf7f2 | 840 | "or use <all|any> to mark all osds as nodown", \ |
81eedcae TL |
841 | "osd", "rw", |
842 | FLAG(DEPRECATED)) | |
843 | COMMAND_WITH_FLAG("osd add-noin " \ | |
31f18b77 FG |
844 | "name=ids,type=CephString,n=N", \ |
845 | "mark osd(s) <id> [<id>...] as noin, " \ | |
11fdf7f2 | 846 | "or use <all|any> to mark all osds as noin", \ |
81eedcae TL |
847 | "osd", "rw", |
848 | FLAG(DEPRECATED)) | |
849 | COMMAND_WITH_FLAG("osd add-noout " \ | |
31f18b77 FG |
850 | "name=ids,type=CephString,n=N", \ |
851 | "mark osd(s) <id> [<id>...] as noout, " \ | |
11fdf7f2 | 852 | "or use <all|any> to mark all osds as noout", \ |
81eedcae TL |
853 | "osd", "rw", |
854 | FLAG(DEPRECATED)) | |
855 | COMMAND_WITH_FLAG("osd rm-noup " \ | |
31f18b77 FG |
856 | "name=ids,type=CephString,n=N", \ |
857 | "allow osd(s) <id> [<id>...] to be marked up " \ | |
858 | "(if they are currently marked as noup), " \ | |
11fdf7f2 | 859 | "can use <all|any> to automatically filter out all noup osds", \ |
81eedcae TL |
860 | "osd", "rw", |
861 | FLAG(DEPRECATED)) | |
862 | COMMAND_WITH_FLAG("osd rm-nodown " \ | |
31f18b77 FG |
863 | "name=ids,type=CephString,n=N", \ |
864 | "allow osd(s) <id> [<id>...] to be marked down " \ | |
865 | "(if they are currently marked as nodown), " \ | |
11fdf7f2 | 866 | "can use <all|any> to automatically filter out all nodown osds", \ |
81eedcae TL |
867 | "osd", "rw", |
868 | FLAG(DEPRECATED)) | |
869 | COMMAND_WITH_FLAG("osd rm-noin " \ | |
31f18b77 FG |
870 | "name=ids,type=CephString,n=N", \ |
871 | "allow osd(s) <id> [<id>...] to be marked in " \ | |
872 | "(if they are currently marked as noin), " \ | |
11fdf7f2 | 873 | "can use <all|any> to automatically filter out all noin osds", \ |
81eedcae TL |
874 | "osd", "rw", |
875 | FLAG(DEPRECATED)) | |
876 | COMMAND_WITH_FLAG("osd rm-noout " \ | |
31f18b77 FG |
877 | "name=ids,type=CephString,n=N", \ |
878 | "allow osd(s) <id> [<id>...] to be marked out " \ | |
879 | "(if they are currently marked as noout), " \ | |
11fdf7f2 | 880 | "can use <all|any> to automatically filter out all noout osds", \ |
81eedcae TL |
881 | "osd", "rw", |
882 | FLAG(DEPRECATED)) | |
883 | COMMAND("osd set-group " \ | |
884 | "name=flags,type=CephString " | |
885 | "name=who,type=CephString,n=N", \ | |
886 | "set <flags> for batch osds or crush nodes, " \ | |
887 | "<flags> must be a comma-separated subset of {noup,nodown,noin,noout}", \ | |
888 | "osd", "rw") | |
889 | COMMAND("osd unset-group " \ | |
890 | "name=flags,type=CephString " | |
891 | "name=who,type=CephString,n=N", \ | |
892 | "unset <flags> for batch osds or crush nodes, " \ | |
893 | "<flags> must be a comma-separated subset of {noup,nodown,noin,noout}", \ | |
11fdf7f2 | 894 | "osd", "rw") |
7c673cae FG |
895 | COMMAND("osd reweight " \ |
896 | "name=id,type=CephOsdName " \ | |
897 | "type=CephFloat,name=weight,range=0.0|1.0", \ | |
11fdf7f2 | 898 | "reweight osd to 0.0 < <weight> < 1.0", "osd", "rw") |
7c673cae FG |
899 | COMMAND("osd reweightn " \ |
900 | "name=weights,type=CephString", | |
901 | "reweight osds with {<id>: <weight>,...})", | |
11fdf7f2 | 902 | "osd", "rw") |
c07f9fc5 | 903 | COMMAND("osd force-create-pg " \ |
11fdf7f2 TL |
904 | "name=pgid,type=CephPgid "\ |
905 | "name=yes_i_really_mean_it,type=CephBool,req=false", \ | |
c07f9fc5 | 906 | "force creation of pg <pgid>", |
11fdf7f2 | 907 | "osd", "rw") |
7c673cae FG |
908 | COMMAND("osd pg-temp " \ |
909 | "name=pgid,type=CephPgid " \ | |
910 | "name=id,type=CephOsdName,n=N,req=false", \ | |
911 | "set pg_temp mapping pgid:[<id> [<id>...]] (developers only)", \ | |
11fdf7f2 | 912 | "osd", "rw") |
7c673cae FG |
913 | COMMAND("osd pg-upmap " \ |
914 | "name=pgid,type=CephPgid " \ | |
915 | "name=id,type=CephOsdName,n=N", \ | |
224ce89b | 916 | "set pg_upmap mapping <pgid>:[<id> [<id>...]] (developers only)", \ |
11fdf7f2 | 917 | "osd", "rw") |
7c673cae FG |
918 | COMMAND("osd rm-pg-upmap " \ |
919 | "name=pgid,type=CephPgid", \ | |
920 | "clear pg_upmap mapping for <pgid> (developers only)", \ | |
11fdf7f2 | 921 | "osd", "rw") |
7c673cae FG |
922 | COMMAND("osd pg-upmap-items " \ |
923 | "name=pgid,type=CephPgid " \ | |
924 | "name=id,type=CephOsdName,n=N", \ | |
925 | "set pg_upmap_items mapping <pgid>:{<id> to <id>, [...]} (developers only)", \ | |
11fdf7f2 | 926 | "osd", "rw") |
7c673cae FG |
927 | COMMAND("osd rm-pg-upmap-items " \ |
928 | "name=pgid,type=CephPgid", \ | |
929 | "clear pg_upmap_items mapping for <pgid> (developers only)", \ | |
11fdf7f2 | 930 | "osd", "rw") |
7c673cae FG |
931 | COMMAND("osd primary-temp " \ |
932 | "name=pgid,type=CephPgid " \ | |
933 | "name=id,type=CephOsdName", \ | |
934 | "set primary_temp mapping pgid:<id>|-1 (developers only)", \ | |
11fdf7f2 | 935 | "osd", "rw") |
7c673cae FG |
936 | COMMAND("osd primary-affinity " \ |
937 | "name=id,type=CephOsdName " \ | |
938 | "type=CephFloat,name=weight,range=0.0|1.0", \ | |
939 | "adjust osd primary-affinity from 0.0 <= <weight> <= 1.0", \ | |
11fdf7f2 TL |
940 | "osd", "rw") |
941 | COMMAND_WITH_FLAG("osd destroy-actual " \ | |
31f18b77 | 942 | "name=id,type=CephOsdName " \ |
11fdf7f2 | 943 | "name=yes_i_really_mean_it,type=CephBool,req=false", \ |
31f18b77 FG |
944 | "mark osd as being destroyed. Keeps the ID intact (allowing reuse), " \ |
945 | "but removes cephx keys, config-key data and lockbox keys, "\ | |
946 | "rendering data permanently unreadable.", \ | |
11fdf7f2 TL |
947 | "osd", "rw", FLAG(HIDDEN)) |
948 | COMMAND("osd purge-new " \ | |
949 | "name=id,type=CephOsdName " \ | |
950 | "name=yes_i_really_mean_it,type=CephBool,req=false", \ | |
951 | "purge all traces of an OSD that was partially created but never " \ | |
952 | "started", \ | |
953 | "osd", "rw") | |
954 | COMMAND_WITH_FLAG("osd purge-actual " \ | |
31f18b77 | 955 | "name=id,type=CephOsdName " \ |
11fdf7f2 | 956 | "name=yes_i_really_mean_it,type=CephBool,req=false", \ |
31f18b77 FG |
957 | "purge all osd data from the monitors. Combines `osd destroy`, " \ |
958 | "`osd rm`, and `osd crush rm`.", \ | |
11fdf7f2 | 959 | "osd", "rw", FLAG(HIDDEN)) |
7c673cae FG |
960 | COMMAND("osd lost " \ |
961 | "name=id,type=CephOsdName " \ | |
11fdf7f2 | 962 | "name=yes_i_really_mean_it,type=CephBool,req=false", \ |
7c673cae | 963 | "mark osd as permanently lost. THIS DESTROYS DATA IF NO MORE REPLICAS EXIST, BE CAREFUL", \ |
11fdf7f2 | 964 | "osd", "rw") |
31f18b77 | 965 | COMMAND_WITH_FLAG("osd create " \ |
7c673cae FG |
966 | "name=uuid,type=CephUUID,req=false " \ |
967 | "name=id,type=CephOsdName,req=false", \ | |
11fdf7f2 | 968 | "create new osd (with optional UUID and ID)", "osd", "rw", |
31f18b77 FG |
969 | FLAG(DEPRECATED)) |
970 | COMMAND("osd new " \ | |
971 | "name=uuid,type=CephUUID,req=true " \ | |
972 | "name=id,type=CephOsdName,req=false", \ | |
973 | "Create a new OSD. If supplied, the `id` to be replaced needs to " \ | |
974 | "exist and have been previously destroyed. " \ | |
975 | "Reads secrets from JSON file via `-i <file>` (see man page).", \ | |
11fdf7f2 | 976 | "osd", "rw") |
7c673cae FG |
977 | COMMAND("osd blacklist " \ |
978 | "name=blacklistop,type=CephChoices,strings=add|rm " \ | |
979 | "name=addr,type=CephEntityAddr " \ | |
980 | "name=expire,type=CephFloat,range=0.0,req=false", \ | |
981 | "add (optionally until <expire> seconds from now) or remove <addr> from blacklist", \ | |
11fdf7f2 TL |
982 | "osd", "rw") |
983 | COMMAND("osd blacklist ls", "show blacklisted clients", "osd", "r") | |
984 | COMMAND("osd blacklist clear", "clear all blacklisted clients", "osd", "rw") | |
7c673cae FG |
985 | COMMAND("osd pool mksnap " \ |
986 | "name=pool,type=CephPoolname " \ | |
987 | "name=snap,type=CephString", \ | |
11fdf7f2 | 988 | "make snapshot <snap> in <pool>", "osd", "rw") |
7c673cae FG |
989 | COMMAND("osd pool rmsnap " \ |
990 | "name=pool,type=CephPoolname " \ | |
991 | "name=snap,type=CephString", \ | |
11fdf7f2 | 992 | "remove snapshot <snap> from <pool>", "osd", "rw") |
7c673cae FG |
993 | COMMAND("osd pool ls " \ |
994 | "name=detail,type=CephChoices,strings=detail,req=false", \ | |
11fdf7f2 | 995 | "list pools", "osd", "r") |
7c673cae FG |
996 | COMMAND("osd pool create " \ |
997 | "name=pool,type=CephPoolname " \ | |
998 | "name=pg_num,type=CephInt,range=0 " \ | |
999 | "name=pgp_num,type=CephInt,range=0,req=false " \ | |
1000 | "name=pool_type,type=CephChoices,strings=replicated|erasure,req=false " \ | |
1001 | "name=erasure_code_profile,type=CephString,req=false,goodchars=[A-Za-z0-9-_.] " \ | |
31f18b77 | 1002 | "name=rule,type=CephString,req=false " \ |
11fdf7f2 TL |
1003 | "name=expected_num_objects,type=CephInt,req=false " \ |
1004 | "name=size,type=CephInt,req=false " \ | |
1005 | "name=pg_num_min,type=CephInt,range=0,req=false " \ | |
1006 | "name=target_size_bytes,type=CephInt,range=0,req=false " \ | |
1007 | "name=target_size_ratio,type=CephFloat,range=0|1,req=false",\ | |
1008 | "create pool", "osd", "rw") | |
1009 | COMMAND_WITH_FLAG("osd pool delete " \ | |
7c673cae FG |
1010 | "name=pool,type=CephPoolname " \ |
1011 | "name=pool2,type=CephPoolname,req=false " \ | |
11fdf7f2 TL |
1012 | "name=yes_i_really_really_mean_it,type=CephBool,req=false " |
1013 | "name=yes_i_really_really_mean_it_not_faking,type=CephBool,req=false ", \ | |
7c673cae | 1014 | "delete pool", \ |
11fdf7f2 TL |
1015 | "osd", "rw", \ |
1016 | FLAG(DEPRECATED)) | |
7c673cae FG |
1017 | COMMAND("osd pool rm " \ |
1018 | "name=pool,type=CephPoolname " \ | |
1019 | "name=pool2,type=CephPoolname,req=false " \ | |
11fdf7f2 TL |
1020 | "name=yes_i_really_really_mean_it,type=CephBool,req=false " |
1021 | "name=yes_i_really_really_mean_it_not_faking,type=CephBool,req=false ", \ | |
7c673cae | 1022 | "remove pool", \ |
11fdf7f2 | 1023 | "osd", "rw") |
7c673cae FG |
1024 | COMMAND("osd pool rename " \ |
1025 | "name=srcpool,type=CephPoolname " \ | |
1026 | "name=destpool,type=CephPoolname", \ | |
11fdf7f2 | 1027 | "rename <srcpool> to <destpool>", "osd", "rw") |
7c673cae FG |
1028 | COMMAND("osd pool get " \ |
1029 | "name=pool,type=CephPoolname " \ | |
11fdf7f2 TL |
1030 | "name=var,type=CephChoices,strings=size|min_size|pg_num|pgp_num|crush_rule|hashpspool|nodelete|nopgchange|nosizechange|write_fadvise_dontneed|noscrub|nodeep-scrub|hit_set_type|hit_set_period|hit_set_count|hit_set_fpp|use_gmt_hitset|target_max_objects|target_max_bytes|cache_target_dirty_ratio|cache_target_dirty_high_ratio|cache_target_full_ratio|cache_min_flush_age|cache_min_evict_age|erasure_code_profile|min_read_recency_for_promote|all|min_write_recency_for_promote|fast_read|hit_set_grade_decay_rate|hit_set_search_last_n|scrub_min_interval|scrub_max_interval|deep_scrub_interval|recovery_priority|recovery_op_priority|scrub_priority|compression_mode|compression_algorithm|compression_required_ratio|compression_max_blob_size|compression_min_blob_size|csum_type|csum_min_block|csum_max_block|allow_ec_overwrites|fingerprint_algorithm|pg_autoscale_mode|pg_autoscale_bias|pg_num_min|target_size_bytes|target_size_ratio", \ |
1031 | "get pool parameter <var>", "osd", "r") | |
7c673cae FG |
1032 | COMMAND("osd pool set " \ |
1033 | "name=pool,type=CephPoolname " \ | |
11fdf7f2 | 1034 | "name=var,type=CephChoices,strings=size|min_size|pg_num|pgp_num|pgp_num_actual|crush_rule|hashpspool|nodelete|nopgchange|nosizechange|write_fadvise_dontneed|noscrub|nodeep-scrub|hit_set_type|hit_set_period|hit_set_count|hit_set_fpp|use_gmt_hitset|target_max_bytes|target_max_objects|cache_target_dirty_ratio|cache_target_dirty_high_ratio|cache_target_full_ratio|cache_min_flush_age|cache_min_evict_age|min_read_recency_for_promote|min_write_recency_for_promote|fast_read|hit_set_grade_decay_rate|hit_set_search_last_n|scrub_min_interval|scrub_max_interval|deep_scrub_interval|recovery_priority|recovery_op_priority|scrub_priority|compression_mode|compression_algorithm|compression_required_ratio|compression_max_blob_size|compression_min_blob_size|csum_type|csum_min_block|csum_max_block|allow_ec_overwrites|fingerprint_algorithm|pg_autoscale_mode|pg_autoscale_bias|pg_num_min|target_size_bytes|target_size_ratio " \ |
7c673cae | 1035 | "name=val,type=CephString " \ |
11fdf7f2 TL |
1036 | "name=yes_i_really_mean_it,type=CephBool,req=false", \ |
1037 | "set pool parameter <var> to <val>", "osd", "rw") | |
7c673cae FG |
1038 | // 'val' is a CephString because it can include a unit. Perhaps |
1039 | // there should be a Python type for validation/conversion of strings | |
1040 | // with units. | |
1041 | COMMAND("osd pool set-quota " \ | |
1042 | "name=pool,type=CephPoolname " \ | |
1043 | "name=field,type=CephChoices,strings=max_objects|max_bytes " \ | |
1044 | "name=val,type=CephString", | |
11fdf7f2 | 1045 | "set object or byte limit on pool", "osd", "rw") |
7c673cae FG |
1046 | COMMAND("osd pool get-quota " \ |
1047 | "name=pool,type=CephPoolname ", | |
1048 | "obtain object or byte limits for pool", | |
11fdf7f2 | 1049 | "osd", "r") |
c07f9fc5 FG |
1050 | COMMAND("osd pool application enable " \ |
1051 | "name=pool,type=CephPoolname " \ | |
1052 | "name=app,type=CephString,goodchars=[A-Za-z0-9-_.] " \ | |
11fdf7f2 | 1053 | "name=yes_i_really_mean_it,type=CephBool,req=false", \ |
c07f9fc5 | 1054 | "enable use of an application <app> [cephfs,rbd,rgw] on pool <poolname>", |
11fdf7f2 | 1055 | "osd", "rw") |
c07f9fc5 FG |
1056 | COMMAND("osd pool application disable " \ |
1057 | "name=pool,type=CephPoolname " \ | |
1058 | "name=app,type=CephString " \ | |
11fdf7f2 | 1059 | "name=yes_i_really_mean_it,type=CephBool,req=false", \ |
c07f9fc5 | 1060 | "disables use of an application <app> on pool <poolname>", |
11fdf7f2 | 1061 | "osd", "rw") |
c07f9fc5 FG |
1062 | COMMAND("osd pool application set " \ |
1063 | "name=pool,type=CephPoolname " \ | |
1064 | "name=app,type=CephString " \ | |
1065 | "name=key,type=CephString,goodchars=[A-Za-z0-9-_.] " \ | |
1066 | "name=value,type=CephString,goodchars=[A-Za-z0-9-_.=]", | |
1067 | "sets application <app> metadata key <key> to <value> on pool <poolname>", | |
11fdf7f2 | 1068 | "osd", "rw") |
c07f9fc5 FG |
1069 | COMMAND("osd pool application rm " \ |
1070 | "name=pool,type=CephPoolname " \ | |
1071 | "name=app,type=CephString " \ | |
1072 | "name=key,type=CephString", | |
1073 | "removes application <app> metadata key <key> on pool <poolname>", | |
11fdf7f2 | 1074 | "osd", "rw") |
181888fb FG |
1075 | COMMAND("osd pool application get " \ |
1076 | "name=pool,type=CephPoolname,req=fasle " \ | |
1077 | "name=app,type=CephString,req=false " \ | |
1078 | "name=key,type=CephString,req=false", | |
1079 | "get value of key <key> of application <app> on pool <poolname>", | |
11fdf7f2 | 1080 | "osd", "r") |
7c673cae FG |
1081 | COMMAND("osd utilization", |
1082 | "get basic pg distribution stats", | |
11fdf7f2 | 1083 | "osd", "r") |
7c673cae FG |
1084 | |
1085 | // tiering | |
1086 | COMMAND("osd tier add " \ | |
1087 | "name=pool,type=CephPoolname " \ | |
1088 | "name=tierpool,type=CephPoolname " \ | |
1089 | "name=force_nonempty,type=CephChoices,strings=--force-nonempty,req=false", | |
1090 | "add the tier <tierpool> (the second one) to base pool <pool> (the first one)", \ | |
11fdf7f2 TL |
1091 | "osd", "rw") |
1092 | COMMAND("osd tier rm " \ | |
7c673cae FG |
1093 | "name=pool,type=CephPoolname " \ |
1094 | "name=tierpool,type=CephPoolname", | |
1095 | "remove the tier <tierpool> (the second one) from base pool <pool> (the first one)", \ | |
11fdf7f2 TL |
1096 | "osd", "rw") |
1097 | COMMAND_WITH_FLAG("osd tier remove " \ | |
7c673cae FG |
1098 | "name=pool,type=CephPoolname " \ |
1099 | "name=tierpool,type=CephPoolname", | |
1100 | "remove the tier <tierpool> (the second one) from base pool <pool> (the first one)", \ | |
11fdf7f2 TL |
1101 | "osd", "rw", \ |
1102 | FLAG(DEPRECATED)) | |
7c673cae FG |
1103 | COMMAND("osd tier cache-mode " \ |
1104 | "name=pool,type=CephPoolname " \ | |
1105 | "name=mode,type=CephChoices,strings=none|writeback|forward|readonly|readforward|proxy|readproxy " \ | |
11fdf7f2 TL |
1106 | "name=yes_i_really_mean_it,type=CephBool,req=false", \ |
1107 | "specify the caching mode for cache tier <pool>", "osd", "rw") | |
7c673cae FG |
1108 | COMMAND("osd tier set-overlay " \ |
1109 | "name=pool,type=CephPoolname " \ | |
1110 | "name=overlaypool,type=CephPoolname", \ | |
11fdf7f2 | 1111 | "set the overlay pool for base pool <pool> to be <overlaypool>", "osd", "rw") |
7c673cae FG |
1112 | COMMAND("osd tier rm-overlay " \ |
1113 | "name=pool,type=CephPoolname ", \ | |
11fdf7f2 TL |
1114 | "remove the overlay pool for base pool <pool>", "osd", "rw") |
1115 | COMMAND_WITH_FLAG("osd tier remove-overlay " \ | |
1116 | "name=pool,type=CephPoolname ", \ | |
1117 | "remove the overlay pool for base pool <pool>", "osd", "rw", \ | |
1118 | FLAG(DEPRECATED)) | |
7c673cae FG |
1119 | |
1120 | COMMAND("osd tier add-cache " \ | |
1121 | "name=pool,type=CephPoolname " \ | |
1122 | "name=tierpool,type=CephPoolname " \ | |
1123 | "name=size,type=CephInt,range=0", \ | |
1124 | "add a cache <tierpool> (the second one) of size <size> to existing pool <pool> (the first one)", \ | |
11fdf7f2 | 1125 | "osd", "rw") |
7c673cae FG |
1126 | |
1127 | /* | |
1128 | * mon/ConfigKeyService.cc | |
1129 | */ | |
1130 | ||
1131 | COMMAND("config-key get " \ | |
1132 | "name=key,type=CephString", \ | |
11fdf7f2 | 1133 | "get <key>", "config-key", "r") |
c07f9fc5 | 1134 | COMMAND("config-key set " \ |
7c673cae FG |
1135 | "name=key,type=CephString " \ |
1136 | "name=val,type=CephString,req=false", \ | |
11fdf7f2 | 1137 | "set <key> to value <val>", "config-key", "rw") |
c07f9fc5 FG |
1138 | COMMAND_WITH_FLAG("config-key put " \ |
1139 | "name=key,type=CephString " \ | |
1140 | "name=val,type=CephString,req=false", \ | |
11fdf7f2 | 1141 | "put <key>, value <val>", "config-key", "rw", |
c07f9fc5 | 1142 | FLAG(DEPRECATED)) |
11fdf7f2 | 1143 | COMMAND_WITH_FLAG("config-key del " \ |
7c673cae | 1144 | "name=key,type=CephString", \ |
11fdf7f2 TL |
1145 | "delete <key>", "config-key", "rw", \ |
1146 | FLAG(DEPRECATED)) | |
7c673cae FG |
1147 | COMMAND("config-key rm " \ |
1148 | "name=key,type=CephString", \ | |
11fdf7f2 | 1149 | "rm <key>", "config-key", "rw") |
7c673cae FG |
1150 | COMMAND("config-key exists " \ |
1151 | "name=key,type=CephString", \ | |
11fdf7f2 TL |
1152 | "check for <key>'s existence", "config-key", "r") |
1153 | COMMAND_WITH_FLAG("config-key list ", "list keys", "config-key", "r", | |
c07f9fc5 | 1154 | FLAG(DEPRECATED)) |
11fdf7f2 TL |
1155 | COMMAND("config-key ls ", "list keys", "config-key", "r") |
1156 | COMMAND("config-key dump " \ | |
1157 | "name=key,type=CephString,req=false", "dump keys and values (with optional prefix)", "config-key", "r") | |
7c673cae FG |
1158 | |
1159 | ||
1160 | /* | |
1161 | * mon/MgrMonitor.cc | |
1162 | */ | |
31f18b77 FG |
1163 | COMMAND("mgr dump " \ |
1164 | "name=epoch,type=CephInt,range=0,req=false", \ | |
1165 | "dump the latest MgrMap", \ | |
11fdf7f2 | 1166 | "mgr", "r") |
7c673cae | 1167 | COMMAND("mgr fail name=who,type=CephString", \ |
11fdf7f2 | 1168 | "treat the named manager daemon as failed", "mgr", "rw") |
224ce89b | 1169 | COMMAND("mgr module ls", |
11fdf7f2 | 1170 | "list active mgr modules", "mgr", "r") |
3efd9988 FG |
1171 | COMMAND("mgr services", |
1172 | "list service endpoints provided by mgr modules", | |
11fdf7f2 | 1173 | "mgr", "r") |
224ce89b WB |
1174 | COMMAND("mgr module enable " \ |
1175 | "name=module,type=CephString " \ | |
1176 | "name=force,type=CephChoices,strings=--force,req=false", | |
11fdf7f2 | 1177 | "enable mgr module", "mgr", "rw") |
224ce89b WB |
1178 | COMMAND("mgr module disable " \ |
1179 | "name=module,type=CephString", | |
11fdf7f2 TL |
1180 | "disable mgr module", "mgr", "rw") |
1181 | COMMAND("mgr metadata name=who,type=CephString,req=false", | |
c07f9fc5 | 1182 | "dump metadata for all daemons or a specific daemon", |
11fdf7f2 | 1183 | "mgr", "r") |
c07f9fc5 FG |
1184 | COMMAND("mgr count-metadata name=property,type=CephString", |
1185 | "count ceph-mgr daemons by metadata field property", | |
11fdf7f2 | 1186 | "mgr", "r") |
c07f9fc5 FG |
1187 | COMMAND("mgr versions", \ |
1188 | "check running versions of ceph-mgr daemons", | |
11fdf7f2 TL |
1189 | "mgr", "r") |
1190 | ||
1191 | // ConfigMonitor | |
1192 | COMMAND("config set" \ | |
1193 | " name=who,type=CephString" \ | |
1194 | " name=name,type=CephString" \ | |
1195 | " name=value,type=CephString" \ | |
1196 | " name=force,type=CephBool,req=false", | |
1197 | "Set a configuration option for one or more entities", | |
1198 | "config", "rw") | |
1199 | COMMAND("config rm" \ | |
1200 | " name=who,type=CephString" \ | |
1201 | " name=name,type=CephString", | |
1202 | "Clear a configuration option for one or more entities", | |
1203 | "config", "rw") | |
1204 | COMMAND("config get " \ | |
1205 | "name=who,type=CephString " \ | |
1206 | "name=key,type=CephString,req=False", | |
1207 | "Show configuration option(s) for an entity", | |
1208 | "config", "r") | |
1209 | COMMAND("config dump", | |
1210 | "Show all configuration option(s)", | |
1211 | "mon", "r") | |
1212 | COMMAND("config help " \ | |
1213 | "name=key,type=CephString", | |
1214 | "Describe a configuration option", | |
1215 | "config", "r") | |
1216 | COMMAND("config ls", | |
1217 | "List available configuration options", | |
1218 | "config", "r") | |
1219 | COMMAND("config assimilate-conf", | |
1220 | "Assimilate options from a conf, and return a new, minimal conf file", | |
1221 | "config", "rw") | |
1222 | COMMAND("config log name=num,type=CephInt,req=False", | |
1223 | "Show recent history of config changes", | |
1224 | "config", "r") | |
1225 | COMMAND("config reset" \ | |
1226 | " name=num,type=CephInt", | |
1227 | "Revert configuration to previous state", | |
1228 | "config", "rw") | |
1229 | COMMAND("config generate-minimal-conf", | |
1230 | "Generate a minimal ceph.conf file", | |
1231 | "config", "r") | |
1232 | ||
1233 | COMMAND_WITH_FLAG("smart name=devid,type=CephString,req=false", | |
1234 | "Query health metrics for underlying device", | |
eafe8130 | 1235 | "mon", "r", FLAG(HIDDEN)) |