配置其他机器能使用ceph命令

只需要两部

1
2
3
4
5
# 在节点安装ceph-common,ceph-common包会提供ceph命令并在etc下创建ceph目录
apt install ceph-common -y
# 拷贝密钥交互文件到对应节点
scp /etc/ceph/ceph.conf ceph-2:/etc/ceph/ # 将ceph.conf文件传输至对应节点
scp /etc/ceph/ceph.client.admin.keyring ceph-2:/etc/ceph/ # 将密钥文件传输至对应节点

image-20230530171052047

验证

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[root@test ~]# ceph -s
2023-06-01 11:15:02.900897 7f8d883e2700 0 -- :/42479157 >> 10.0.0.200:6789/0 pipe(0x7f8d8405d730 sd=3 :0 s=1 pgs=0 cs=0 l=1 c=0x7f8d8405d500).fault
2023-06-01 11:15:05.913306 7f8d89be5700 0 monclient: hunting for new mon
cluster:
id: e5c405ae-cff3-43e0-88f9-8d7b197ef05e
health: HEALTH_OK

services:
mon: 1 daemons, quorum ceph1 (age 17h)
mgr: ceph1(active, since 43h), standbys: ceph2, ceph3
osd: 3 osds: 3 up (since 42h), 3 in (since 42h)

data:
pools: 0 pools, 0 pgs
objects: 0 objects, 0 B
usage: 3.0 GiB used, 27 GiB / 30 GiB avail
pgs:

image-20230601111428856

此时即可使用ceph命令。