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 Example 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 Example check-host Description Check the host configuration that is suitable for a Ceph cluster. Syntax Example deploy Description Deploys a daemon on the local host. Syntax Example enter Description Run an interactive shell inside a running daemon container. Syntax Example help Description View all the commands supported by cephadm . Syntax Example install Description Install the packages. Syntax Example inspect-image Description Inspect the local Ceph container image. Syntax Example list-networks Description List the IP networks. Syntax Example 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 Example logs Description Print journald logs for a daemon container. This is similar to the journalctl command. Syntax Example prepare-host Description Prepare a host for cephadm . Syntax Example pull Description Pull the Ceph image. Syntax Example registry-login Description Give cephadm login information for an authenticated registry. Cephadm attempts to log the calling host into that registry. Syntax Example You can also use a JSON registry file containing the login info formatted as: Syntax Example 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 Example 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 Example rm-repo Description Remove a package repository configuration. This is mainly used for the disconnected installation of Red Hat Ceph Storage. Syntax Example run Description Run a Ceph daemon, in a container, in the foreground. Syntax Example 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 Example unit Description Start, stop, restart, enable, and disable the daemons with this operation. This operates on the daemon's systemd unit. Syntax Example version Description Provides the version of the storage cluster. Syntax Example

Commands:
cephadm adopt [-h] --name DAEMON_NAME --style STYLE [--cluster CLUSTER ] --legacy-dir [ LEGACY_DIR ] --config-json CONFIG_JSON ] [--skip-firewalld] [--skip-pull]
cephadm adopt --style=legacy --name prometheus.host02
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 --fsid f64f341c-655d-11eb-8778-fa163e914bcc
cephadm check-host [--expect-hostname HOSTNAME ]
cephadm check-host --expect-hostname host02
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 mon --fsid f64f341c-655d-11eb-8778-fa163e914bcc
cephadm enter [-h] [--fsid FSID ] --name NAME [command [command ...]]
cephadm enter --name 52c611f2b1d9
cephadm help
cephadm help
cephadm install PACKAGES
cephadm install ceph-common ceph-osd
cephadm --image IMAGE_ID inspect-image
cephadm --image 13ea90216d0be03003d12d7869f72ad9de5cec9e54a27fd308e01e467c0d4a0a inspect-image
cephadm list-networks
cephadm list-networks
cephadm ls [--no-detail] [--legacy-dir LEGACY_DIR ]
cephadm ls --no-detail
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 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
cephadm prepare-host [--expect-hostname HOSTNAME ]
cephadm prepare-host cephadm prepare-host --expect-hostname host01
cephadm [-h] [--image IMAGE_ID ] pull
cephadm --image 13ea90216d0be03003d12d7869f72ad9de5cec9e54a27fd308e01e467c0d4a0a pull
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.redhat.io --registry-username myuser1 --registry-password mypassword1
cat REGISTRY_FILE { "url":" REGISTRY_URL ", "username":" REGISTRY_USERNAME ", "password":" REGISTRY_PASSWORD " }
cat registry_file { "url":"registry.redhat.io", "username":"myuser", "password":"mypass" } cephadm registry-login -i registry_file
cephadm rm-daemon [--fsid FSID ] [--name DAEMON_NAME ] [--force ] [--force-delete-data]
cephadm rm-daemon --fsid f64f341c-655d-11eb-8778-fa163e914bcc --name osd.8
cephadm rm-cluster [--fsid FSID ] [--force]
cephadm rm-cluster --fsid f64f341c-655d-11eb-8778-fa163e914bcc
cephadm rm-repo [-h]
cephadm rm-repo
cephadm run [--fsid FSID ] --name DAEMON_NAME
cephadm run --fsid f64f341c-655d-11eb-8778-fa163e914bcc --name osd.8
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 -- ceph orch ls cephadm shell
cephadm unit [--fsid FSID ] --name DAEMON_NAME start/stop/restart/enable/disable
cephadm unit --fsid f64f341c-655d-11eb-8778-fa163e914bcc --name osd.8 start
cephadm version
cephadm version