diff --git a/lice/tool_setup_nas_as_nfs_client_all_nodes.sh b/lice/tool_setup_nas_as_nfs_client_all_nodes.sh new file mode 100755 index 0000000000000000000000000000000000000000..600c4d632ea4901b2c44d3a9e93e16e86dfffbc8 --- /dev/null +++ b/lice/tool_setup_nas_as_nfs_client_all_nodes.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# This script mounts the NAS directory with the NFS protocol. + +# Name of the cluster which defines the clients' names +CLUSTERNAME="lice" +# Last integer index of the minions in the cluster +MINIONLASTIND="14" +# IP of the Gluster server +NASIP="" +# Directory name which corresponds to the source directory in the NAS +NASDIR="/kvn" +# Directory name which is a mount point on clients +TARGETDIR="/mnt/nas-input" + +RUNCMD="apt -y install nfs-common; mkdir ${TARGETDIR}; mount -t nfs ${NASIP}:${NASDIR} ${TARGETDIR}" + +echo "... setuping on ${CLUSTERNAME}-master" +echo $RUNCMD | bash + +for ind in $(seq 0 ${MINIONLASTIND}) +do + echo "... setuping on ${CLUSTERNAME}-minion-${ind}" + ssh ${CLUSTERNAME}-minion-${ind} "${RUNCMD}" + done + diff --git a/lice/tool_umount_fs.sh b/lice/tool_umount_fs.sh new file mode 100755 index 0000000000000000000000000000000000000000..bef673df5c7da5d1c82e25b3d5f6ea635a8ce2b4 --- /dev/null +++ b/lice/tool_umount_fs.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Name of the cluster which defines the clients' names +CLUSTERNAME="lice" +# Last integer index of the minions in the cluster +MINIONLASTIND="14" +# Directory name which is a mount point on clients +TARGETDIR="/mnt/nas-input" + +# Rest of tasks +RUNCMD="umount ${TARGETDIR}" +# ... Master +echo "... unmounting on ${CLUSTERNAME}-master" +echo $RUNCMD | bash +# ... Minion +for ind in $(seq 0 ${MINIONLASTIND}) +do + echo "... unmounting on ${CLUSTERNAME}-minion-${ind}" + ssh ${CLUSTERNAME}-minion-${ind} "${RUNCMD}" +done +