作者:【吴业亮】
博客:http://blog.csdn.net/wylfengyujiancheng
注意:openstack newton以后版本已经将cinder的glusterfs驱动移除,不再支持glusterfs
Cinder采用glusterfs文件系统
cinder节点
安装glusterfs软件包
[root@storage ~]# yum --enablerepo=epel -y install glusterfs glusterfs-fuse
修改配置文件/etc/cinder/cinder.conf
[DEFAULT]
enabled_backends = glusterfs
[glusterfs]
volume_driver = cinder.volume.drivers.glusterfs.GlusterfsDriver
glusterfs_shares_config = /etc/cinder/glusterfs_shares
glusterfs_mount_point_base = $state_path/mnt_gluster
创建文件/etc/cinder/glusterfs_shares并写入glusterfs信息
glusterfs-node:/vol_replica
格式:节点名称:/卷名
赋予权限
[root@storage ~]# chmod 640 /etc/cinder/glusterfs_shares
[root@storage ~]# chgrp cinder /etc/cinder/glusterfs_shares
重启服务
[root@storage ~]# systemctl restart openstack-cinder-volume
创建glusterfs
# cinder --os-username admin --os-tenant-name admin type-create glusterfs
# cinder --os-username admin --os-tenant-name admin type-key glusterfs set volume_backend_name=glusterfs
# cinder --os-username admin --os-tenant-name admin extra-specs-list
计算节点上
安装glusterfs软件
[root@computer ~]# yum --enablerepo=epel -y install glusterfs glusterfs-fuse
修改配置文件/etc/nova/nova.conf
[DEFAULT]
osapi_volume_listen=0.0.0.0
volume_api_class=nova.volume.cinder.API
重启服务
[root@computer ~]# systemctl restart openstack-nova-compute