官术网_书友最值得收藏!

How to do it...

In the last recipe, we learned to configure Glance to use Ceph. In this recipe, we will learn to use the Ceph RBD with the Cinder service of OpenStack:

  1. Since in this demonstration we are not using multiple backend cinder configurations, comment the enabled_backends option from the /etc/cinder/cinder.conf file:
  2. Navigate to the options defined in cinder.volume.drivers.rbd section of the /etc/cinder/cinder.conf file and add the following (replace the secret UUID with your environments value):
        volume_driver = cinder.volume.drivers.rbd.RBDDriver
rbd_pool = volumes
rbd_user = cinder
rbd_secret_uuid = e279566e-bc97-46d0-bd90-68080a2a0ad8
rbd_ceph_conf = /etc/ceph/ceph.conf
rbd_flatten_volume_from_snapshot = false
rbd_max_clone_depth = 5
rbd_store_chunk_size = 4
rados_connect_timeout = -1
glance_api_version = 2
  1. Execute the following command to verify the previous entries:
        # cat /etc/cinder/cinder.conf | egrep "rbd|rados|version" | 
grep -v "#"
  1. Comment enabled_backend=lvm option in /etc/cinder/cinder.conf:
  1. Restart the OpenStack Cinder services:
        # service openstack-cinder-volume restart
  1. Source the keystone_admin files for OpenStack:
        # source /root/keystonerc_admin
# cinder list
  1. To test this configuration, create your first Cinder volume of 2 GB, which should now be created on your Ceph cluster:
        # cinder create --display-name ceph-volume01 
--display-description "Cinder volume on CEPH storage" 2
  1. Check the volume by listing the Cinder and Ceph volumes pool:
        # cinder list
 # rbd -p volumes ls --id cinder
        # rbd info volumes/volume-7443e2b6-0674-4950-9371-49094a1702a7 
--id cinder
  1. Similarly, try creating another volume using the OpenStack horizon dashboard.
主站蜘蛛池模板: 东乡族自治县| 宿迁市| 勐海县| 托克托县| 乌兰浩特市| 邹平县| 牡丹江市| 夹江县| 德江县| 南丹县| 宜宾市| 潮州市| 潮州市| 逊克县| 轮台县| 确山县| 河北省| 沙坪坝区| 宁阳县| 曲周县| 西充县| 平昌县| 遂昌县| 大姚县| 梨树县| 涞水县| 乐安县| 从江县| 滦平县| 诏安县| 蓬安县| 历史| 介休市| 岱山县| 德保县| 贡嘎县| 鹤峰县| 西昌市| 澄迈县| 石林| 丰台区|