IBM Tape Diagnostic Tool

From Leo's Notes
Last edited on 30 December 2021, at 01:07.

The IBM Tape Diagnostic Tool (ITDT) is a utility that IBM lets customers use to gather drive logs or perform diagnostic operations on a tape drive.

Installation

The ability to use this tool is restricted by a license. Download the tool from the IBM Fix Central support area. You will need to log in and also provide the device type and model in order to be able to download the file.

# wget https://ak-delivery04-mul.dhe.ibm.com/sar/CMA/STA/08qj2/0/install_itdt_se_Linuxx86_64_9.4.0.20200123
# chmod 755 install_itdt*
# ./install_itdt*

The installer will install it to /root/ITDT and can be executed from there.

Usage

Run ./itdt from the installation directory. You will be greeted with the main menu screen.

IBM Tape Diagnostic Tool Standard Edition - Version:9.4.0.20200123


     Diagnostic and Maintenance Functions:
     [S] Scan for tape drives and enter Diagnostic/Maintenance Mode
     [H] Help
     [Q] Quit program

     Notes:
     - During a test, user data on the cartridge will be erased!
     - Make sure no other program is accessing the devices used by ITDT!
     - A device scan may take several minutes in some cases!


     Expert Functions for known devices:
     [U] Tapeutil
     [A] Add Device Manually
     [P] Preferences

To obtain drive logs, Scan for tape drives by entering S.

IBM Tape Diagnostic Tool Standard Edition  - Device List

       Host Bus  ID   LUN  Model          Serial       Fware  Changer     [#]
 +----+----+----+----+----+--------------+------------+------+------------+-+
 | 0  | 3  | 0  | 0  | 0  | ULT3580-TD8  | 000780765B | KAH0 | 78BA6130402| |
 | 1  | 3  | 0  | 0  | 1  | 03584L32     | 78BA6130402| 1700 |            | |
 | 2  | 5  | 0  | 1  | 0  | ULT3580-TD8  | 0007807A0B | KAH0 | 78BA6130402|X|
 | 3  | 5  | 0  | 2  | 0  | ULT3580-TD8  | 0007807A4B | KAH0 | 78BA6130402| |
 | 4  | 5  | 0  | 2  | 1  | 03584L32     | 78BA6130402| 1700 |            | |
 | 5  |    |    |    |    |              |            |      |            | |
 | 6  |    |    |    |    |              |            |      |            | |
 | 7  |    |    |    |    |              |            |      |            | |
 | 8  |    |    |    |    |              |            |      |            | |
 | 9  |    |    |    |    |              |            |      |            | |
 +----+----+----+----+----+--------------+------------+------+------------+-+


 [S] Scan           [T] Health Test   [D] Dump         [F] Firmware Update
 [Y] sYstem Test    [J] eJect Cartrid.[A] CleAning Stat.

Select the tape drive by entering the corresponding number to the drive. You can only select one drive. After a drive is selected, dump the drive logs by entering D.

IBM Tape Diagnostic Tool Standard Edition  - Dump

              +--------------------+                  +---------------+
       Model: | ULT3580-TD8        |       Serial No: | 0007807A0B    |
              +--------------------+                  +---------------+

              +-----+        +-----+                  +---------------+
       Host:  | 5   |   ID:  | 1   |       Firmware:  | KAH0          |
              +-----+        +-----+                  +---------------+
       Bus:   | 0   |   LUN: | 0   |       Changer:   | 00078BA6130402|
              +-----+        +-----+                  +---------------+

              +---------------------------+  Note:
       Files: | 10WT007317.a              |  *.a - before "Force Dump"
              | 10WT007317.b              |  *.b - after "Force Dump"
              +---------------------------+  *.dump.blz - full data package
              +---------------------------+           +--------------------+
       Log:   | 10WT007317.dump.blz       | Status:   | PASSED             |
              +---------------------------+           +--------------------+

   [R] Return to Device List


Tasks

Reading Raw Files

After exchanging back and forth with IBM on a LTFS formatted tape I was unable to read, one of the solutions that was proposed was to use ITDT to read each file out. IBM provided me a script containing a series of ITDT invocations that sets the drive to the proper location on the tape and then read a specific number of records. One chunk of lines for a specific file is given below:

echo BLOCKS     BYTES       STARTPOS   FPATH
echo 148774     78000000000 61000000   /tiered/some/path/to/file.ext
mkdir -p /tiered/some/path/to/
~/ITDT/itdt -w 2 -f /dev/IBMtape3 chgpart 1 61000000 read -d /tiered/some/path/to/file.ext -c 148774
if [ $? -ne 0 ] ; then exit 1 ;fi

The ITDT tool here sets the drive to partition 1 at block ID 61000000, then reads 148774 records into a file. The number of records read is calculated by the file divided by ceil(512*1024). Files should be terminated with a filemark on the tape and the count should be optional but was provided here in case it was omitted due to a bad tape drive.

Creating a Tape Image

Similar to how dd if=/dev/sda of=disk.img works, the ITDT tool can copy a tape to another tape or into a tape image.

# itdt ltfsphcp /dev/IBMtape0 /dev/IBMtape1

## or
# itdt ltfsphcp /dev/IBMtape0 /path/to/tape.img

Side note: The partition information is in XML format and contains all the files within the tape. Each file has an extent info section which specifies which partition, block, and size of each file.

<extentinfo>
<extent>
<fileoffset>0</fileoffset>
<partition>b</partition>
<startblock>54960361</startblock>
<byteoffset>0</byteoffset>
<bytecount>62612790031</bytecount>
</extent>
</extentinfo>


See Also

The primary support and download page