openstack對接gluster流程

在已經部署好的gluster集羣裏建立相應的卷,可參考https://my.oschina.net/u/857184/blog/1506552.net

mkdir -p /data/brickl/image
mkdir -p /data/brickl/instance
mkdir -p /data/brickl/volumerest

如下操做在任意一個節點執行便可:
gluster volume create images replica 2 gluster-server1:/data/brickl/image gluster-server2:/data/brickl/image
gluster volume create instances replica 2 gluster-server1:/data/brickl/instance gluster-server2:/data/brickl/instance
gluster volume create volumes replica 2 gluster-server1:/data/brickl/volume gluster-server2:/data/brickl/volumeserver

gluster volume start images
gluster volume start instances
gluster volume start volumesblog

安裝gluster包
yum -y install glusterfs-server
service glusterd start
chkconfig glusterd onci


配置cinder服務部署

openstack-config --set /etc/cinder/cinder.conf DEFAULT glusterfs_mount_point_base /var/lib/cinder/volumes
openstack-config --set /etc/cinder/cinder.conf DEFAULT volume_driver cinder.volume.drivers.glusterfs.GlusterfsDriver
openstack-config --set /etc/cinder/cinder.conf DEFAULT glusterfs_shares_config /etc/cinder/shares.conf
touch /etc/cinder/shares.conf
echo -e 'gluster-server1:/volumes' >> /etc/cinder/shares.conf
chown cinder:cinder /etc/cinder/shares.conf
chown -R cinder:cinder /var/lib/cinder/*
mkdir -p /var/lib/cinder/volumes
chown -R cinder:cinder /var/lib/cinder/volumes
openstack-service restart cinder集羣

配置glance服務
echo -e 'gluster-server1:/images /var/lib/glance/images  glusterfs   defaults 0 0' >> /etc/fstab
mount -a
chown -R glance:glance  /var/lib/glance配置

配置nova服務
echo -e 'gluster-server1:/instances /var/lib/nova/instances  glusterfs   defaults 0 0' >> /etc/fstab
mount -a
chown -R nova:nova  /var/lib/nova/instancesservice

相關文章
相關標籤/搜索