Linux command
cephadm 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Bootstrap
sudo cephadm bootstrap --mon-ip [monitor_ip]
Add
sudo cephadm add-host [hostname] [ip_address]
Deploy
sudo cephadm deploy [service_type] --name [service_name]
Example
sudo cephadm shell -- ceph -s
Example
sudo cephadm shell
Remove
sudo cephadm rm-service [service_type] --name [service_name]
说明
cephadm deploys and manages Ceph distributed storage clusters using containers (Podman preferred, Docker supported). It is the modern orchestration tool for Ceph, replacing older deployment methods like ceph-deploy and ceph-ansible. The tool handles the complete cluster lifecycle: bootstrapping a new cluster on a single node, adding hosts, deploying daemons (monitors, OSDs, managers, gateways), and upgrading the cluster. Each Ceph daemon runs in its own container, providing isolation and simplified upgrades. The `bootstrap` command creates an initial single-node cluster with a monitor and manager, generates admin credentials, and sets up the orchestrator for subsequent operations. The `shell` command provides an interactive environment inside a Ceph container with all management tools available.
参数
- --mon-ip _ip_
- Monitor IP address for bootstrap
- --cluster-network _CIDR_
- Restrict the OSD replication network to the given subnet.
- --ssh-user _USER_
- User cephadm should SSH to remote hosts as (default `root`).
- --initial-dashboard-user, --initial-dashboard-password
- Credentials for the Ceph Dashboard created during bootstrap.
- --skip-dashboard
- Do not enable the dashboard.
- --fsid _UUID_
- Reuse an existing cluster FSID instead of generating one.
- --name _name_
- Service or daemon name
- --image _image_
- Container image to use
- --docker
- Force the use of Docker instead of Podman.
- -v, --verbose
- Increase logging verbosity.
FAQ
What is the cephadm command used for?
cephadm deploys and manages Ceph distributed storage clusters using containers (Podman preferred, Docker supported). It is the modern orchestration tool for Ceph, replacing older deployment methods like ceph-deploy and ceph-ansible. The tool handles the complete cluster lifecycle: bootstrapping a new cluster on a single node, adding hosts, deploying daemons (monitors, OSDs, managers, gateways), and upgrading the cluster. Each Ceph daemon runs in its own container, providing isolation and simplified upgrades. The `bootstrap` command creates an initial single-node cluster with a monitor and manager, generates admin credentials, and sets up the orchestrator for subsequent operations. The `shell` command provides an interactive environment inside a Ceph container with all management tools available.
How do I run a basic cephadm example?
Run `sudo cephadm bootstrap --mon-ip [monitor_ip]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --mon-ip _ip_ do in cephadm?
Monitor IP address for bootstrap