1CEPHADM(8) Ceph CEPHADM(8)
2
3
4
6 cephadm - manage the local cephadm host
7
9 cephadm** [-h] [--image IMAGE] [--docker] [--data-dir DATA_DIR]
10 [--log-dir LOG_DIR] [--logrotate-dir LOGROTATE_DIR]
11 [--unit-dir UNIT_DIR] [--verbose] [--timeout TIMEOUT]
12 [--retry RETRY] [--no-container-init]
13 {version,pull,inspect-image,ls,list-networks,adopt,rm-daemon,rm-cluster,run,shell,enter,ceph-volume,unit,logs,bootstrap,deploy,check-host,prepare-host,add-repo,rm-repo,install}
14 ...
15
16 cephadm pull
17
18 cephadm inspect-image
19
20 cephadm ls [-h] [--no-detail] [--legacy-dir LEGACY_DIR]
21
22 cephadm list-networks
23
24 cephadm adopt [-h] --name NAME --style STYLE [--cluster CLUSTER]
25 [--legacy-dir LEGACY_DIR] [--config-json CONFIG_JSON]
26 [--skip-firewalld] [--skip-pull]
27
28 cephadm rm-daemon [-h] --name NAME --fsid FSID [--force]
29 [--force-delete-data]
30
31 cephadm rm-cluster [-h] --fsid FSID [--force]
32
33 cephadm run [-h] --name NAME --fsid FSID
34
35 cephadm shell [-h] [--fsid FSID] [--name NAME] [--config CONFIG]
36 [--keyring KEYRING] --mount [MOUNT [MOUNT ...]] [--env ENV]
37 [--] [command [command ...]]
38
39 cephadm enter [-h] [--fsid FSID] --name NAME [command [command ...]]
40
41 cephadm ceph-volume [-h] [--fsid FSID] [--config-json CONFIG_JSON]
42 [--config CONFIG] [--keyring KEYRING]
43 command [command ...]
44
45 cephadm unit [-h] [--fsid FSID] --name NAME command
46
47 cephadm logs [-h] [--fsid FSID] --name NAME [command [command ...]]
48
49 cephadm bootstrap [-h] [--config CONFIG] [--mon-id MON_ID]
50 [--mon-addrv MON_ADDRV] [--mon-ip MON_IP]
51 [--mgr-id MGR_ID] [--fsid FSID]
52 [--log-to-file] [--single-host-defaults]
53 [--output-dir OUTPUT_DIR]
54 [--output-keyring OUTPUT_KEYRING]
55 [--output-config OUTPUT_CONFIG]
56 [--output-pub-ssh-key OUTPUT_PUB_SSH_KEY]
57 [--skip-ssh]
58 [--initial-dashboard-user INITIAL_DASHBOARD_USER]
59 [--initial-dashboard-password INITIAL_DASHBOARD_PASSWORD]
60 [--ssl-dashboard-port SSL_DASHBOARD_PORT]
61 [--dashboard-key DASHBOARD_KEY]
62 [--dashboard-crt DASHBOARD_CRT]
63 [--ssh-config SSH_CONFIG]
64 [--ssh-private-key SSH_PRIVATE_KEY]
65 [--ssh-public-key SSH_PUBLIC_KEY]
66 [--ssh-user SSH_USER] [--skip-mon-network]
67 [--skip-dashboard] [--dashboard-password-noupdate]
68 [--no-minimize-config] [--skip-ping-check]
69 [--skip-pull] [--skip-firewalld] [--allow-overwrite]
70 [--allow-fqdn-hostname] [--skip-prepare-host]
71 [--orphan-initial-daemons] [--skip-monitoring-stack]
72 [--apply-spec APPLY_SPEC]
73 [--registry-url REGISTRY_URL]
74 [--registry-username REGISTRY_USERNAME]
75 [--registry-password REGISTRY_PASSWORD]
76 [--registry-json REGISTRY_JSON]
77
78 cephadm deploy [-h] --name NAME --fsid FSID [--config CONFIG]
79 [--config-json CONFIG_JSON] [--keyring KEYRING]
80 [--key KEY] [--osd-fsid OSD_FSID] [--skip-firewalld]
81 [--tcp-ports TCP_PORTS] [--reconfig] [--allow-ptrace]
82
83 cephadm check-host [-h] [--expect-hostname EXPECT_HOSTNAME]
84
85 cephadm prepare-host
86
87 cephadm add-repo [-h] [--release RELEASE] [--version VERSION]
88 [--dev DEV] [--dev-commit DEV_COMMIT]
89 [--gpg-url GPG_URL] [--repo-url REPO_URL]
90
91 cephadm rm-repo
92
93 cephadm install [-h] [packages [packages ...]]
94
95 cephadm registry-login [-h] [--registry-url REGISTRY_URL]
96 [--registry-username REGISTRY_USERNAME]
97 [--registry-password REGISTRY_PASSWORD]
98 [--registry-json REGISTRY_JSON] [--fsid FSID]
99
100
102 cephadm is a command line tool to manage the local host for the cephadm
103 orchestrator.
104
105 It provides commands to investigate and modify the state of the current
106 host.
107
108 cephadm is not required on all hosts, but useful when investigating a
109 particular daemon.
110
112 --image IMAGE
113 container image. Can also be set via the "CEPHADM_IMAGE" env var
114 (default: None)
115
116 --docker
117 use docker instead of podman (default: False)
118
119 --data-dir DATA_DIR
120 base directory for daemon data (default: /var/lib/ceph)
121
122 --log-dir LOG_DIR
123 base directory for daemon logs (default: /var/log/ceph)
124
125 --logrotate-dir LOGROTATE_DIR
126 location of logrotate configuration files (default: /etc/logro‐
127 tate.d)
128
129 --unit-dir UNIT_DIR
130 base directory for systemd units (default: /etc/systemd/system)
131
132 --verbose, -v
133 Show debug-level log messages (default: False)
134
135 --timeout TIMEOUT
136 timeout in seconds (default: None)
137
138 --retry RETRY
139 max number of retries (default: 10)
140
141 --no-container-init
142 do not run podman/docker with --init (default: False)
143
145 add-repo
146 configure local package repository to also include the ceph repository.
147
148 Arguments:
149
150 • [--release RELEASE] use latest version of a named release
151 (e.g., octopus)
152
153 • [--version VERSION] use specific upstream version (x.y.z)
154
155 • [--dev DEV] use specified bleeding edge build from git
156 branch or tag
157
158 • [--dev-commit DEV_COMMIT] use specified bleeding edge build from git
159 commit
160
161 • [--gpg-url GPG_URL] specify alternative GPG key location
162
163 • [--repo-url REPO_URL] specify alternative repo location
164
165 adopt
166 Adopt a daemon deployed with a different deployment tool.
167
168 Arguments:
169
170 • [--name NAME, -n NAME] daemon name (type.id)
171
172 • [--style STYLE] deployment style (legacy, ...)
173
174 • [--cluster CLUSTER] cluster name
175
176 • [--legacy-dir LEGACY_DIR] base directory for legacy daemon data
177
178 • [--config-json CONFIG_JSON] Additional configuration information in
179 JSON format
180
181 • [--skip-firewalld] Do not configure firewalld
182
183 • [--skip-pull] do not pull the latest image before
184 adopting
185
186 Configuration:
187
188 When starting the shell, cephadm looks for configuration in the follow‐
189 ing order. Only the first values found are used:
190
191 1. An explicit, user provided path to a config file (-c/--config op‐
192 tion)
193
194 2. Config file for daemon specified with --name parameter
195 (/var/lib/ceph/<fsid>/<daemon-name>/config)
196
197 3. /var/lib/ceph/<fsid>/config/ceph.conf if it exists
198
199 4. The config file for a mon daemon
200 (/var/lib/ceph/<fsid>/mon.<mon-id>/config) if it exists
201
202 5. Finally: fallback to the default file /etc/ceph/ceph.conf
203
204 bootstrap
205 Bootstrap a cluster on the local host. It deploys a MON and a MGR and
206 then also automatically deploys the monitoring stack on this host (see
207 --skip-monitoring-stack) and calls ceph orch host add $(hostname) (see
208 --skip-ssh).
209
210 Arguments:
211
212 • [--config CONFIG, -c CONFIG] ceph conf file to incorporate
213
214 • [--mon-id MON_ID] mon id (default: local hostname)
215
216 • [--mon-addrv MON_ADDRV] mon IPs (e.g., [v2:locali‐
217 paddr:3300,v1:localipaddr:6789])
218
219 • [--mon-ip MON_IP] mon IP
220
221 • [--mgr-id MGR_ID] mgr id (default: randomly generated)
222
223 • [--fsid FSID] cluster FSID
224
225 • [--log-to-file] configure cluster to log to tradi‐
226 tional log files
227
228 • [--single-host-defaults] configure cluster to run on a single
229 host
230
231 • [--output-dir OUTPUT_DIR] directory to write config, keyring,
232 and pub key files
233
234 • [--output-keyring OUTPUT_KEYRING] location to write keyring file with
235 new cluster admin and mon keys
236
237 • [--output-config OUTPUT_CONFIG] location to write conf file to con‐
238 nect to new cluster
239
240 • [--output-pub-ssh-key OUTPUT_PUB_SSH_KEY] location to write the clus‐
241 ter's public SSH key
242
243 • [--skip-ssh skip setup of ssh key on local host
244
245 • [--initial-dashboard-user INITIAL_DASHBOARD_USER] Initial user for
246 the dashboard
247
248 • [--initial-dashboard-password INITIAL_DASHBOARD_PASSWORD] Initial
249 password for the initial dashboard user
250
251 • [--ssl-dashboard-port SSL_DASHBOARD_PORT] Port number used to connect
252 with dashboard using SSL
253
254 • [--dashboard-key DASHBOARD_KEY] Dashboard key
255
256 • [--dashboard-crt DASHBOARD_CRT] Dashboard certificate
257
258 • [--ssh-config SSH_CONFIG] SSH config
259
260 • [--ssh-private-key SSH_PRIVATE_KEY] SSH private key
261
262 • [--ssh-public-key SSH_PUBLIC_KEY] SSH public key
263
264 • [--ssh-user SSH_USER] set user for SSHing to cluster hosts,
265 passwordless sudo will be needed for non-root users'
266
267 • [--skip-mon-network] set mon public_network based on boot‐
268 strap mon ip
269
270 • [--skip-dashboard] do not enable the Ceph Dashboard
271
272 • [--dashboard-password-noupdate] stop forced dashboard password change
273
274 • [--no-minimize-config] do not assimilate and minimize the
275 config file
276
277 • [--skip-ping-check] do not verify that mon IP is pingable
278
279 • [--skip-pull] do not pull the latest image before
280 bootstrapping
281
282 • [--skip-firewalld] Do not configure firewalld
283
284 • [--allow-overwrite] allow overwrite of existing --out‐
285 put-* config/keyring/ssh files
286
287 • [--allow-fqdn-hostname] allow hostname that is fully-quali‐
288 fied (contains ".")
289
290 • [--skip-prepare-host] Do not prepare host
291
292 • [--orphan-initial-daemons] Do not create initial mon, mgr, and
293 crash service specs
294
295 • [--skip-monitoring-stack] Do not automatically provision moni‐
296 toring stack] (prometheus, grafana, alertmanager, node-exporter)
297
298 • [--apply-spec APPLY_SPEC] Apply cluster spec after bootstrap
299 (copy ssh key, add hosts and apply services)
300
301 • [--registry-url REGISTRY_URL] url of custom registry to login to.
302 e.g. docker.io, quay.io
303
304 • [--registry-username REGISTRY_USERNAME] username of account to login
305 to on custom registry
306
307 • [--registry-password REGISTRY_PASSWORD] password of account to login
308 to on custom registry
309
310 • [--registry-json REGISTRY_JSON] JSON file containing registry login
311 info (see registry-login command documentation)
312
313 ceph-volume
314 Run ceph-volume inside a container:
315
316 cephadm ceph-volume inventory
317
318 Positional arguments: * [command] command
319
320 Arguments:
321
322 • [--fsid FSID] cluster FSID
323
324 • [--config-json CONFIG_JSON] JSON file with config and
325 (client.bootrap-osd) key
326
327 • [--config CONFIG, -c CONFIG] ceph conf file
328
329 • [--keyring KEYRING, -k KEYRING] ceph.keyring to pass through to the
330 container
331
332 check-host
333 check host configuration to be suitable for a Ceph cluster.
334
335 Arguments:
336
337 • [--expect-hostname EXPECT_HOSTNAME] Check that hostname matches an
338 expected value
339
340 deploy
341 deploy a daemon on the local host. Used by the orchestrator CLI:
342
343 cephadm shell -- ceph orch apply <type> ...
344
345 Arguments:
346
347 • [--name NAME] daemon name (type.id)
348
349 • [--fsid FSID] cluster FSID
350
351 • [--config CONFIG, -c CONFIG] config file for new daemon
352
353 • [--config-json CONFIG_JSON] Additional configuration information in
354 JSON format
355
356 • [--keyring KEYRING] keyring for new daemon
357
358 • [--key KEY] key for new daemon
359
360 • [--osd-fsid OSD_FSID] OSD uuid, if creating an OSD container
361
362 • [--skip-firewalld] Do not configure firewalld
363
364 • [--tcp-ports List of tcp ports to open in the host
365 firewall
366
367 • [--reconfig] Reconfigure a previously deployed daemon
368
369 • [--allow-ptrace] Allow SYS_PTRACE on daemon container
370
371 enter
372 Run an interactive shell inside a running daemon container:
373
374 cephadm enter --name mgr.myhost.ysubfo
375
376 Positional arguments: * [command] command
377
378 Arguments:
379
380 • [--fsid FSID] cluster FSID
381
382 • [--name NAME, -n NAME] daemon name (type.id)
383
384 install
385 install ceph package(s)
386
387 Positional arguments:
388
389 • [packages] packages
390
391 inspect-image
392 inspect local ceph container image.
393
394 list-networks
395 list IP networks
396
397 ls
398 list daemon instances known to cephadm on this host:
399
400 $ cephadm ls
401 [
402 {
403 "style": "cephadm:v1",
404 "name": "mgr.storage-14b-1.ysubfo",
405 "fsid": "5110cb22-8332-11ea-9148-0894ef7e8bdc",
406 "enabled": true,
407 "state": "running",
408 "container_id": "8562de72370a3836473ecfff8a22c9ccdd99815386b4692a2b30924fb5493c44",
409 "container_image_name": "docker.io/ceph/ceph:v15",
410 "container_image_id": "bc83a388465f0568dab4501fb7684398dca8b50ca12a342a57f21815721723c2",
411 "version": "15.2.1",
412 "started": "2020-04-21T01:16:41.831456",
413 "created": "2020-04-21T01:16:41.775024",
414 "deployed": "2020-04-21T01:16:41.415021",
415 "configured": "2020-04-21T01:16:41.775024"
416 },
417 ...
418
419 Arguments:
420
421 • [--no-detail] Do not include daemon status
422
423 • [--legacy-dir LEGACY_DIR] Base directory for legacy daemon data
424
425 logs
426 print journald logs for a daemon container:
427
428 cephadm logs --name mgr.myhost.ysubfo
429
430 This is similar to:
431
432 journalctl -u mgr.myhost.ysubfo
433
434 Can also specify additional journal arguments:
435
436 cephadm logs --name mgr.myhost.ysubfo -- -n 20 # last 20 lines
437 cephadm logs --name mgr.myhost.ysubfo -- -f # follow the log
438
439 Positional arguments:
440
441 • [command] command (optional)
442
443 Arguments:
444
445 • [--fsid FSID] cluster FSID
446
447 • [--name NAME, -n NAME] daemon name (type.id)
448
449 prepare-host
450 prepare a host for cephadm use
451
452 Arguments:
453
454 • [--expect-hostname EXPECT_HOSTNAME] Set hostname
455
456 pull
457 Pull the ceph image:
458
459 cephadm pull
460
461 registry-login
462 Give cephadm login information for an authenticated registry (url,
463 username and password). Cephadm will attempt to log the calling host
464 into that registry:
465
466 cephadm registry-login --registry-url [REGISTRY_URL] --registry-username [USERNAME]
467 --registry-password [PASSWORD]
468
469 Can also use a JSON file containing the login info formatted as:
470
471 {
472 "url":"REGISTRY_URL",
473 "username":"REGISTRY_USERNAME",
474 "password":"REGISTRY_PASSWORD"
475 }
476
477 and turn it in with command:
478
479 cephadm registry-login --registry-json [JSON FILE]
480
481 Arguments:
482
483 • [--registry-url REGISTRY_URL] url of registry to login to. e.g.
484 docker.io, quay.io
485
486 • [--registry-username REGISTRY_USERNAME] username of account to login
487 to on registry
488
489 • [--registry-password REGISTRY_PASSWORD] password of account to login
490 to on registry
491
492 • [--registry-json REGISTRY_JSON] JSON file containing login info for
493 custom registry
494
495 • [--fsid FSID] cluster FSID
496
497 rm-daemon
498 Remove a specific daemon instance
499
500 Arguments:
501
502 • [--name NAME, -n NAME] daemon name (type.id)
503
504 • [--fsid FSID] cluster FSID
505
506 • [--force] proceed, even though this may destroy valu‐
507 able data
508
509 • [--force-delete-data] delete valuable daemon data instead of making
510 a backup
511
512 rm-cluster
513 remove all daemons for a cluster
514
515 Arguments:
516
517 • [--fsid FSID] cluster FSID
518
519 • [--force] proceed, even though this may destroy valuable data
520
521 rm-repo
522 remove package repository configuration
523
524 run
525 run a ceph daemon, in a container, in the foreground
526
527 Arguments:
528
529 • [--name NAME, -n NAME] daemon name (type.id)
530
531 • [--fsid FSID] cluster FSID
532
533 shell
534 Run an interactive shell:
535
536 cephadm shell
537
538 Or one specific command inside a container:
539
540 cephadm shell -- ceph orch ls
541
542 Positional arguments:
543
544 • [command] command (optional)
545
546 Arguments:
547
548 • [--fsid FSID] cluster FSID
549
550 • [--name NAME, -n NAME] daemon name (type.id)
551
552 • [--config CONFIG, -c CONFIG] ceph.conf to pass through to the con‐
553 tainer
554
555 • [--keyring KEYRING, -k KEYRING] ceph.keyring to pass through to the
556 container
557
558 • [--mount MOUNT, -m MOUNT] mount a file or directory under /mnt
559 in the container
560
561 • [--env ENV, -e ENV] set environment variable
562
563 unit
564 Operate on the daemon's systemd unit.
565
566 Positional arguments:
567
568 • [command] systemd command (start, stop, restart, en‐
569 able, disable, ...)
570
571 Arguments:
572
573 • [--fsid FSID] cluster FSID
574
575 • [--name NAME, -n NAME] daemon name (type.id)
576
578 cephadm is part of Ceph, a massively scalable, open-source, distributed
579 storage system. Please refer to the documentation at
580 http://docs.ceph.com/ for more information.
581
583 ceph-volume(8),
584
586 2010-2022, Inktank Storage, Inc. and contributors. Licensed under Cre‐
587 ative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)
588
589
590
591
592dev Oct 18, 2022 CEPHADM(8)