Este conteúdo não está disponível no idioma selecionado.

Appendix B. The cephadm commands


The cephadm is a command line tool to manage the local host for the Cephadm Orchestrator. It provides commands to investigate and modify the state of the current host.

Some of the commands are generally used for debugging.

Note

cephadm is not required on all hosts, however, it is useful when investigating a particular daemon. The cephadm-ansible-preflight playbook installs cephadm on all hosts and the cephadm-ansible purge playbook requires cephadm be installed on all hosts to work properly.

adopt
Description
Convert an upgraded storage cluster daemon to run cephadm.
Syntax
cephadm adopt [-h] --name DAEMON_NAME --style STYLE [--cluster CLUSTER] --legacy-dir [LEGACY_DIR] --config-json CONFIG_JSON] [--skip-firewalld] [--skip-pull]
Copy to Clipboard Toggle word wrap
Example
[root@host01 ~]# cephadm adopt --style=legacy --name prometheus.host02
Copy to Clipboard Toggle word wrap
ceph-volume
Description
This command is used to list all the devices on the particular host. Run the ceph-volume command inside a container Deploys OSDs with different device technologies like lvm or physical disks using pluggable tools and follows a predictable, and robust way of preparing, activating, and starting OSDs.
Syntax
cephadm ceph-volume inventory/simple/raw/lvm [-h] [--fsid FSID] [--config-json CONFIG_JSON] [--config CONFIG, -c CONFIG] [--keyring KEYRING, -k KEYRING]
Copy to Clipboard Toggle word wrap
Example
[root@nhost01 ~]# cephadm ceph-volume inventory --fsid f64f341c-655d-11eb-8778-fa163e914bcc
Copy to Clipboard Toggle word wrap
check-host
Description
Check the host configuration that is suitable for a Ceph cluster.
Syntax
cephadm check-host [--expect-hostname HOSTNAME]
Copy to Clipboard Toggle word wrap
Example
[root@host01 ~]# cephadm check-host --expect-hostname host02
Copy to Clipboard Toggle word wrap
deploy
Description
Deploys a daemon on the local host.
Syntax
cephadm shell deploy DAEMON_TYPE [-h] [--name DAEMON_NAME] [--fsid FSID] [--config CONFIG, -c CONFIG] [--config-json CONFIG_JSON] [--keyring KEYRING] [--key KEY] [--osd-fsid OSD_FSID] [--skip-firewalld] [--tcp-ports TCP_PORTS] [--reconfig] [--allow-ptrace] [--memory-request MEMORY_REQUEST] [--memory-limit MEMORY_LIMIT] [--meta-json META_JSON]
Copy to Clipboard Toggle word wrap
Example
[root@host01 ~]# cephadm shell deploy mon --fsid f64f341c-655d-11eb-8778-fa163e914bcc
Copy to Clipboard Toggle word wrap
enter
Description
Run an interactive shell inside a running daemon container.
Syntax
cephadm enter [-h] [--fsid FSID] --name NAME [command [command …]]
Copy to Clipboard Toggle word wrap
Example
[root@host01 ~]# cephadm enter --name 52c611f2b1d9
Copy to Clipboard Toggle word wrap
help
Description
View all the commands supported by cephadm.
Syntax
cephadm help
Copy to Clipboard Toggle word wrap
Example
[root@host01 ~]# cephadm help
Copy to Clipboard Toggle word wrap
install
Description
Install the packages.
Syntax
cephadm install PACKAGES
Copy to Clipboard Toggle word wrap
Example
[root@host01 ~]# cephadm install ceph-common ceph-osd
Copy to Clipboard Toggle word wrap
inspect-image
Description
Inspect the local Ceph container image.
Syntax
cephadm --image IMAGE_ID inspect-image
Copy to Clipboard Toggle word wrap
Example
[root@host01 ~]# cephadm --image 13ea90216d0be03003d12d7869f72ad9de5cec9e54a27fd308e01e467c0d4a0a inspect-image
Copy to Clipboard Toggle word wrap
list-networks
Description
List the IP networks.
Syntax
cephadm list-networks
Copy to Clipboard Toggle word wrap
Example
[root@host01 ~]# cephadm list-networks
Copy to Clipboard Toggle word wrap
ls
Description
List daemon instances known to cephadm on the hosts. You can use --no-detail for the command to run faster, which gives details of the daemon name, fsid, style, and systemd unit per daemon. You can use --legacy-dir option to specify a legacy base directory to search for daemons.
Syntax
cephadm ls [--no-detail] [--legacy-dir LEGACY_DIR]
Copy to Clipboard Toggle word wrap
Example
[root@host01 ~]# cephadm ls --no-detail
Copy to Clipboard Toggle word wrap
logs
Description
Print journald logs for a daemon container. This is similar to the journalctl command.
Syntax
cephadm logs [--fsid FSID] --name DAEMON_NAME
cephadm logs [--fsid FSID] --name DAEMON_NAME -- -n NUMBER # Last N lines
cephadm logs [--fsid FSID] --name DAEMON_NAME -- -f # Follow the logs
Copy to Clipboard Toggle word wrap
Example
[root@host01 ~]# cephadm logs --fsid 57bddb48-ee04-11eb-9962-001a4a000672 --name osd.8
[root@host01 ~]# cephadm logs --fsid 57bddb48-ee04-11eb-9962-001a4a000672 --name osd.8 -- -n 20
[root@host01 ~]# cephadm logs --fsid 57bddb48-ee04-11eb-9962-001a4a000672 --name osd.8 -- -f
Copy to Clipboard Toggle word wrap
prepare-host
Description
Prepare a host for cephadm.
Syntax
cephadm prepare-host [--expect-hostname HOSTNAME]
Copy to Clipboard Toggle word wrap
Example
[root@host01 ~]# cephadm prepare-host
[root@host01 ~]# cephadm prepare-host --expect-hostname host01
Copy to Clipboard Toggle word wrap
pull
Description
Pull the Ceph image.
Syntax
cephadm [-h] [--image IMAGE_ID] pull
Copy to Clipboard Toggle word wrap
Example
[root@host01 ~]# cephadm --image 13ea90216d0be03003d12d7869f72ad9de5cec9e54a27fd308e01e467c0d4a0a pull
Copy to Clipboard Toggle word wrap
registry-login
Description
Give cephadm login information for an authenticated registry. Cephadm attempts to log the calling host into that registry.
Syntax
cephadm registry-login --registry-url [REGISTRY_URL] --registry-username [USERNAME] --registry-password [PASSWORD] [--fsid FSID] [--registry-json JSON_FILE]
Copy to Clipboard Toggle word wrap
Example
[root@host01 ~]# cephadm registry-login --registry-url registry.redhat.io --registry-username myuser1 --registry-password mypassword1
Copy to Clipboard Toggle word wrap

