Subject: Re: st0: Target Busy
To: None <netbsd-help@netbsd.org>
From: Marinier, M. Claude, G. <claude.marinier@dreo.dnd.ca>
List: netbsd-help
Date: 10/19/1998 12:28:28
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.

The fact that the whole script ran well after that suggests that this is a
timing problem and that the erase is the cause. Note that the other dump
commands did not have a problem opening the device.

Thanks again.

On Fri, 16 Oct 1998, Marinier, M. Claude, G. wrote:
> I am having trouble dumping to tape. NetBSD and dump should be able to
> deal with slow tape drives by waiting for them. Can anyone help?
> 
> Thanks in advance.
> 
> Here is part of the output from an 'at' job.
> 
> 	dump 0ubdsf 126 54000 6000 /dev/nrst0 /
> 	  DUMP: Date of this level 0 dump: Fri Oct 16 16:00:07 1998
> 	  DUMP: Date of last level 0 dump: the epoch
> 	  DUMP: Dumping /dev/rwd0a (/) to /dev/nrst0
> 	  DUMP: mapping (Pass I) [regular files]
> 	  DUMP: mapping (Pass II) [directories]
> 	  DUMP: estimated 63358 tape blocks on 0.02 tape(s).
> ->	  DUMP: Cannot open output "/dev/nrst0".
> 	  DUMP: fopen on /dev/tty fails: Device not configured
> 	  DUMP: The ENTIRE dump is aborted.
> 
> When this happens, there are messages on the console.
> 
> 	st0(ahc0:5:0): Target Busy
> 
> When I use the same script interactively, I get the following.
> 
> 	dump 0ubdsf 126 54000 6000 /dev/nrst0 /
> 	  DUMP: Date of this level 0 dump: Fri Oct 16 16:30:16 1998
> 	  DUMP: Date of last level 0 dump: the epoch
> 	  DUMP: Dumping /dev/rwd0a (/) to /dev/nrst0
> 	  DUMP: mapping (Pass I) [regular files]
> 	  DUMP: mapping (Pass II) [directories]
> 	  DUMP: estimated 63358 tape blocks on 0.02 tape(s).
> ->	  DUMP: Cannot open output "/dev/nrst0".
> ->	  DUMP: Do you want to retry the open?: ("yes" or "no") yes
> 	  DUMP: Cannot open output "/dev/nrst0".
> 	  DUMP: Do you want to retry the open?: ("yes" or "no") yes
> 	  DUMP: Volume 1 started at: Fri Oct 16 16:30:17 1998
> 	  DUMP: dumping (Pass III) [directories]
> 	  DUMP: dumping (Pass IV) [regular files]
> 	  DUMP: 85.12% done, finished in 0:00
> 
> Here is an extract from 'dmesg'. Note that I manually wrapped some lines.
> 
> 	ahc0 at pci0 dev 11 function 0
> 	ahc0: interrupting at irq 9
> 	ahc0: aic7870 Single Channel, SCSI Id=7, 16 SCBs
> 	scsibus0 at ahc0 channel 0: 8 targets
> 	ahc0: target 1 synchronous at 10.0MHz, offset = 0xf
> 	sd0 at scsibus0 targ 1 lun 0: <DEC, RZ26L    (C) DEC, 442D>
> 	  SCSI2 0/direct fixed
> 	sd0: 1001MB, 3117 cyl, 8 head, 82 sec, 512 bytes/sect x 2050860 sectors
> 	ahc0: target 2 synchronous at 10.0MHz, offset = 0xf
> 	sd1 at scsibus0 targ 2 lun 0: <Quantum, XP34300, L912>
> 	  SCSI2 0/direct fixed
> 	sd1: 4101MB, 3907 cyl, 20 head, 107 sec, 512 bytes/sect x 8399520 sectors
> 	ahc0: target 5 synchronous at 3.6MHz, offset = 0xf
> 	st0 at scsibus0 targ 5 lun 0: <ARCHIVE, Python 25501-XXX, 2.66>
> 	  SCSI2 1/sequential removable
> 	st0: drive empty
> 
> --------------------
> Claude Marinier, Information Technology Grou       claude.marinier@dreo.dnd.ca
> Defence Research Establishment Ottawa (DREO)       (613) 998-4901 FAX 998-2675
> 3701 Carling Avenue, Ottawa, Ontario K1A 0Z4            http://www.dreo.dnd.ca
> 
> 
> 
> 

--------------------
Claude Marinier, Information Technology Group    claude.marinier@dreo.dnd.ca 
Defence Research Establishment Ottawa (DREO)    (613) 998-4901  FAX 998-2675
3701 Carling Avenue, Ottawa, Ontario  K1A 0Z4         http://www.dreo.dnd.ca