---
title: 配置Cinder集成Ceph
description: "需要在OpenStack上修改Cinder配置文件，从而配置Cinder集成Ceph。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengcpfs/ecosystemEnable/OpenStack/kunpengopenstacktrainceph_04_011.html
sourcePath: /source/zh/kunpengcpfs/ecosystemEnable/OpenStack/kunpengopenstacktrainceph_04_011.html
indexId: c35b2992a6eb208b831009679b0dba4a4aaa40d700d802c1db9f3fd7322154bb86
---
# 配置Cinder集成Ceph

需要在OpenStack上修改Cinder配置文件，从而配置Cinder集成Ceph。

1. 在OpenStack存储节点（Cinder节点）上，修改配置文件“/etc/cinder/cinder.conf”。

  a. 打开文件。

```
vi /etc/cinder/cinder.conf
```


  b. 按“i”进入编辑模式，修改并新增以下内容。

```
[DEFAULT]
#enabled_backends = lvm
enabled_backends = ceph
[ceph]
volume_driver = cinder.volume.drivers.rbd.RBDDriver
volume_backend_name = ceph
rbd_pool = volumes
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
rbd_user = cinder
rbd_secret_uuid =
b3d5fee6-839c-482e-b244-668bad7128a9
```


    在配置enabled_backends参数时，需要注释或者删除其他enabled_backends的配置项。 请将rbd_secret_uuid的值修改为向libvirt添加密钥时生成的UUID。


  c. 按“Esc”键退出编辑模式，输入:wq!，按“Enter”键保存并退出文件。
2. 在OpenStack存储节点（Cinder节点）上，重启cinder-volume服务。

```
systemctl restart openstack-cinder-volume.service
```
