openstack&ceph配置使用rbd cache

本文详细介绍了如何在OpenStack冰河版本中配置Ceph存储集群,并将其与Nova服务集成,以实现高性能、高可用的块存储解决方案。通过调整Ceph配置参数和修改Nova配置文件,实现数据在不同节点间的高效缓存与读取,同时确保了实例启动时的写回模式,提升整体性能。

环境说明

Openstack icehouse
ceph 0.87

配置步骤


配置ceph


添加以下内容至ceph.conf配置文件中
rbd cache = true
rbd cache writethrough until flush = true

rbd cache还有一些配置属性,可根据需要进行更改

#rbd cache size 
#rbd cache max dirty 
#rbd cache target dirty 
#rbd cache max dirty age 


配置openstack


将以下内容添加至nova.conf配置文件中的[default]字段中
disk_cachemodes="network=writeback"

而后启动instance查看libvirt.xml文件可以查看到cache模式为writeback
 <disk type="network" device="disk">
      <driver name="qemu" type="raw" cache="writeback"/>
      <source protocol="rbd" name="volumes/volume-2b2db46b-8b22-40f9-bde9-7df7c3c8e9b7">
        <host name="10.10.200.163" port="6789"/>
        <host name="10.10.200.164" port="6789"/>
        <host name="10.10.200.165" port="6789"/>
      </source>
      <auth username="cinder">
        <secret type="ceph" uuid="b866a7a0-90ce-4552-97c1-a5191da1bfcd"/>
      </auth>
      <target bus="virtio" dev="vdf"/>
      <serial>2b2db46b-8b22-40f9-bde9-7df7c3c8e9b7</serial>
    </disk>



评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值