For the complete documentation index, see llms.txt. This page is also available as Markdown.

Cài đặt Ceph Cluster

Bước 1: Cần cái Cài đặt các chương trình tiên quyết:

  • Python 3

  • Systemd

  • Podman or Docker for running containers

  • Time synchronization (such as Chrony or the legacy ntpd)

  • LVM2 for provisioning storage devices

Step2: Install Cephadm

· In Ubuntu:

apt install -y cephadm

· In CentOS Stream:

dnf search release-ceph &#xNAN;dnf install --assumeyes centos-release-ceph-quincy &#xNAN;dnf install --assumeyes cephadm

Step3: Create cephadmin user, pull ceph component images

useradd -m cephadmin

ssh-keygen -t rsa -b 4096 -C "cephadm@yourhostname"

docker pull quay.io/ceph/ceph:v17

docker pull quay.io/prometheus/node-exporter:v1.5.0

Step4: Running the bootstrap Command (running on admin node)

cephadm --image quay.io/ceph/ceph:v17 bootstrap \ --cluster-network 10.237.123.0/24 \ --mon-ip 10.237.123.11 \ --ssh-user cephadmin \ --ssh-private-key /home/cephadmin/.ssh/id_rsa \ --ssh-public-key /home/cephadmin/.ssh/authorized_keys \ --initial-dashboard-user admin \ --initial-dashboard-password "admin@storage" --skip-pull

Step5: Enable CEPH CLI

apt install ceph-common

Confirm that the ceph command is accessible with:

ceph -v

Confirm that the ceph command can connect to the cluster and also its status with:

ceph status

Step6: Adding host

ceph orch host add lab-vcloudstack-cehp012 10.237.123.12 mon mgr osd ceph orch host add lab-vcloudstack-cehp013 10.237.123.13 mon mgr osd

Step7: Adding OSD

· Print a list of devices discovered by cephadm, run command:

ceph orch device ls

· Check hardware support libstoragemgmt:

cephadm shell lsmcli ldl

· Check disk rotation (SSD: rotate =0, HDD: rotate =1) &#xNAN;lsblk -o name,rota

· Apply osd spec

ceph orch apply -i osd_spec.yaml

· Add available device to cluster:

ceph orch apply osd --all-available-devices

Step8: Create and Configure Crush RULE

· Create crush rule

ceph osd crush add-bucket ssd-01 root

ceph osd crush add-bucket ssd-02 root

ceph osd crush move lab-vcloudstack-cehp013 root=ssd-01

ceph osd crush move lab-vcloudstack-cehp012 root=ssd-01

Last updated