- Ceph Cookbook
- Karan Singh
- 280字
- 2021-07-16 13:01:20
Configuring Cinder for Ceph backend
The Cinder program of OpenStack provides block storage to virtual machines. In this recipe, we will configure OpenStack Cinder to use Ceph as a storage backend. OpenStack Cinder requires a driver to interact with the Ceph block device. On the OpenStack node, edit the /etc/cinder/cinder.conf
configuration file by adding the code snippet given in the following section.
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:
- Since in this demonstration we are not using multiple backend cinder configurations, comment the
enabled_backends
option from the/etc/cinder/cinder.conf
file: - Navigate to the Options defined in cinder.volume.drivers.rbd section of the
/etc/cinder/cinder.conf
file and add the following (replace the secretuuid
with your environments value):volume_driver = cinder.volume.drivers.rbd.RBDDriver rbd_pool = volumes rbd_user = cinder rbd_secret_uuid = bb90381e-a4c5-4db7-b410-3154c4af486e 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
- Execute the following command to verify the previous entries:
# cat /etc/cinder/cinder.conf | egrep "rbd|rados|version" | grep -v "#"
- Restart the OpenStack cinder services:
# service openstack-cinder-volume restart
- Source the
keystone_admin
files for OpenStack:# source /root/keystonerc_admin # cinder list
- 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
- Check the volume by listing the cinder and Ceph volumes pool:
# cinder list # rados -p volumes --name client.cinder --keyring ceph.client.cinder.keyring ls | grep -i id
- Similarly, try creating another volume using the OpenStack Horizon dashboard.
推薦閱讀
- Design Principles for Process:driven Architectures Using Oracle BPM and SOA Suite 12c
- TestNG Beginner's Guide
- Securing WebLogic Server 12c
- QGIS:Becoming a GIS Power User
- Scala謎題
- 大數(shù)據(jù)分析與應(yīng)用實戰(zhàn):統(tǒng)計機器學(xué)習(xí)之?dāng)?shù)據(jù)導(dǎo)向編程
- 深入分布式緩存:從原理到實踐
- Mastering Xamarin.Forms(Second Edition)
- Linux C編程:一站式學(xué)習(xí)
- C# Multithreaded and Parallel Programming
- Learning Node.js for .NET Developers
- Visual FoxPro 6.0程序設(shè)計
- Docker:容器與容器云(第2版)
- HTML5與CSS3權(quán)威指南
- 算法超簡單:趣味游戲帶你輕松入門與實踐