On Mon, 25 Jul 2005, Alan Brown wrote:

The script default is 15 seconds.

More tests showed the problem.

A formatted (erased or written) LTO2 tape loads in 14 seconds.

An unformatted (new blank) LTO2 tape loads in 16

Clearly this is long enough if the tape has something on the start, but not long enough if it's blank.

By a whole 1 second! Who would have thought it?

I've checked this across a selection of unformatted and formatted tapes on 2 different drives and it's fully consistent.

The mods to mtx-changer to achieve the check:


--- mtx-changer.old     2005-03-16 13:14:46.000000000 +0000
+++ mtx-changer 2005-07-25 18:06:19.000000000 +0100
@@ -42,13 +42,16 @@
 #  the $(seq 180) to $(jot 180) -- tip from Brian McDonald
 #
 wait_for_drive() {
-  for i in $(seq 180); do   # Wait max 180 seconds
+  cycles=0
+  for i in $(seq 300); do   # Wait max 300 seconds
+    cycles=`expr $cycles + 1`
     if mt -f $1 status | grep ONLINE  >/dev/null 2>&1; then
       break
     fi
 #   echo "Device $1 - not ready, retrying..."
     sleep 1
   done
+  echo "Device $1 ready in " $cycles " seconds."
 }


@@ -114,8 +117,8 @@
 #
 # Increase the sleep time if you have a slow device
 # or remove the sleep and add the following:
-#     wait_for_drive $device
-      sleep 15
+     wait_for_drive $device
+#      sleep 30
       exit $rtn
       ;;



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to