Deploy ceph cluster on three linux servers

Install Ceph packages on each server:


sudo apt-get update
sudo apt-get install ceph-deploy

Create a Ceph cluster on a server:


mkdir my-ceph-cluster
cd my-ceph-cluster
ceph-deploy new <第一台服务器的主机名>

Install Ceph packages and dependencies on each server:


ceph-deploy install --release octopus <第一台服务器的主机名> <第二台服务器的主机名> <第三台服务器的主机名>

Initialize Ceph monitors on each server:


ceph-deploy mon create-initial

Add OSD nodes on each server:


ceph-deploy osd create --data /dev/sdb <第一台服务器的主机名>
ceph-deploy osd create --data /dev/sdb <第二台服务器的主机名>
ceph-deploy osd create --data /dev/sdb <第三台服务器的主机名>

Generate Ceph configuration files and keys on one server:


ceph-deploy admin <第一台服务器的主机名>

Copy the Ceph configuration files and keys to the correct location on each server:


sudo cp ceph.client.admin.keyring /etc/ceph/
sudo cp ceph.conf /etc/ceph/
sudo chown ceph:ceph /etc/ceph/ceph.client.admin.keyring

Start the Ceph service on each server:

sudo systemctl enable ceph-mon.target
sudo systemctl enable ceph-osd.target
sudo systemctl start ceph-mon.target
sudo systemctl start ceph-osd.target

Create a Ceph storage pool on a server:

ceph osd pool create my-pool 128 128

Verify the status of the Ceph cluster:

ceph -s

Guess you like

Origin blog.csdn.net/qq_45206551/article/details/133305143