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.
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]
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 Copied! Toggle word wrap Toggle overflow - Example
cephadm adopt --style=legacy --name prometheus.host02
[root@host01 ~]# cephadm adopt --style=legacy --name prometheus.host02
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
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 likelvm
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]
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 Copied! Toggle word wrap Toggle overflow - Example
cephadm ceph-volume inventory --fsid f64f341c-655d-11eb-8778-fa163e914bcc
[root@nhost01 ~]# cephadm ceph-volume inventory --fsid f64f341c-655d-11eb-8778-fa163e914bcc
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
check-host
- Description
- Check the host configuration that is suitable for a Ceph cluster.
- Syntax
cephadm check-host [--expect-hostname HOSTNAME]
cephadm check-host [--expect-hostname HOSTNAME]
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Example
cephadm check-host --expect-hostname host02
[root@host01 ~]# cephadm check-host --expect-hostname host02
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
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]
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 Copied! Toggle word wrap Toggle overflow - Example
cephadm shell deploy mon --fsid f64f341c-655d-11eb-8778-fa163e914bcc
[root@host01 ~]# cephadm shell deploy mon --fsid f64f341c-655d-11eb-8778-fa163e914bcc
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
enter
- Description
- Run an interactive shell inside a running daemon container.
- Syntax
cephadm enter [-h] [--fsid FSID] --name NAME [command [command …]]
cephadm enter [-h] [--fsid FSID] --name NAME [command [command …]]
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Example
cephadm enter --name 52c611f2b1d9
[root@host01 ~]# cephadm enter --name 52c611f2b1d9
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
help
- Description
-
View all the commands supported by
cephadm
. - Syntax
cephadm help
cephadm help
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Example
cephadm help
[root@host01 ~]# cephadm help
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
install
- Description
- Install the packages.
- Syntax
cephadm install PACKAGES
cephadm install PACKAGES
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Example
cephadm install ceph-common ceph-osd
[root@host01 ~]# cephadm install ceph-common ceph-osd
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
inspect-image
- Description
- Inspect the local Ceph container image.
- Syntax
cephadm --image IMAGE_ID inspect-image
cephadm --image IMAGE_ID inspect-image
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Example
cephadm --image 13ea90216d0be03003d12d7869f72ad9de5cec9e54a27fd308e01e467c0d4a0a inspect-image
[root@host01 ~]# cephadm --image 13ea90216d0be03003d12d7869f72ad9de5cec9e54a27fd308e01e467c0d4a0a inspect-image
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
list-networks
- Description
- List the IP networks.
- Syntax
cephadm list-networks
cephadm list-networks
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Example
cephadm list-networks
[root@host01 ~]# cephadm list-networks
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
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]
cephadm ls [--no-detail] [--legacy-dir LEGACY_DIR]
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Example
cephadm ls --no-detail
[root@host01 ~]# cephadm ls --no-detail
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
logs
- Description
-
Print
journald
logs for a daemon container. This is similar to thejournalctl
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
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 Copied! Toggle word wrap Toggle overflow - Example
cephadm logs --fsid 57bddb48-ee04-11eb-9962-001a4a000672 --name osd.8 cephadm logs --fsid 57bddb48-ee04-11eb-9962-001a4a000672 --name osd.8 -- -n 20 cephadm logs --fsid 57bddb48-ee04-11eb-9962-001a4a000672 --name osd.8 -- -f
[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 Copied! Toggle word wrap Toggle overflow
prepare-host
- Description
-
Prepare a host for
cephadm
. - Syntax
cephadm prepare-host [--expect-hostname HOSTNAME]
cephadm prepare-host [--expect-hostname HOSTNAME]
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Example
cephadm prepare-host cephadm prepare-host --expect-hostname host01
[root@host01 ~]# cephadm prepare-host [root@host01 ~]# cephadm prepare-host --expect-hostname host01
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
pull
- Description
- Pull the Ceph image.
- Syntax
cephadm [-h] [--image IMAGE_ID] pull
cephadm [-h] [--image IMAGE_ID] pull
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Example
cephadm --image 13ea90216d0be03003d12d7869f72ad9de5cec9e54a27fd308e01e467c0d4a0a pull
[root@host01 ~]# cephadm --image 13ea90216d0be03003d12d7869f72ad9de5cec9e54a27fd308e01e467c0d4a0a pull
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
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]
cephadm registry-login --registry-url [REGISTRY_URL] --registry-username [USERNAME] --registry-password [PASSWORD] [--fsid FSID] [--registry-json JSON_FILE]
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Example
cephadm registry-login --registry-url registry.redhat.io --registry-username myuser1 --registry-password mypassword1
[root@host01 ~]# cephadm registry-login --registry-url registry.redhat.io --registry-username myuser1 --registry-password mypassword1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can also use a JSON registry file containing the login info formatted as:
- Syntax
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Example
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
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, thecephadm 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]
cephadm rm-daemon [--fsid FSID] [--name DAEMON_NAME] [--force ] [--force-delete-data]
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Example
cephadm rm-daemon --fsid f64f341c-655d-11eb-8778-fa163e914bcc --name osd.8
[root@host01 ~]# cephadm rm-daemon --fsid f64f341c-655d-11eb-8778-fa163e914bcc --name osd.8
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
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, thecephadm
orchestrator just redeploys them there. - Syntax
cephadm rm-cluster [--fsid FSID] [--force]
cephadm rm-cluster [--fsid FSID] [--force]
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Example
cephadm rm-cluster --fsid f64f341c-655d-11eb-8778-fa163e914bcc
[root@host01 ~]# cephadm rm-cluster --fsid f64f341c-655d-11eb-8778-fa163e914bcc
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ImportantTo better clean up the node as part of performing the cluster removal, cluster logs under
/var/log/ceph
directory are deleted whencephadm rm-cluster
command is run. The cluster logs are removed as long as--keep-logs
is not passed to therm-cluster
command.NoteIf 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
# ceph mgr module disable cephadm
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
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]
cephadm rm-repo [-h]
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Example
cephadm rm-repo
[root@host01 ~]# cephadm rm-repo
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
run
- Description
- Run a Ceph daemon, in a container, in the foreground.
- Syntax
cephadm run [--fsid FSID] --name DAEMON_NAME
cephadm run [--fsid FSID] --name DAEMON_NAME
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Example
cephadm run --fsid f64f341c-655d-11eb-8778-fa163e914bcc --name osd.8
[root@host01 ~]# cephadm run --fsid f64f341c-655d-11eb-8778-fa163e914bcc --name osd.8
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
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]
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 Copied! Toggle word wrap Toggle overflow - Example
cephadm shell -- ceph orch ls cephadm shell
[root@host01 ~]# cephadm shell -- ceph orch ls [root@host01 ~]# cephadm shell
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
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
cephadm unit [--fsid FSID] --name DAEMON_NAME start/stop/restart/enable/disable
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Example
cephadm unit --fsid f64f341c-655d-11eb-8778-fa163e914bcc --name osd.8 start
[root@host01 ~]# cephadm unit --fsid f64f341c-655d-11eb-8778-fa163e914bcc --name osd.8 start
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
version
- Description
- Provides the version of the storage cluster.
- Syntax
cephadm version
cephadm version
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Example
cephadm version
[root@host01 ~]# cephadm version
Copy to Clipboard Copied! Toggle word wrap Toggle overflow