|
环境说明当前 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 + t3 j: q2 n W, g
8 m# u! J% D7 m8 h" D: h8 x' ^: v' F+ {( N5 ^
health HEALTH_OK
8 _! c4 R) n6 T# }; N5 Q! f" O1 H+ c/ U$ t3 x* b- a
9 l; p7 A, `% G) {. O' r1 I; X% c4 W2 _
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 6 @0 [& l& u! p+ f1 q
3 v- n! q, u7 i- ~; |
/ T) W+ F3 [; ~7 p& A' N osdmap e170088: 226 osds: 226 up, 226 in
" [& u. H& B- v5 @* L
$ w& I t9 r6 V b1 J9 y/ [# L, F: q4 p: [% e* R/ B
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/ b% l. u' D: [* K
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 8 S+ c- e* b+ r& q! \; C9 }
% N. \( b' [/ l! o( `+ e5 m 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
$ A% u& Q) K* ]8 c) B/ o( b& ^' e6 R. P: g! t
0 k0 h3 A) X) v4 \& S osdmap e559: 264 osds: 264 up, 264 in flags sortbitwise q6 p& J! V0 w3 U
: m' F6 g" ^* f8 m
& W f8 `" A# T: |7 V$ u+ A
pgmap v116751: 12400 pgs, 9 pools, 1636 bytes data, 171 objects 25091 MB used, 1440 TB / 1440 TB avail 12400 active+clean
; [6 y( M' c: n7 O& j- `; Ocinder 配置对 cinder 服务端进行配置 /etc/cinder/cinder.conf / W& k7 M( P |
enabled_backends=CEPH_SATA,CEPH_DEVELOP...# x; }3 p) D. L9 [4 H
[CEPH_SATA]
. d& | C0 j1 O% Y: x* c9 ^: Aglance_api_version=2" g3 ]5 I1 u) |
( R! P$ k# I, _% r( bvolume_backend_name=ceph_sata# \5 ^% }* q; h) z1 N
9 e9 p$ K" b0 y5 T
rbd_ceph_conf=/etc/ceph/ceph-volumes.conf$ u( U* g* |8 r6 `* _$ ~+ O7 t
: k3 J: P5 Z5 V( b. Z& J6 H
rbd_user=cinder
, e D2 b& g0 W3 X9 a" s0 ^9 F+ g/ W
rbd_flatten_volume_from_snapshot=False
* S2 a$ z" i& l
" i: a/ \3 y* S- y" m; `, Qrados_connect_timeout=-1, _ W) a) R; v2 z$ Q1 A
/ A5 g4 H$ L! g/ l6 D! E
rbd_max_clone_depth=5
6 I# u! {3 {* x, [( m) E6 L; f# Q( @5 x7 A2 r: Z
volume_driver=cinder.volume.drivers.rbd.RBDDriver, F: C- C. h; [4 U* w8 N9 d' ^
' O" M; q. a! X* Mrbd_store_chunk_size=4: D4 A$ G) B% r1 Y8 b7 D
, S- u; K {( drbd_secret_uuid=dc4f91c1-8792-4948-b68f-2fcea75f53b
& `. ]0 U! W( U( F
" M# @. @' v5 T: X: e1 x/ frbd_pool=volumeshost=cinder.vclound.com
/ A1 ^$ l6 q5 p0 n
: Y0 U% Q } ^ ]) {[CEPH-new_volumes]
# Q! V9 u" r6 v: p7 E' f
8 X% }- k5 T- _, N, P: nglance_api_version=20 ^! x% r8 y: R" V
% a E" ?/ q9 H7 Q4 z3 @7 q' E; evolume_backend_name=ceph-new_volumes0 g; ]2 G2 V$ u: [# e/ o" T$ b% n
/ m0 x2 ?- N3 T- t+ z l" qrbd_ceph_conf=/etc/ceph/ceph-new_volumes.conf
3 c+ Z4 }" h3 H' t8 p+ o
# P- |! c& ?) e" `% Q. Mrbd_user=cinder, M$ o6 b y7 X
) n$ g1 B1 S. Z% K' C3 S8 Crbd_flatten_volume_from_snapshot=False
( {! R7 W5 W- X A& @% D& W* s& S0 P1 ^4 h# B3 N0 t1 H* C! W
rados_connect_timeout=-1
1 p6 }5 F& K9 R) D0 A# g
$ h& Q6 s1 I2 \4 Grbd_max_clone_depth=5* N3 p0 D- J- t$ W
- i- H) M+ b7 U V; C* E
volume_driver=cinder.volume.drivers.rbd.RBDDriver, m' h& z8 O- L, w2 \' m) \
! `2 G I$ P& M5 } ~, Y1 Trbd_store_chunk_size=47 ~5 G# n& r/ c$ w/ E/ H; r' T
: U- M$ N: X" Q6 j8 a& ^) erbd_secret_uuid=4bf07d3e-a289-456d-9bd9-5a89832b4131 R9 I7 c J9 i4 q/ N1 b; M
4 p2 L* Z1 i3 G$ Q4 W, {9 z. p9 V: w
rbd_pool=new_volumes
: d; ?* u% ~4 w3 P/ ]. R9 w
6 w5 _/ O( k& Y+ H# H1 R- r7 hhost=cinder.vclound.com$ w3 F Q3 k9 O- Y$ l4 x" {! ]
1 o! ]( A6 p$ d. f; P1 Q |