SUMMARY: TZ87/DLT, space left on tape

From: Wolfgang Grandegger <wolf_at_hpkloe01.lnf.infn.it>
Date: Fri, 26 Jan 1996 20:04:33 +0000 (WET)

Hi,

some days ago I asked the following question:

> we have some TZ87 (DLT 2000) attached to our DEC Alpha systems.
>
> I want to know from the device itself, how much blocks have
> already been physically written to tape or how many space is
> left on tape. This is especially interesting when compression
> is used.
>
> Does anybody know what SCSI command is necessary to get
> this information out of the DLT. The Digital documentation
> is very poor and does not say anything about SCSI commands
> supported.

I got three very HELPFUL replies which I attached to the end of
this mail. They contain all you need! Mainly with the information
given by Eduard and Alan I quickly succeeded to write a small
SCSI program to get out the desired data from our DLT tape drive.
At the moment it works only under HP-UX (sorry) but I plan to have
a version for DU soon (see http://www.lnf.infn.it/~wolf/dlt).

Just an example what you can get from the DLT drive:
    % dlt-counters /dev/rmt/4hc
    Read compression: 2995 / 100
    Write compression: 952 / 100
    Bytes to host: 187 MB + 499760 Bytes
    Bytes from tape: 6 MB + 281516 Bytes
    Bytes from host: 843 MB + 434224 Bytes
    Bytes to tape: 88 MB + 88 Bytes

Thanx a lot for all who replied ... your are really great!

Nice weekend, Wolfgang.

+-------------------------------------------------------------------+
| Dr. Wolfgang Grandegger, INFN Email: wolf_at_hpserver.lnf.infn.it |
| Laboratori Nazionali di Frascati |
| Via Enrico Fermi, 40 Phone: +39-6-9403-2789 |
| I-00044 Frascati/Roma, Italy Fax : +39-6-9403-2427 |
+-------------------------------------------------------------------+

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>From sanghvi_at_proto.wilm.ge.com
Subject: Re: TZ87/DLT, space left on tape

Hello,
You may want to contact Quantum [1-800-tape-drv] for technical
support. DEC sold DLT business to QUANTUM.

Arun Sanghvi
GE-NF&CM

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>From alan_at_nabeth.cxo.dec.com
Subject: Re: TZ87/DLT, space left on tape

        I don't know if this applies to the TZ87 (DLT2000 family),
        but in the DLT4000 Product Manual (preliminary release)
        it describes the "Read/Write Compression Ratio Log SENSE
        Page Format (32h)". I don't know exactly how it works,
        but it appears to have some of the desired information.

        There are 10 parameter codes:

                00h Read Compression Ratio x 100
                01h Write compression ratio x 100
                02h MBytes transferred to host
                03h Bytes transferred to host
                04h MBytes Read from tape
                05h Bytes Read from tape
                06h MBytes transferred from host
                07h Bytes transferred from host
                08h MBytes Written to tape
                09h Bytes Written to tape

        So, a Log Sense command sent with the appropriate page code
        and sufficient data should get all this infomration. The
        include file rzdisk.h in /usr/include/io/cam should have
        the data structures for sending a log sense command. The
        resulting data will look something like (all data structures
        are one byte wide):


        Compression Ratio Page Header
        +-------+-------+-------+-------+-------+-------+-------+-------+
        | Reserved | Page Code |
        +-------+-------+-------+-------+-------+-------+-------+-------+
        | Reserved |
        +-------+-------+-------+-------+-------+-------+-------+-------+
        | (MSB) |
        + Additional Length +
        | (LSB) |
        +-------+-------+-------+-------+-------+-------+-------+-------+

        Compression Ratio Log Sense Page
        +-------+-------+-------+-------+-------+-------+-------+-------+
        | (MSB) |
        + Parameter Code +
        | (LSB) |
        +-------+-------+-------+-------+-------+-------+-------+-------+
        | DU | DS | TSD | ETC | TMC | Rsvd | LP |
        +-------+-------+-------+-------+-------+-------+-------+-------+
        | 02h |
        +-------+-------+-------+-------+-------+-------+-------+-------+
        | (MSB) |
        + Compression Ratio x 100 +
        | (LSB) |
        +-------+-------+-------+-------+-------+-------+-------+-------+
        The control byte values are static.

        Read/Write Bytes Transferred LOG SENSE Page Format
        +-------+-------+-------+-------+-------+-------+-------+-------+
        | (MSB) |
        + Parameter Code +
        | (LSB) |
        +-------+-------+-------+-------+-------+-------+-------+-------+
        | DU | DS | TSD | ETC | TMC | Rsvd | LP |
        +-------+-------+-------+-------+-------+-------+-------+-------+
        | 04h |
        +-------+-------+-------+-------+-------+-------+-------+-------+
        | (MSB) |
        + +
        | |
        + Counter Value +
        | |
        + +
        | (LSB) |
        +-------+-------+-------+-------+-------+-------+-------+-------+

        The control byte values are static.

        For the counter value pairs, the total can be found from:

                (MBytes * 1048576) + Bytes

        I suspect these are life time (until cleared) counters, so
        per tape stats may be hard to find. If they are available
        it must be through an undocumented vendor specific page
        or use of Send/Receive Diagnostic.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>From ed_at_pigdog.niehs.nih.gov
Reply-To: bailey_at_niehs.nih.gov
Subject: Re: TZ87/DLT, space left on tape

>>>>> "Wolfgang" == Wolfgang Grandegger <wolf_at_axpals.lnf.infn.it> writes:

Wolfgang> Ciao, we have some TZ87 (DLT 2000) attached to our DEC Alpha
Wolfgang> systems.

Wolfgang> I want to know from the device itself, how much blocks have
Wolfgang> already been physically written to tape or how many space is left
Wolfgang> on tape. This is especially interesting when compression is used.

I assume you are going to be issuing the scsi WRITE commands in your
program; I don't think it's possible to use tar (for example), and have
another program checking the amount of tape left as tar is writing...

If so, it should be possible. Looking at the documentation, it appears
that LOG SELECT and LOG SENSE commands might do what you want. The LOG
SELECT command can be used to clear the appropriate page when the tape is
first written to. The LOG SENSE command can be used to obtain the
information from that same page during the writing. Or, a LOG SENSE can be
done before the tape is written, to get the current values of bytes written
and compression ratio, which is then updated with additional LOG SENSE
commands as you are writing to the tape.

The details are pretty complicated, so I don't think it would be right for
me to try to pass them on to you in this message - there's too much of a
chance I would make a mistake. However, read my comment about
documentation below...

Wolfgang> Does anybody know what SCSI command is necessary to get this
Wolfgang> information out of the DLT. The Digital documentation is very
Wolfgang> poor and does not say anything about SCSI commands supported.

The document you are looking for is order number EK-TH4XX-IM, the "DLT2000
Cartridge Tape Subsystem/DLT2700 Mini-Library, DLT2000 Series Magnetic Tape
Product Manual". Isn't that a long title? :-)

It has complete documentation on all support SCSI commands. If you are on
good terms with your local DEC support person, they can probably find a
Postscript copy of it in the Easynet - mine did, and printed off a copy for
me. It can also be ordered if you can't get a printout...

Wolfgang> Any help (and example) is welcome,

I hope this helps...

                        Ed
-- 
Ed Bailey, Information Systems and Networks
(contracted to: National Institute of Environmental Health Sciences)
2327 Englert Drive.
Suite 200
Durham, NC 27713
                              
 Internet: bailey_at_niehs.nih.gov
   BITnet: BAILEY_at_NIEHS.BITNET 
    Voice: (919)361-9422, extension 239
      FAX: (919)544-6642
Received on Fri Jan 26 1996 - 21:00:25 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:46 NZDT