#!/bin/bash

set -xeuo pipefail

yum update --assumeyes
yum install --assumeyes nfs-utils

mkdir --parents "${flashblade_path}"
mkdir --parents "${pcs_path}"
mkdir --parents "${fes_pd_path}"

echo "flashstore01.zooxlabs.com:/mnt/pool0/flashblade ${flashblade_path} nfs soft,intr,vers=3,tcp,nolock 0 0" >> /etc/fstab
echo "sun-pcs01-mon01.zooxlabs.com:6789,sun-pcs01-mon02.zooxlabs.com:6789,sun-pcs01-mon03.zooxlabs.com:6789:/ ${pcs_path} ceph name=sun_pcs01_fs_rw,secret=${pcs_secret} 0 0" >> /etc/fstab
echo "sun-swinfrastore01.zooxlabs.com:/sun_swinfra01/pipedream ${fes_pd_path} nfs soft,intr,vers=3,tcp,nolock 0 0" >> /etc/fstab

mount --all
