Commit d43816ae authored by Steven Murray's avatar Steven Murray
Browse files

client_ar.sh now calls 'eos rm' in parallel

parent a04a2d66
......@@ -396,16 +396,11 @@ if [[ $REMOVE == 1 ]]; then
# recount the files on tape as the workflows may have gone further...
INITIALFILESONTAPE=$(admin_cta archivefile ls --all | grep ${EOS_DIR} | wc -l)
echo "Before starting deletion there are ${INITIALFILESONTAPE} files on tape."
#XrdSecPROTOCOL=sss eos -r 0 0 root://${EOSINSTANCE} rm -Fr ${EOS_DIR} &
KRB5CCNAME=/tmp/${EOSPOWER_USER}/krb5cc_0 XrdSecPROTOCOL=krb5 eos root://${EOSINSTANCE} rm -Fr ${EOS_DIR} &
EOSRMPID=$!
# wait a bit in case eos prematurely fails...
sleep 0.1
if test ! -d /proc/${EOSRMPID}; then
# eos rm process died, get its status
wait ${EOSRMPID}
test $? -ne 0 && die "Could not launch eos rm"
fi
for TEST_FILE_NAME in $(grep archived$ ${STATUS_FILE} | sed -e 's/ .*$//'); do
echo ${TEST_FILE_NAME}
done | KRB5CCNAME=/tmp/${EOSPOWER_USER}/krb5cc_0 XrdSecPROTOCOL=krb5 xargs --max-procs=${NB_PROCS} -iTEST_FILE_NAME eos root://${EOSINSTANCE} rm ${EOS_DIR}/TEST_FILE_NAME
# Now we can start to do something...
# deleted files are the ones that made it on tape minus the ones that are still on tapes...
echo "Waiting for files to be deleted:"
......
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