Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Jan 1996 14:05:29 +0100 (MET)
From:      J Wunsch <j@uriah.heep.sax.de>
To:        freebsd-hackers@freebsd.org (FreeBSD hackers)
Subject:   Re: A few NITS about SCSI Tapes
Message-ID:  <199601061305.OAA13148@uriah.heep.sax.de>
In-Reply-To: <199601050103.UAA21083@spooky.rwwa.com> from "Robert Withrow" at Jan 4, 96 08:03:23 pm

next in thread | previous in thread | raw e-mail | index | archive | help
As Robert Withrow wrote:
> 
> I don't see any way to retension a qic-150 tape with mt.  ``mt eom''
> doesn't go to the end, and cating the device to /dev/null is
> problematic when the tape actually *needs* to be retensioned (as
> in you get errors reading...).

I just had to learn that the SCSI-2 standard actually defines a way to
retension a tape.  (It's done by the Re-Ten bit of a load operation in
the LOAD UNLOAD command.)

  ``A re-tension (Re-Ten) bit of one indicates that the medium on the logical 
unit shall be correctly tensioned.  Implementation of the re-tension function 
is device specific.''

Well, this would give us a way to implement it.

What is the suggested timeout for such a command?  (I.e., how long do
some SCSI tapes need in order to retension a cartridge?)  Is 1800
seconds enough?

If somebody wants to try it, here's the magic:

scsi -s 1800 -f /dev/st0ctl.0 -c "1b 0 0 0 0:b5 v:b1 v:b1 v:b1 0" 0 1 1
        ^^^^                                                      ^ ^ ^
        timeout                               EOT        _________/ | |
                                              Re-Ten     ___________/ |
                                              Load       _____________/

See the SCSI-2 docs for an explanation of the EOT bit.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



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