openstack&ceph配置使用rbd cache

来源:互联网 发布:app推广 知乎 编辑:程序博客网 时间:2024/05/26 19:14

环境说明

Openstack icehouse
ceph 0.87

配置步骤


配置ceph


添加以下内容至ceph.conf配置文件中
rbd cache = truerbd 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>



0 0
原创粉丝点击