--- /dev/null
+#!/bin/sh
+set -x
+
+
+pcs cluster status
+
+read -p "Press enter to stop and destroy the existing cluster"
+
+pcs cluster stop --all
+pcs cluster destroy --all
+
+sleep 5
+
+systemctl enable pcsd
+systemctl start pcsd
+
+#passwd hacluster
+
+pcs host auth vhost1 addr=10.228.93.1 -u hacluster -p Passw@rd01
+pcs host auth vhost2 addr=10.228.93.2 -u hacluster -p Passw@rd01
+
+pcs cluster setup lxc-cluster --start --enable \
+ vhost1 addr=10.228.93.1 addr=vhost1.mlx1.useribm.hu addr=vhost1.mlx2.useribm.hu \
+ vhost2 addr=10.228.93.2 addr=vhost2.mlx1.useribm.hu addr=vhost2.mlx2.useribm.hu
+
+CLUSTER_NODES_STARTED=0
+while [ $CLUSTER_NODES_STARTED -lt 2 ]
+do
+ sleep 5
+ pcs cluster status
+ CLUSTER_NODES_STARTED=$(pcs cluster status | grep ': Online' | grep -w -e vhost1 -e vhost2 | wc -l)
+done
+
+pcs property set maintenance-mode=true
+
+pcs resource create lxc-fs ocf:heartbeat:Filesystem \
+ device=/dev/mapper/lxc directory=/lxc fstype=ext4
+pcs resource create lxc-service systemd:lxc
+
+pcs resource group add lxc-group \
+ lxc-fs \
+ lxc-service