openstack 管理三十九 - cinder 连接多个 ceph 存储方法

本文档介绍了如何在OpenStack中连接并管理多个Ceph存储集群作为Cinder后端。首先,详细说明了如何将两个Ceph集群的配置复制到Cinder服务器,并测试连接。然后,通过配置Cinder服务,添加新的volume类型和extra信息来实现连接。最后,进行了创建volume的验证,但提到Nova compute不支持直接连接两个不同的Ceph集群。
摘要由CSDN通过智能技术生成

环境说明

当前 openstack 使用正常
由于后端 ceph 存储容量已经超过 60%
不希望直接进行扩容, 因为会存在大量的数据迁移问题
新创建另外一个 ceph 集群, 并计划用于 openstack 成为一个新的 ceph 后端
旧的 ceph 集群称为 ceph-A, 使用中的 pool 为 volumes
新的 ceph 集群称为 ceph-B, 使用中的 pool 为 develop-ceph

目标

在 openstack 中, 同时连接到两个不同的 ceph backend

cinder server 配置

  1. ceph 连接配置
  2. cinder 服务配置
  3. 命令行对 cinder 服务进行管理
  4. 验证

ceph 连接配置

1.同时把两个 ceph 集群中的配置复制到 cinder 服务器 /etc/ceph 目录下, 定义成不同命名

[root@hh-yun-db-129041 ceph]# tree `pwd`
/etc/ceph
├── ceph.client.admin-develop.keyring      <- ceph-B 集群中的 admin key
├── ceph.client.admin-volumes.keyring      <- ceph-A 集群中的 admin key
├── ceph.client.developcinder.keyring      <- ceph-B 集群中的用户 developcinder key
├── ceph.client.cinder.keyring             <- ceph-A 集群中的 cinder key
├── ceph.client.mon-develop.keyring        <- ceph-B 集群中的 mon key
├── ceph.client.mon-volumes.keyring        <- ceph-A 集群中的 mon key
├── ceph-develop.conf                      <- ceph-B 集群配置文件(包含了 mon 地址等集群信息)
└── ceph-volumes.conf                      <- ceph-B 集群配置文件(包含了 mon 地址等集群信息)

这里需要注意, clinet.client.(username).keyring 必须要与连接 ceph 的合法用户命名一致, 否则 cinder server 端, 无法正确获得权限

2.命令行下, 测试连接不同的 ceph 后端测试

ceph-A 连接测试

[root@hh-yun-db-129041 ceph]# ceph -c ceph-volumes.conf -k ceph.client.admin-volumes.keyring -s
		cluster xxx-xxx-xxxx-xxxx-xxxx
		 health HEALTH_OK
		 monmap e3: 5 mons at {hh-yun-ceph-cinder015-128055=240.30.128.55:6789/0,hh-yun-ceph-cinder017-128057=240.30.128.57:6789/0,hh-yun-ceph-cinder024-128074=240.30.128.74:6789/0,hh-yun-ceph-cinder025-128075=240.30.128.75:6789/0,hh-yun-ceph-cinder026-128076=240.30.128.76:6789/0}, election epoch 452, quorum 0,1,2,3,4 hh-yun-ceph-cinder015-128055,hh-yun-ceph-cinder017-128057,hh-yun-ceph-cinder024-128074,hh-yun-ceph-cinder025-128075,hh-yun-ceph-cinder026-128076
		 osdmap e170088: 226 osds: 226 up, 226 in
			pgmap v50751302: 20544 pgs, 2 pools, 157 TB data, 40687 kobjects
						474 TB used, 376 TB / 850 TB avail
							 20537 active+clean
									 7 active+clean+scrubbing+deep
	client io 19972 kB/s rd, 73591 kB/s wr, 3250 op/s

ceph-B 连接测试

[root@hh-yun-db-129041 ceph]# ceph -c ceph-dev
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Terry_Tsang

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值