|
环境说明当前 openstack环境正常使用由于后端 ceph 存储容量已经超过 85%不想直接进行扩容, 因为会有大量的数据迁移新创建一个独立的ceph 集群, 并计划用于 openstack 现有环境成为一个新的 ceph后端旧的 ceph 集群称为 ceph-A, 使用中的 pool 为 volumes新的 ceph 集群称为 ceph-B, 使用中的 pool 为 new_volumes目标在 openstack 中, 同时连接到两个不同的 ceph backendcinder server 配置1. ceph 连接配置2. 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 f" v% A& V; V- J5 v) y8 ]* O
& F4 E- Z/ i5 k7 K) `$ s
+ Y5 F6 V; e) b" L4 _4 Z/ i f
health HEALTH_OK
3 D8 g2 m( m: E2 h
9 L# I1 e2 U8 C6 p2 t
; ?* U1 \5 t' X/ i2 r" V M. Q; L 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 % P' w8 K4 F2 f* R% { O% N" g
1 x: A9 |) D9 ~$ C" s7 e1 a1 e
/ {$ b) l Z2 A osdmap e170088: 226 osds: 226 up, 226 in
n- N' f0 {7 a% n. U, j' P# ?5 j
2 @2 Z4 W& V# u( Q }' ^ M 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
1 ?- k. y! N3 n+ w' `6 ~# h5 G% n* ?ceph-B 连接测试 [root@hh-yun-db-129041 ceph]# ceph -c ceph-develop.conf -k ceph.client.admin-develop.keyring -s cluster 4bf07d3e-a289-456d-9bd9-5a89832b413b : n) ]+ q" t$ \5 S5 _9 u" _; _
/ ~! D3 _* ] B
health HEALTH_OK monmap e1: 5 mons at {240.30.128.214=240.30.128.214:6789/0,240.30.128.215=240.30.128.215:6789/0,240.30.128.39=240.30.128.39:6789/0,240.30.128.40=240.30.128.40:6789/0,240.30.128.58=240.30.128.58:6789/0} election epoch 6, quorum 0,1,2,3,4 240.30.128.39,240.30.128.40,240.30.128.58,240.30.128.214,240.30.128.215
* R. \* i6 n* N. u) V' M. \
# m9 A7 j. J' Q% ]2 h! X( [* Q$ K" C/ { D% H+ [1 t' I; o
osdmap e559: 264 osds: 264 up, 264 in flags sortbitwise / U' e# I# n, t3 P, o# L
: M* `+ q% v I# k% A$ B- D! f% E& @- ^* ^7 h7 M9 K; n
pgmap v116751: 12400 pgs, 9 pools, 1636 bytes data, 171 objects 25091 MB used, 1440 TB / 1440 TB avail 12400 active+clean
+ V5 n5 L6 E7 z- jcinder 配置对 cinder 服务端进行配置 /etc/cinder/cinder.conf
+ f" o6 g9 e' ]2 f enabled_backends=CEPH_SATA,CEPH_DEVELOP...
w V( `: U3 x( r$ c; ` y% |[CEPH_SATA]1 x9 r- R2 B. k* q6 o1 C% O1 q0 G
glance_api_version=2
8 t) J+ X. Z* V9 G" x$ u6 ~$ Z! w$ S ]* I$ b* d- H9 Z
volume_backend_name=ceph_sata
% T0 \2 H# A% @$ S, R) V
5 T4 s' {! x+ frbd_ceph_conf=/etc/ceph/ceph-volumes.conf2 h: a( S& J: f" P( T1 X
, O% W4 N6 d& ^& c1 i r6 w7 jrbd_user=cinder
$ d8 @ y( T5 f5 T( U# G: q5 o! p; x: C
rbd_flatten_volume_from_snapshot=False
% }1 L6 T0 q; z0 V q2 O! j, S3 ]2 r# c' Y' [7 j, T A/ f) ^% n
rados_connect_timeout=-1% R5 k7 v# M- t9 H. r8 F
`5 p( e/ L, e8 e" a3 ~rbd_max_clone_depth=5
`! a/ z/ i3 V5 x
* u7 D6 t* r0 K0 Mvolume_driver=cinder.volume.drivers.rbd.RBDDriver/ Y4 s% {# M* L1 _
% v- u0 f- ]9 t% ?) K! T. `/ yrbd_store_chunk_size=45 {* O P: k6 O, |8 e
& h+ h! _; x( \3 w- O5 U6 \
rbd_secret_uuid=dc4f91c1-8792-4948-b68f-2fcea75f53b
, F7 F" [6 c8 l9 h6 o2 S' m
4 D& P: f; f8 b- W% Krbd_pool=volumeshost=cinder.vclound.com; |" V2 t& f$ ~8 n
2 L/ h: I! h; w0 a* M Q
[CEPH-new_volumes]' G3 i2 |# A( |5 ~
, o/ q. d7 `, g$ |! I% K$ O, T
glance_api_version=2
1 m( c# p% W2 h6 R2 W9 t! I( f% x7 _; |9 I( B
volume_backend_name=ceph-new_volumes
& p$ n4 g7 T) H* y5 r& Y) c$ F* j& T, L5 t5 u. G8 |( w, M
rbd_ceph_conf=/etc/ceph/ceph-new_volumes.conf, M ?* ?1 R$ U: Y9 O
+ f; K6 a# r8 H" S$ h8 S* ]- x
rbd_user=cinder' ~: Q8 Q, O0 | B
2 _2 l# E5 C: n6 n0 _8 c4 }
rbd_flatten_volume_from_snapshot=False8 B2 C+ R+ c! t# i
' {9 V; ? k! m! y
rados_connect_timeout=-19 E& V& N. F; J) d$ t& }
+ O0 }8 e3 @. z2 g- Z
rbd_max_clone_depth=5) v4 Q$ O9 W1 R& e
3 M5 _" A- o" m" Z2 K0 T6 d) kvolume_driver=cinder.volume.drivers.rbd.RBDDriver
4 `2 h% U2 @7 F! n2 @1 C. v/ I% r) W% A/ U
rbd_store_chunk_size=4
5 b5 ~3 U. P8 y% [/ P
* S m# L9 c* n3 N& @8 S, srbd_secret_uuid=4bf07d3e-a289-456d-9bd9-5a89832b413- o: y1 p+ i5 c6 B& A
. K6 ~2 _2 u3 ?/ J3 b; Q& f& T
rbd_pool=new_volumes9 J9 t/ m& Q0 l3 J" v& K7 Y
+ \! W7 f7 w5 S1 y9 ]* Xhost=cinder.vclound.com
. C& C5 A2 J1 V" V9 r
3 V1 p o6 N6 d9 a# L |