Commit 52e6634c authored by Mihai Patrascoiu's avatar Mihai Patrascoiu
Browse files

Allow passing filesystem parameters in eos_fst_setup script

parent cb7dccfb
Pipeline #531121 skipped with stage
#!/usr/bin/env bash
if [[ $# -eq 0 ]]; then
echo "Usage: $0 <id> [-u <uuid>] [-d <mountpoint>] [-s <space>] [-c <configstatus>]"
exit 1
fi
id=$1
shift
UUID=fst${id}
DATADIR=/home/data/eos${id}
SPACE=default
CONFIG=rw
while getopts 'u:d:s:c:' flag; do
case "${flag}" in
u) UUID="${OPTARG}" ;;
d) DATADIR="${OPTARG}" ;;
s) SPACE="${OPTARG}" ;;
c) CONFIG="${OPTARG}" ;;
*) echo "Unexpected option ${flag}" ;;
esac
done
FSTHOSTNAME=$(hostname -f)
source /etc/sysconfig/eos
export EOS_MGM_URL=root://eos-mgm-test.eoscluster.cern.ch//
......@@ -8,12 +30,11 @@ export EOS_MGM_URL=root://eos-mgm-test.eoscluster.cern.ch//
echo "Starting fst${id} ..."
/usr/bin/xrootd -n fst${id} -c /etc/xrd.cf.fst -l /var/log/eos/xrdlog.fst -b -Rdaemon
echo "Configuring fst${id} ..."
UUID=fst${id}
DATADIR=/home/data/eos${id}
mkdir -p $DATADIR
echo "$UUID" > $DATADIR/.eosfsuuid
echo "${id}" > $DATADIR/.eosfsid
chown -R daemon:daemon $DATADIR
eos -b fs add -m ${id} $UUID $FSTHOSTNAME:1095 $DATADIR default rw
eos -b fs add -m ${id} $UUID $FSTHOSTNAME:1095 $DATADIR $SPACE $CONFIG
eos -b node set $FSTHOSTNAME:1095 on
echo "Configuration done for fst${id}"
......@@ -66,7 +66,7 @@ for PID in ${PIDS}; do
done
if [ "${FAILURE}" == "1" ]; then
echo "Failed to start one of the fsts";
echo "Failed to start one of the FSTs";
exit 1
fi
......@@ -84,7 +84,7 @@ for PID in ${PIDS}; do
done
if [ "${FAILURE}" == "1" ]; then
echo "Failed to configure one of the fsts"
echo "Failed to configure one of the FSTs"
exit 1
fi
......
Supports Markdown
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