環境說明
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>