Add repo and install on both nodes
# wget -P /etc/yum.repos.d http://download.gluster.org/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-epel.repo
# yum -y install glusterfs glusterfs-fuse glusterfs-server
From first node
Start the service and enable it
# systemctl start glusterd.service
# systemctl enable glusterd.service
# gluster peer probe Node2
From Second node
Start the service and enable it
# systemctl start glusterd.service
# systemctl enable glusterd.service
# gluster peer probe Node1
Create Bricks on both nodes
# gluster volume create glustervmstore replica 2 Node1:/vmstore Node2:/vmstore
# gluster volume start glustervmstore
Since Nova instance will be created under /var/lib/nova/instances, execute the following commands on both nodes
# mount -t glusterfs Node1:/glustervmstore /var/lib/nova/instances
(Replace Node2 with Node1 when executing on second node)
Test it
# cd /var/lib/nova/instances
touch a file and this file will be replicated on the second node too.
Now create a instance in openstack and you will see image on both nodes (If you are getting error, check permission for /var/lib/nova/instance directory)
No comments:
Post a Comment