1CEPHADM(8)                           Ceph                           CEPHADM(8)
2
3
4

NAME

6       cephadm - manage the local cephadm host
7

SYNOPSIS

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 --image IMAGE_NAME 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

DESCRIPTION

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

OPTIONS

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

COMMANDS

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.bootstrap-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. From Reef onward, requires specify‐
393       ing the image to inspect with --image:
394
395          cephadm --image IMAGE_NAME inspect-image
396
397   list-networks
398       list IP networks
399
400   ls
401       list daemon instances known to cephadm on this host:
402
403          $ cephadm ls
404          [
405              {
406                  "style": "cephadm:v1",
407                  "name": "mgr.storage-14b-1.ysubfo",
408                  "fsid": "5110cb22-8332-11ea-9148-0894ef7e8bdc",
409                  "enabled": true,
410                  "state": "running",
411                  "container_id": "8562de72370a3836473ecfff8a22c9ccdd99815386b4692a2b30924fb5493c44",
412                  "container_image_name": "docker.io/ceph/ceph:v15",
413                  "container_image_id": "bc83a388465f0568dab4501fb7684398dca8b50ca12a342a57f21815721723c2",
414                  "version": "15.2.1",
415                  "started": "2020-04-21T01:16:41.831456",
416                  "created": "2020-04-21T01:16:41.775024",
417                  "deployed": "2020-04-21T01:16:41.415021",
418                  "configured": "2020-04-21T01:16:41.775024"
419              },
420          ...
421
422       Arguments:
423
424       • [--no-detail]             Do not include daemon status
425
426       • [--legacy-dir LEGACY_DIR] Base directory for legacy daemon data
427
428   logs
429       print journald logs for a daemon container:
430
431          cephadm logs --name mgr.myhost.ysubfo
432
433       This is similar to:
434
435          journalctl -u mgr.myhost.ysubfo
436
437       Can also specify additional journal arguments:
438
439          cephadm logs --name mgr.myhost.ysubfo -- -n 20 # last 20 lines
440          cephadm logs --name mgr.myhost.ysubfo -- -f # follow the log
441
442       Positional arguments:
443
444       • [command]               command (optional)
445
446       Arguments:
447
448       • [--fsid FSID]           cluster FSID
449
450       • [--name NAME, -n NAME]  daemon name (type.id)
451
452   prepare-host
453       prepare a host for cephadm use
454
455       Arguments:
456
457       • [--expect-hostname EXPECT_HOSTNAME] Set hostname
458
459   pull
460       Pull the ceph image:
461
462          cephadm pull
463
464   registry-login
465       Give  cephadm  login  information  for  an authenticated registry (url,
466       username and password).  Cephadm will attempt to log the  calling  host
467       into that registry:
468
469          cephadm registry-login --registry-url [REGISTRY_URL] --registry-username [USERNAME]
470                                 --registry-password [PASSWORD]
471
472       Can also use a JSON file containing the login info formatted as:
473
474          {
475           "url":"REGISTRY_URL",
476           "username":"REGISTRY_USERNAME",
477           "password":"REGISTRY_PASSWORD"
478          }
479
480       and turn it in with command:
481
482          cephadm registry-login --registry-json [JSON FILE]
483
484       Arguments:
485
486       • [--registry-url  REGISTRY_URL]    url  of  registry to login to. e.g.
487         docker.io, quay.io
488
489       • [--registry-username REGISTRY_USERNAME] username of account to  login
490         to on registry
491
492       • [--registry-password  REGISTRY_PASSWORD] password of account to login
493         to on registry
494
495       • [--registry-json REGISTRY_JSON] JSON file containing login  info  for
496         custom registry
497
498       • [--fsid FSID]                   cluster FSID
499
500   rm-daemon
501       Remove a specific daemon instance
502
503       Arguments:
504
505       • [--name NAME, -n NAME]  daemon name (type.id)
506
507       • [--fsid FSID]           cluster FSID
508
509       • [--force]                proceed,  even though this may destroy valu‐
510         able data
511
512       • [--force-delete-data]   delete valuable daemon data instead of making
513         a backup
514
515   rm-cluster
516       remove all daemons for a cluster
517
518       Arguments:
519
520       • [--fsid FSID]  cluster FSID
521
522       • [--force]      proceed, even though this may destroy valuable data
523
524   rm-repo
525       remove package repository configuration
526
527   run
528       run a ceph daemon, in a container, in the foreground
529
530       Arguments:
531
532       • [--name NAME, -n NAME]  daemon name (type.id)
533
534       • [--fsid FSID]           cluster FSID
535
536   shell
537       Run an interactive shell:
538
539          cephadm shell
540
541       Or one specific command inside a container:
542
543          cephadm shell -- ceph orch ls
544
545       Positional arguments:
546
547       • [command]               command (optional)
548
549       Arguments:
550
551       • [--fsid FSID]                   cluster FSID
552
553       • [--name NAME, -n NAME]          daemon name (type.id)
554
555       • [--config CONFIG, -c CONFIG]    ceph.conf to pass through to the con‐
556         tainer
557
558       • [--keyring KEYRING, -k KEYRING] ceph.keyring to pass through  to  the
559         container
560
561       • [--mount  MOUNT, -m MOUNT]       mount a file or directory under /mnt
562         in the container
563
564       • [--env ENV, -e ENV]             set environment variable
565
566   unit
567       Operate on the daemon's systemd unit.
568
569       Positional arguments:
570
571       • [command]               systemd command (start,  stop,  restart,  en‐
572         able, disable, ...)
573
574       Arguments:
575
576       • [--fsid FSID]           cluster FSID
577
578       • [--name NAME, -n NAME]  daemon name (type.id)
579

AVAILABILITY

581       cephadm is part of Ceph, a massively scalable, open-source, distributed
582       storage   system.   Please    refer    to    the    documentation    at
583       http://docs.ceph.com/ for more information.
584

SEE ALSO

586       ceph-volume(8),
587
589       2010-2023,  Inktank Storage, Inc. and contributors. Licensed under Cre‐
590       ative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)
591
592
593
594
595dev                              Nov 15, 2023                       CEPHADM(8)
Impressum