多雲數據管理深度實踐中 | 配置OpenSDS多後端(LVM、Cinder、Ceph)

上篇文章咱們經過Ansible安裝了OpenSDS,本文咱們繼續深刻了解OpenSDS,相信細心的童鞋會發現咱們上篇在簡短介紹OpenSDS的時候說到了能夠納管本地異構存儲,因此咱們本文將講述如何配置多後端,爲了充分展示咱們選擇了本地LVM,OpenStack的Cinder以及Ceph分佈式存儲做爲多後端來測試。git


LVM咱們在上文安裝的時候已經默認配置了,Cinder和Ceph的話必須保證兩個存儲環境已經存在,同時保證OpenSDS節點與他們可以網絡互通。github


配置多後端express

vi /etc/opensds/opensds.confapache

[ceph]後端

name = ceph網絡

description = This is a ceph backend serviceapp

driver_name = cephless

config_path = /etc/opensds/driver/ceph.yamldom


[cinder]分佈式

name = cinder

description = This is a cinder backend service

driver_name = cinder

config_path = /etc/opensds/driver/cinder.yaml


配置Ceph和Cinder的yaml文件

root@opensds:/etc/opensds/driver# cat ceph.yaml 

# Copyright 2018 The OpenSDS Authors.

#

# Licensed under the Apache License, Version 2.0 (the "License");

# you may not use this file except in compliance with the License.

# You may obtain a copy of the License at

#

#     http://www.apache.org/licenses/LICENSE-2.0

#

# Unless required by applicable law or agreed to in writing, software

# distributed under the License is distributed on an "AS IS" BASIS,

# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

# See the License for the specific language governing permissions and

# limitations under the License.


configFile: /etc/ceph/ceph.conf

pool:

  osdsrbd: # change pool name same to ceph pool

    storageType: block

    availabilityZone: default

    extras:

      dataStorage:

        provisioningPolicy: Thin

        compression: true

        deduplication: true

      ioConnectivity:

        accessProtocol: rbd

        maxIOPS: 6000000

        minIOPS: 1000000

        maxBWS: 500

        minBWS: 100

        latency: 100

      advanced:

        diskType: SSD

        latency: 5ms


root@opensds:/etc/opensds/driver# cat cinder.yaml 

# Copyright 2018 The OpenSDS Authors.

#

# Licensed under the Apache License, Version 2.0 (the "License");

# you may not use this file except in compliance with the License.

# You may obtain a copy of the License at

#

#     http://www.apache.org/licenses/LICENSE-2.0

#

# Unless required by applicable law or agreed to in writing, software

# distributed under the License is distributed on an "AS IS" BASIS,

# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

# See the License for the specific language governing permissions and

# limitations under the License.


authOptions:

  noAuth: false

  #endpoint: "http://{your_real_host_ip}/identity"

  endpoint: "http://{your_real_host_ip}/v3"

  #cinderEndpoint: "http://{your_real_host_ip}/v2"

  cinderEndpoint: "http://{your_real_host_ip}/v2/7c56fea7577b41d880b51365a26fd220"

#  domainId: "Default"

  domainName: "Default"

#  username: "cinder"

  username: "admin"

  password: "9t8FDKUoWzbxHm8EpttP7wh5saecp92SMlBj8iTh"

 # password: "fwE#F7$cDd%43^2f"

  #password: "aaaaaa"

  # Whether to encrypt the password. If enabled, the value of the password must be ciphertext.

  EnableEncrypted: false

  # Encryption and decryption tool. Default value is aes. The decryption tool can only decrypt the corresponding ciphertext.

  PwdEncrypter: "aes"

  tenantId: "7c56fea7577b41d880b51365a26fd220"

  tenantName: "admin"

pool:

  "ceph@rbd-1#rbd-1":

#  "rbd-1":

    storageType: block

    availabilityZone: default

    extras:

      dataStorage:

        provisioningPolicy: Thin

        isSpaceEfficient: false

      ioConnectivity:

        accessProtocol: iscsi

        maxIOPS: 7000000

        maxBWS: 600

      advanced:

        diskType: SSD

        latency: 3ms



安裝Ceph-Commd依賴

apt-get install ceph-common -y

#同時把Ceph環境的ceph.conf和ceph.client.admin.keyring拷貝到OpenSDS環境的/etc/ceph下


ceph -s

檢測下是否成功


配置完成以後咱們到Dashboard能夠看到多個後端已經展現出來了,有時候可能不顯示,可是數據已經顯示了,這多是個bug,我已經提交給社區了。

https://github.com/sodafoundation/opensds/issues/1240

QQ20200228-103036@2x.png

WX20200226-164041@2x.png


接下來咱們到Dashbord配置Cinder和Ceph的profile

8C46FA99-2BDC-4D5E-A4EF-DFE2C07A5178.png

QQ20200228-102219@2x.png


建立Volume測試下是否能夠

QQ20200228-102444@2x.png

OK,能夠看到我建立了三個測試的卷,均已成功,那個default就是lvm。


接下來咱們在增長一個Ceph 對象存儲,操做步驟是在首頁點擊那個添加按鈕,而後配置rgw相關信息。

QQ20200228-102852@2x.png

QQ20200228-103259@2x.png

QQ20200228-103317@2x.png

相關文章
相關標籤/搜索