From a5a79a9da1f08fa0c39e9054f503206d4a24c691 Mon Sep 17 00:00:00 2001 From: iProbe Date: Sun, 25 Jun 2023 21:57:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20'=E5=AD=98=E5=82=A8/ceph/p?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=AE=89=E8=A3=85/7-=E6=B7=BB=E5=8A=A0ceph?= =?UTF-8?q?=E8=8A=82=E7=82=B9.md'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 存储/ceph/p版本安装/7-添加ceph节点.md | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 存储/ceph/p版本安装/7-添加ceph节点.md diff --git a/存储/ceph/p版本安装/7-添加ceph节点.md b/存储/ceph/p版本安装/7-添加ceph节点.md new file mode 100644 index 0000000..1afee1b --- /dev/null +++ b/存储/ceph/p版本安装/7-添加ceph节点.md @@ -0,0 +1,37 @@ +> 将ceph镜像导出到其他ceph节点上 +```shell +# docker images  |grep -v "REPOSITORY" |awk '{print $1":"$2}' |xargs docker save -o ceph-images.tar +# for i in {2..5};do scp ceph-images.tar ceph0$i:/root/;done + +## 在ceph02-05上导入镜像 +# docker load -i ceph-images.tar +``` +> +> 将ceph.pub公钥拷贝到其他ceph节点 +```shell +# ssh-copy-id -f -i /etc/ceph/ceph.pub ceph02 +# ssh-copy-id -f -i /etc/ceph/ceph.pub ceph03 +# ssh-copy-id -f -i /etc/ceph/ceph.pub ceph04 +# ssh-copy-id -f -i /etc/ceph/ceph.pub ceph05 + +## 也可以用以下命令拷贝,在ceph01上操作 +# for i in {2..5};do ssh-copy-id -f -i /etc/ceph/ceph.pub ceph0$i;done +``` +> 使用cephadm将主机添加到存储集群中,执行添加节点命令后,会在目标节点拉到ceph/node-exporter镜像,需要一定时间,所以可提前在节点上将镜像导入。 +```shell +# cephadm shell ceph orch host add ceph02 192.168.59.242 --labels=mon,mgr +# ceph orch host add ceph03 192.168.59.243 --labels=mon +# ceph orch host add ceph04 192.168.59.244 +# ceph orch host add ceph05 192.168.59.245 +``` +> 查看加入到集群的节点 +```shell +# ceph orch host ls +HOST    ADDR            LABELS   STATUS   +ceph01  192.168.59.241  _admin           +ceph02  192.168.59.242  mon mgr           +ceph03  192.168.59.243  mon               +ceph04  192.168.59.244                   +ceph05  192.168.59.245                   +5 hosts in cluster +``` \ No newline at end of file