Subject: Re: st0: Target Busy
To: Claude Marinier <claude.marinier@dreo.dnd.ca>
From: Robert Alexander Baxter <alex@santa.asf.alaska.edu>
List: netbsd-help
Date: 10/19/1998 09:25:01
Marinier, M. Claude, G. wrote:

> 
> I left out something which may be essential to this problem. The script
> erases the tape (mt -f /dev/rst0 erase) before the dump command. Do I need
> to add a sleep command between the other two commands? I am reluctant to
> do so because is seems like a kuldge; but I will do it if you all tell me
> that this is the normal way of dealing with this.
> 

One thing you could try would be to put in an "mt -f /dev/nrst0 status"
after the erase command.  I have at times found that this will block
until the tape is ready for anything---like dump.  It's less of a kludge
since it will return immediately if the tape is ready---unlike a sleep
command---and also will wait as long as necessary for the tape to be
ready,
unlike a sleep command.

The reason a delay might help you is that after erasing the tape, which
involves writing zeroes all along the tape in the case of my drive at
least,
the command may return (finish) while the tape drive is still rewinding
the
tape.  The "mt -f /dev/nrst0 status" would block until the rewinding
finished.
(Again, this is the case with my tape drive, an EXB-8200.)

-Alex (:-)
 alex@santa.asf.alaska.edu