Deploying OSD Nodes
Deploy OSD nodes as follows.
- Perform operations in this section only on ceph1.
- Configure OSD nodes based on Configuring OSD Nodes.
- When using ceph-deploy to operate the Ceph cluster, run the commands in the /root/ceph-mycluster/ directory.
Deploying OSD Nodes
- Deploy OSD nodes according to drive status. To query drive status, refer to Configuring OSD Nodes. Run the following commands on the servers where the OSD nodes are to be deployed. /dev/sdb, /dev/nvme0n1, and /dev/nvme1n1 on ceph1 are used as examples.
1 2 3
cd /root/ceph-mycluster/ ceph-deploy disk zap ceph1 /dev/sdb ceph-deploy osd create ceph1 --data /dev/sdb
(Optional) Add DB and WAL partitions to improve write performance. DB and WAL are usually deployed on an NVMe SSD to improve write performance. If you want to use this configuration, set the --block-wal and --block-db parameters in addition to adding the /dev/sdb data drive.
1 2 3 4 5
cd /root/ceph-mycluster/ ceph-deploy disk zap ceph1 /dev/sdb ceph-deploy disk zap ceph1 /dev/nvme0n1p1 ceph-deploy disk zap ceph1 /dev/nvme1n1p1 ceph-deploy osd create ceph1 --data /dev/sdb --block-wal /dev/nvme0n1p1 --block-db /dev/nvme1n1p1
- Check whether all OSD nodes are in the up state.
1ceph -sThe following information is displayed:cluster: id: 0207ddea-2150-4509-860d-365e87420b3e health: HEALTH_OK services: mon: 3 daemons, quorum ceph1,ceph2,ceph3 (age 25h) mgr: ceph1(active, since 2d), standbys: ceph2, ceph3 osd: 1 osds: 1 up(since 2s), 1 in(since 2s)
- ceph-deploy disk zap is used to clear the target drive. In this command:
- ${node} specifies the host name of the node.
- ceph-deploy osd create is used to generate OSD nodes. In this command:
- ${node} specifies the host name of the node.
- --data specifies the data drive.
- --block-db specifies the DB partition.
- --block-wal specifies the WAL partition.
DB and WAL partitions are usually deployed on an NVMe SSD to improve write performance. If no NVMe SSD is configured or NVMe SSDs are used as data drives, you do not need to specify --block-db and --block-wal. You only need to specify --data.
- For details about how to quickly deploy multiple OSD nodes, see How Do I Quickly Deploy Multiple OSD Nodes?.
- ceph-deploy disk zap is used to clear the target drive. In this command:
Parent topic: Installing Ceph and Deploying Nodes