Skip to content
Snippets Groups Projects
Commit 220146c5 authored by Julien Leduc's avatar Julien Leduc
Browse files

client_ar.sh can now write to /eos/ctaeos/preprod with -d option, just...

client_ar.sh can now write to /eos/ctaeos/preprod with -d option, just complains: Could not remove disk replica for /eos/ctaeos/preprod/ as drop is already done in the wfe script. Should test for disk replica before trying to drop with ls -y on directory.
parent f9c8e3fe
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
EOSINSTANCE=ctaeos
EOS_DIR=/eos/ctaeos/cta/$(uuidgen)
EOS_BASEDIR=/eos/ctaeos/cta
TEST_FILE_NAME_BASE=test
NB_PROCS=1
......@@ -11,14 +11,26 @@ VERBOSE=0
TAILPID=''
die() {
echo "$@" 1>&2
exit 1
}
usage() { cat <<EOF 1>&2
Usage: $0 [-n <nb_files>] [-s <file_kB_size>] [-p <# parallel procs>] [-v]
Usage: $0 [-n <nb_files>] [-s <file_kB_size>] [-p <# parallel procs>] [-v] [-d <eos_dest_dir>] [-e <eos_instance>]
EOF
exit 1
}
while getopts "n:s:p:v" o; do
while getopts "d:e:n:s:p:v" o; do
case "${o}" in
e)
EOSINSTANCE=${OPTARG}
;;
d)
EOS_BASEDIR=${OPTARG}
;;
n)
NB_FILES=${OPTARG}
;;
......@@ -53,11 +65,11 @@ if [[ $VERBOSE == 1 ]]; then
TAILPID=$!
fi
EOS_DIR="${EOS_BASEDIR}/$(uuidgen)"
echo "Creating test dir in eos: ${EOS_DIR}"
# uuid should be unique no need to remove dir before...
# XrdSecPROTOCOL=sss eos -r 0 0 root://${EOSINSTANCE} rm -Fr ${EOS_DIR}
eos root://${EOSINSTANCE} mkdir -p ${EOS_DIR}
eos root://${EOSINSTANCE} mkdir -p ${EOS_DIR} || die "Cannot create directory ${EOS_DIR} in eos instance ${EOSINSTANCE}."
echo -n "Copying files to ${EOS_DIR} using ${NB_PROCS} processes..."
for ((i=0;i<${NB_FILES};i++)); do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment