yum install -y http://resources.ovirt.org/pub/yum-repo/ovirt-release40.rpm
yum install -y ovirt-hosted-engine-setup screen glusterfs-server vdsm-gluster system-storage-manager
ssm add -p gluster /dev/sdb
ssm create -p gluster --fstype xfs -n bricks
mkdir /gluster
echo "/dev/mapper/gluster-bricks /gluster xfs defaults 0 0" >> /etc/fstab
mount -a
mkdir -p /gluster/{engine,data,iso,export}/brick
systemctl stop firewalld && systemctl mask firewalld
systemctl start glusterd && systemctl enable glusterd
gluster volume create engine host1:/gluster/engine/brick
gluster volume create data host1:/gluster/data/brick
gluster volume create iso host1:/gluster/iso/brick
gluster volume create export host1:/gluster/export/brick
gluster volume set engine group virt
gluster volume set data group virt
gluster volume set engine storage.owner-uid 36 && gluster volume set engine storage.owner-gid 36
gluster volume set data storage.owner-uid 36 && gluster volume set data storage.owner-gid 36
gluster volume set iso storage.owner-uid 36 && gluster volume set iso storage.owner-gid 36
gluster volume set export storage.owner-uid 36 && gluster volume set export storage.owner-gid 36
gluster volume start engine
gluster volume start data
gluster volume start iso
gluster volume start export
yum install ovirt-engine-appliance -y