环境说明
当前 openstack 使用正常
由于后端 ceph 存储容量已经超过 60%
不希望直接进行扩容, 因为会存在大量的数据迁移问题
新创建另外一个 ceph 集群, 并计划用于 openstack 成为一个新的 ceph 后端
旧的 ceph 集群称为 ceph-A, 使用中的 pool 为 volumes
新的 ceph 集群称为 ceph-B, 使用中的 pool 为 develop-ceph
目标
在 openstack 中, 同时连接到两个不同的 ceph backend
cinder server 配置
- ceph 连接配置
- cinder 服务配置
- 命令行对 cinder 服务进行管理
- 验证
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