---
title: 集成块存储
description: "在OpenStack上集成Ceph块存储，需要在Ceph存储节点上进行操作。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengcpfs/ecosystemEnable/OpenStack/kunpengopenstacktrainceph_04_014.html
sourcePath: /source/zh/kunpengcpfs/ecosystemEnable/OpenStack/kunpengopenstacktrainceph_04_014.html
indexId: c54b570935529ec068df0df79eccbe2c3c905fc9cf2f30079baae0b5c3aac8d786
---
# 集成块存储

在OpenStack上集成Ceph块存储，需要在Ceph存储节点上进行操作。

1. 更新OSD（Object Storage Device）的PG（Placement Group）状态为active+clean。

```
ceph osd getcrushmap -o /etc/ceph/crushmap
crushtool -d /etc/ceph/crushmap -o /etc/ceph/crushmap.txt
sed -i 's/step chooseleaf firstn 0 type host/step chooseleaf firstn 0 type osd/' /etc/ceph/crushmap.txt
grep 'step chooseleaf' /etc/ceph/crushmap.txt
crushtool -c /etc/ceph/crushmap.txt -o /etc/ceph/crushmap-new
ceph osd setcrushmap -i /etc/ceph/crushmap-new
```


2. 在Ceph OSD使能pool。

```
ceph osd pool application enable volumes rbd
ceph osd pool application enable vms rbd
ceph osd pool application enable images rbd
ceph osd pool application enable backups rbd
```


3. 在集成了Ceph存储的OpenStack节点上验证Ceph是否配置成功。

```
ceph -s
```


  配置成功的预期结果：
