Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Nov 2000 18:31:55 -0600
From:      "Jacques A. Vidrine" <n@nectar.com>
To:        Matthew Jacob <mjacob@feral.com>
Cc:        freebsd-scsi@FreeBSD.ORG
Subject:   Re: [ TAPE TIMEOUT] Re: afio & SCB 0xc - timed out while idle
Message-ID:  <20001115183155.A11050@hamlet.nectar.com>
In-Reply-To: <Pine.BSF.4.21.0011151424210.96707-100000@beppo.feral.com>; from mjacob@feral.com on Wed, Nov 15, 2000 at 02:25:33PM -0800
References:  <20001115145704.A10481@hamlet.nectar.com> <Pine.BSF.4.21.0011151424210.96707-100000@beppo.feral.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 15, 2000 at 02:25:33PM -0800, Matthew Jacob wrote:
> No, that's not what is happening. The close occurred, and the tape itself took
> longer than 60 seconds to write the closing filemarks (to flush buffers, etc).

But..but..but.. the application that actually has the tape open is dd, which
doesn't close until it gets an error or reaches end-of-file on input.  I'm
confused :-)

Check this out: stupid shell script that dumps the kernel to the tape,
then spends about 13 minutes compressing a file, and finally dumps that 
file to tape -- through dd.

  --- Filename: foo ---
  #! /bin/sh
  (printf "Dumping /kernel...\n" 1>&2;
  cat /kernel; printf "done\n" 1>&2;
  printf "Compressing big.iso...\n" 1>&2;
  bzip2 -c big.iso > big.iso.bz2;
  printf "done\n" 1>&2;
  printf "Dumping big.iso...\n" 1>&2;
  cat big.iso.bz2;
  printf "done\n" 1>&2;) | \
  dd bs=64k conv=noerror,sync of=/dev/nrsa0 
  --- Filename: foo ---

  # mt rewind
  # sh foo
  Dumping /kernel...
  done
  Compressing big.iso...
[quite a bit of time passes while the file compresses]
  done
  Dumping big.iso...
[on console] (sa0:ahc0:0:3:0): WRITE FILEMARKS. CDB: 10 0 0 0 2 0 
[on console] (sa0:ahc0:0:3:0): Deferred Error: NO SENSE
  dd: /dev/nrsa0: end of device
  0+425 records in
  424+0 records out
  27787264 bytes transferred in 832.575354 secs (33375 bytes/sec)
  done
  # mt status
[on console] (sa0:ahc0:0:3:0): SCB 0xc - timed out while idle, SEQADDR == 0xa
[on console] (sa0:ahc0:0:3:0): Queuing a BDR SCB
[on console] (sa0:ahc0:0:3:0): no longer in timeout, status = 34a
[on console] (sa0:ahc0:0:3:0): failed to write terminating filemark(s)
[on console] (sa0:ahc0:0:3:0): tape is now frozen- use an OFFLINE, REWIND or MTEOM command to clear this state.
  mt: /dev/nrsa0: Device not configured


What's going on there?  The WRITE FILEMARKS message spits out when `cat
big.iso.bz2' is executed (and therefore when dd starts writing again?).
The rest of the messages show up a minute or so later after the tape
device has been closed (as dd exits... it's about 12281 blocks short
of reading all the input, by the way).


Unfortunately I can't seem to reproduce this with something simple like
`(cat /kernel; sleep 600; cat /kernel) | dd ...' which just further
proves that I don't know what is going on.

Thanks for the patience,
-- 
Jacques Vidrine / n@nectar.com / jvidrine@verio.net / nectar@FreeBSD.org


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001115183155.A11050>