Hello,
On 3/10/2006 11:00 AM, david robert wrote:
these are the two places i can see this function can we increse these
time or
You'd use this snippet in your script.
wait_for_drive() {
for i in $(seq 180); do # Wait max 180 seconds
if mt -f $1 status | grep ONLINE >/dev/null 2>&1; then
# and, before you implement this, make sure your tape drive status
# is actually ONLINE after unmount from Bacula.
break
fi
# echo "Device $1 - not ready, retrying..."
sleep 1
done
}
Also, one thing I overlooked in my previous post: With a DLT drive, you
can't usually eject the cartridge after rewinding, you have to offline
the drive, too. The combined command 'mt rewoffline' might thus already
solve your problem.
Arno
------------
# wait_for_drive $device
sleep 15
exit $rtn
;;
thanks for your help
*/Arno Lehmann <[EMAIL PROTECTED]>/* wrote:
Hello,
On 3/10/2006 10:29 AM, Gavin Conway wrote:
> Hi,
>
> I'm seeing the same problem using a very similar script. Also using
> Debian Sarge 3.1 with the latest version of Bacula. I think this
is more
> to do with Bacula not having finished with the tape drive when the
> script runs.
>
> If anyone knows how this goes let me know.
If you are right with your suspicion, you could wait for the tape to
become available before executing the commands. In the mtx-changer
script, there's a function wait_for_drive which you could use as a
template. Basically, it checks if the drive is ready, and if it
isn't it
waits some time and loops.
Arno
> Thanks,
> Gavin
>
--
IT-Service Lehmann [EMAIL PROTECTED]
Arno Lehmann http://www.its-lehmann.de
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web an d mobile media. Attend the
live webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users
*Yahoo! Photos*
<http://us.rd.yahoo.com/mail/uk/taglines/default/photos/*http://uk.photos.yahoo.com/>
– NEW , now offering a quality print service
<http://us.rd.yahoo.com/mail/uk/taglines/default/photos/*http://uk.photos.yahoo.com/>
from just 8p a photo.
--
IT-Service Lehmann [EMAIL PROTECTED]
Arno Lehmann http://www.its-lehmann.de
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users