Would you like to try a shell script in a RunBeforeJob directive? Maybe this should work:
#!/bin/bash
#
# Usage: myscript.sh "MyBackupJob"
BCONSOLE="/pathtoyourbconsole/bconsole"
MYSTORAGE="myStorage"
MYPOOL="myPool"
BYTES=$(echo estimate job=$JOB | $BCONSOLE)
GBYTES=$(echo ${BYTES#*bytes=} | sed 's/,//g')
VOLS=$((GBYTES/(1024*1024*1024)))
for ((i=0;i<=VOLS;i++) do
echo label storage=$MYSTORAGE volume=$LABEL$i pool=$MYPOOL | $BCONSOLE | grep "already exists" > /dev/null
if [ $? -eq 0 ]; then
printf "Volume %s already exists.\n" $LABEL$i
exit 1
fi
done
exit $?
This should be enhanced. And it will be necessary to make sure labels are unique for the script (maybe using PoolID+MeidaId).
Best regards,
Ana