On Sat, 3 Aug 2002, Paul G. Allen wrote:

> [root@ista root]# amtape csd show
> amtape: scanning all 12 slots in tape-changer rack:
> slot 2: reading label: Input/output error
> slot 3: reading label: Input/output error
> slot 4: reading label: Input/output error
> slot 5: reading label: Input/output error
> slot 6: reading label: Input/output error
> slot 7: reading label: Input/output error
> slot 8: reading label: Input/output error
> slot 9: reading label: Input/output error
> slot 10: reading label: Input/output error
> slot 11: reading label: Input/output error
> slot 0: reading label: Input/output error

One common problem is that some changers will return from a tape
load request before the tape is fully loaded and the tape drive is
ready to go to work.  In these cases it becomes necessary to add
some delay time between the tape load command and subsequent tape
drive use commands, or else do a sleep/retry/timeout sequence.

Here's what worked for me a few years back with a DLT4000 changer:

        # see if tape drive is ready.  if not, sleep a while and check again
        $remaining = $MAXDELAY;
        while (!open(TAPE,$TAPE) && $remaining > 0) {
                $remaining -= sleep 5;
        }
        if ($remaining <= 0) {
                print "$0 drive $TAPE timed out, not responding\n";
                exit 2;
        }

I did this just after loading a tape, so any following commands would
not have to worry about it.  For that changer it took I think close to
a minute for the drive to become ready.

More recently, with an AIT2 changer I found the open() call here didn't
work, so replaced it with a call to mt status and watched the output for
"General status bits on".

Whatever works.  :-)

-Mitch

Reply via email to