You can also use a JSON registry file containing the login info formatted as:

Syntax
cat REGISTRY_FILE

{
 "url":"REGISTRY_URL",
 "username":"REGISTRY_USERNAME",
 "password":"REGISTRY_PASSWORD"
}
Copy to Clipboard Toggle word wrap
Example
[root@host01 ~]# cat registry_file

{
 "url":"registry.redhat.io",
 "username":"myuser",
 "password":"mypass"
}

[root@host01 ~]# cephadm registry-login -i registry_file
Copy to Clipboard Toggle word wrap
rm-daemon
Description
Remove a specific daemon instance. If you run the cephadm rm-daemon command on the host directly, although the command removes the daemon, the cephadm mgr module notices that the daemon is missing and redeploys it. This command is problematic and should be used only for experimental purposes and debugging.
Syntax
cephadm rm-daemon [--fsid FSID] [--name DAEMON_NAME] [--force ] [--force-delete-data]
Copy to Clipboard Toggle word wrap
Example
[root@host01 ~]# cephadm rm-daemon --fsid f64f341c-655d-11eb-8778-fa163e914bcc --name osd.8
Copy to Clipboard Toggle word wrap
rm-cluster
Description
Remove all the daemons from a storage cluster on that specific host where it is run. Similar to rm-daemon, if you remove a few daemons this way and the Ceph Orchestrator is not paused and some of those daemons belong to services that are not unmanaged, the cephadm orchestrator just redeploys them there.
Syntax
cephadm rm-cluster [--fsid FSID] [--force]
Copy to Clipboard Toggle word wrap
Example
[root@host01 ~]# cephadm rm-cluster --fsid f64f341c-655d-11eb-8778-fa163e914bcc
Copy to Clipboard Toggle word wrap
Important

To better clean up the node as part of performing the cluster removal, cluster logs under /var/log/ceph directory are deleted when cephadm rm-cluster command is run. The cluster logs are removed as long as --keep-logs is not passed to the rm-cluster command.

Note

If the cephadm rm-cluster command is run on a host that is part of an existing cluster where the host is managed by Cephadm and the Cephadm Manager module is still enabled and running, then Cephadm might immediately start deploying new daemons, and more logs could appear. To avoid this, disable the cephadm mgr module before purging the cluster.

# ceph mgr module disable cephadm
Copy to Clipboard Toggle word wrap
rm-repo
Description
Remove a package repository configuration. This is mainly used for the disconnected installation of Red Hat Ceph Storage.
Syntax
cephadm rm-repo [-h]
Copy to Clipboard Toggle word wrap
Example
[root@host01 ~]# cephadm rm-repo
Copy to Clipboard Toggle word wrap
run
Description
Run a Ceph daemon, in a container, in the foreground.
Syntax
cephadm run [--fsid FSID] --name DAEMON_NAME
Copy to Clipboard Toggle word wrap
Example
[root@host01 ~]# cephadm run --fsid f64f341c-655d-11eb-8778-fa163e914bcc --name osd.8
Copy to Clipboard Toggle word wrap
shell
Description
Run an interactive shell with access to Ceph commands over the inferred or specified Ceph cluster. You can enter the shell using the cephadm shell command and run all the orchestrator commands within the shell.
Syntax
cephadm shell  [--fsid FSID] [--name DAEMON_NAME, -n DAEMON_NAME] [--config CONFIG, -c CONFIG] [--mount MOUNT, -m MOUNT] [--keyring KEYRING, -k KEYRING] [--env ENV, -e ENV]
Copy to Clipboard Toggle word wrap
Example
[root@host01 ~]# cephadm shell -- ceph orch ls
[root@host01 ~]# cephadm shell
Copy to Clipboard Toggle word wrap
unit
Description
Start, stop, restart, enable, and disable the daemons with this operation. This operates on the daemon’s systemd unit.
Syntax
cephadm unit [--fsid FSID] --name DAEMON_NAME start/stop/restart/enable/disable
Copy to Clipboard Toggle word wrap
Example
[root@host01 ~]# cephadm unit --fsid f64f341c-655d-11eb-8778-fa163e914bcc --name osd.8 start
Copy to Clipboard Toggle word wrap
version
Description
Provides the version of the storage cluster.
Syntax
cephadm version
Copy to Clipboard Toggle word wrap
Example
[root@host01 ~]# cephadm version
Copy to Clipboard Toggle word wrap
Voltar ao topo
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2025 Red Hat