|
环境说明当前 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 ) q, X: e2 O) ^( z
/ B8 h. t3 t$ c/ P- ~' _7 r+ c/ w
: V3 Z: j1 c, C, M: Q
health HEALTH_OK
) s3 P# `6 N5 ]0 |: h0 }0 N$ D. \9 L0 N, {" o
4 S4 [- K% W7 R) c" Y 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
8 N. `* H4 h9 _5 V# `4 o. P" s
# H& s' k, y- j- G4 X$ c5 g% F8 p- U8 e: F# |' ~4 m/ b2 b8 J
osdmap e170088: 226 osds: 226 up, 226 in
) n8 [% }1 k' h" {7 e
8 E- e8 d; d9 [ G0 r! Z
2 m: q B/ {6 N% ~ 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
5 E0 O' k; e6 e) l, g2 F) Iceph-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
# s% w( z7 D; C! ]1 ?* h + S, J0 C; k( \6 H
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 t1 R) L% p1 [
$ S! s! W0 z. j& z2 ]+ N! X+ N% ~* E% q9 z' G
osdmap e559: 264 osds: 264 up, 264 in flags sortbitwise 5 N; f) F$ y% b+ ^9 B
; z( r3 W) d% E; O; Q% T
$ u) g! l; {2 D$ M1 w pgmap v116751: 12400 pgs, 9 pools, 1636 bytes data, 171 objects 25091 MB used, 1440 TB / 1440 TB avail 12400 active+clean
9 R- v* O& o4 F5 a& Tcinder 配置对 cinder 服务端进行配置 /etc/cinder/cinder.conf
( B, b6 P: ~) E3 ^& P1 m7 K$ s! a enabled_backends=CEPH_SATA,CEPH_DEVELOP..., m& [, b0 X3 A' K! g8 @
[CEPH_SATA]
4 b" j+ K5 s4 D8 \8 j5 u& zglance_api_version=2
* [& O# p; j+ r/ N/ G# M4 |# Z' d1 j& [# @: L& {# s
volume_backend_name=ceph_sata
5 G j, W y8 w: t1 N4 ~8 Z7 v" }
/ X0 \1 n" O% F0 Erbd_ceph_conf=/etc/ceph/ceph-volumes.conf
4 M2 G0 D2 y: r; s5 E+ U: A5 |8 h1 `- m! o* k- J" H: H6 G: i4 V5 T5 [
rbd_user=cinder- k- N3 ]# r5 I2 D5 F/ t: J* F
$ U I2 R. [, X) W4 Erbd_flatten_volume_from_snapshot=False% B1 E" z* d6 R: M' M3 j
7 t. x+ D" u7 j
rados_connect_timeout=-1- ^4 \" t) o7 M5 }
. x8 s: H0 ^4 {/ b
rbd_max_clone_depth=5 C3 }0 P/ S4 W5 m r: K
$ }- P3 q( B9 q+ {0 M/ N" W
volume_driver=cinder.volume.drivers.rbd.RBDDriver
0 C. I! g/ t9 z* z0 H
8 d; J$ B2 B9 J# ~' Lrbd_store_chunk_size=4! b3 w. X6 H' F2 X2 }9 t! ]
# t0 m& p# s5 Crbd_secret_uuid=dc4f91c1-8792-4948-b68f-2fcea75f53b% J6 r; d' \6 o% E: [6 B# r9 c
' N8 F: o) G$ ^9 A, jrbd_pool=volumeshost=cinder.vclound.com
) V, Z8 z: E. B3 W/ V- k2 }: D# j$ }: Z" y" _5 Q0 e
[CEPH-new_volumes]! l& c& w, m3 _9 F/ Y1 `& w" a
/ k" Y B/ t" U! u. Y
glance_api_version=2
, R) B! F) K+ s- `) h# A; i
3 ?# `' h! v( Y" X( P4 N) mvolume_backend_name=ceph-new_volumes: O0 E+ S/ T6 e) m; `' _
0 O& N4 q, v0 A4 \6 x6 k9 Urbd_ceph_conf=/etc/ceph/ceph-new_volumes.conf
# {! i" U3 j! ^$ @; u0 F
# X; @+ r& q7 s# M1 G4 q/ y" Xrbd_user=cinder5 j; s# x% B# ]* G2 {) z% h
|) I& I1 z- v+ \
rbd_flatten_volume_from_snapshot=False
" v) t: j8 [8 `3 I5 O& E. u: D+ b) S* s5 U! j
rados_connect_timeout=-1 \+ @7 C. T8 _) y& i
9 r' D i: ^; ]) j' @ Frbd_max_clone_depth=5
" w, x0 ?7 {5 n ]) |& C3 A& Y6 @0 ?
volume_driver=cinder.volume.drivers.rbd.RBDDriver
/ ?5 z% z6 M* D, Y
0 \0 W$ E* {, V: Z, Q* E# srbd_store_chunk_size=4! c8 l4 ~6 Q0 c* H( X1 Q
% \! B! o$ z' [0 W" G2 w8 j
rbd_secret_uuid=4bf07d3e-a289-456d-9bd9-5a89832b413) ^8 A! N+ Q) @$ t w
5 X" f& e/ l# p0 t' qrbd_pool=new_volumes
. D+ f7 R6 u9 q8 M! o6 [! U T: N% i: t: u' \2 e. O9 G8 r5 v
host=cinder.vclound.com
3 K3 j+ t& X$ r0 a5 v0 @* `( K- `
|