您的位置:首页 > 其它

Cinder - multi glusterfs volume backends

2015-01-10 14:51 330 查看
cinder支持后端多种backends共存,确实很适合用户的需求。最近我们公司自己的内部openstack平台后端有sata、ssd的glusterfs volume,研究了下cinder multi backends的配置。实际上主要就是cinder.conf了。

搭建glusterfs集群看这里:/article/4212693.html

cinder.conf 配置文件如下:
[DEFAULT]
enabled_backends = glusterfs1,glusterfs2  # 启用两种glusterfs volume
default_volume_type = sata  # 默认cinder type,待会会创建
[glusterfs1]
glusterfs_shares_config=/etc/cinder/glusterfs_shares1
volume_driver=cinder.volume.drivers.glusterfs.GlusterfsDriver
volume_backend_name=openstack  # 待会设置cinder type key的时候用到
[glusterfs2]
glusterfs_shares_config=/etc/cinder/glusterfs_shares2
volume_driver=cinder.volume.drivers.glusterfs.GlusterfsDriver
volume_backend_name=ssd
[root@controller001 cinder(keystone_admin)]# cat glusterfs_shares1
gluster002.sh.99cloud.net:/openstack   # sata volume路径
[root@controller001 cinder(keystone_admin)]# cat glusterfs_shares2
gluster002.sh.99cloud.net:/ssd    # ssd volume路径
cinder type-create sata  #  cinder sata类型,这也是default_volume_type,名字要对应
cinder type-key sata set volume_backend_name=openstack  #为sata类型设置key value,跟上面的cinder.conf里面的配置文件对应的
cinder type-create ssd  # cinder ssd类型
cinder type-key ssd set volume_backend_name=ssd # 为ssd类型设置key value

# compute节点端测试glusterfs libgfapi
cat /etc/nova/nova.conf   # 虚拟机挂载云硬盘(libgfapi访问glusterfs volume)
[libvirt]
qemu_allowed_storage_drivers = gluster # nova libgfapi配置项

qemu-img create gluster://$GLUSTER_HOST/$GLUSTER_VOLUME/images 5G


参考资料:redhat openstack认证培训教材
http://blog.flaper87.org/post/nova-glusterfs-direct-access/

本文出自 “the-way-to-cloud” 博客,请务必保留此出处http://iceyao.blog.51cto.com/9426658/1601613
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: