Skip to content
Snippets Groups Projects
Commit 873ad190 authored by Min-Su Shin's avatar Min-Su Shin
Browse files

New scripts to mount and umount file systems.

parent a5306383
Branches
No related merge requests found
#!/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
#!/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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment