IVT Configuration & Use
Integrated Virtual Tape
Release 1.20
This document contains the installation and usage instructions for the Integrated Virtual Tape device.
Introduction
The Integrated Virtual Tape (IVT) device is a device that emulates a SCSI tape drive attached to the VS host. It is part of the 70V68(E) SCSI IOC emulation. The IVT allows users to create, read, and write files on the Linux host as if they were SCSI tape devices connected to the VS. A utility provided with IVT, called ‘vtaperd’, allows tape images to be created from existing SCSI tape devices, outside of the VS environment. ‘vtaperd’ is a standalone Linux program that is run from the command line.
It is recommended that the IVT be configured as a 2239V2 tape drive. IVT will function with fixed or variable block sizes. Note that when using tape images created with the standalone ‘vtaperd’ program, the IVT device that will be accessing those images should be configured as the device type that the tape images were created from.
IVT stores its image files in a directory that is assigned to it from within the SCU. The names of the tape image files are taken from the six-character VS volume name. Each IVT can only access images in a single directory.
The tape volume name is obtained from the OS when a MOUNT request is issued. The CP intercepts the MOUNT SVC and extracts the volume name and device number. If the device requested is an IVT, the name is passed to the IVT handler for opening. If a file with the exact name is found, IVT opens the file, and sends a ready signal to the CP. If no such file exists, IVT creates an empty file, which behaves like a brand new tape. If using VS BACKUP to back files up to tape images, it is recommended that new, empty tape images be initialized from within BACKUP itself, not TAPEINIT. This is done by specifying YES to the CLEAR and INITTAPE options on the output volume screen.
The directory or filesystem where the tape images are stored should be monitored for usage periodically. This is because the IVT does not place a limit on the size of the tape images – you can keep writing data to a tape image until you have exhausted all available space. Further writes will return an error.
It may be best to place the tape image directories on a separate filesystem for this reason.
Configuration
IVT is configured from within the SCU, in the SCSI IOC configuration. First, you must have designated a directory for the IVT tape image files, and the directory should exist. IVT is specified with a Device Identifier ‘e’ (lowercase ‘e’) in the first field of the entry. The second field must contain the full path to the tape image files, and it must have the ‘/’ at the end of the path.
Once the IVT has been configured in the SCU, the configuration can be saved, and the CP can be restarted. Now you must configure GENEDIT, using the same procedure you would use for any SCSI device.
When finished, the IVT device can be used just as you would use any other SCSI tape device, except no user intervention is required to mount tapes, as the IVT handles the files automatically. Be aware that mounting volumes that don’t exist will result in IVT creating empty tape images for them. These can be removed from within Linux if necessary.
The ‘vtaperd’ program
IVT is supplied with a standalone program for creating tape image files from SCSI tape devices. The program is ‘vtaperd’. It requires no configuration file, the parameters are given to it on the command line. You must know the path to the generic SCSI device for the tape drive you wish to read from. There are a couple of useful commands that can be used to find the generic device:
‘cat /proc/scsi/scsi’ – This will list all the attached SCSI devices, their host ID, bus (channel) ID, target (SCSI ID), and LUN.
‘dmesg | grep sg’ – This will return a list containing entries similar to the following:
‘Attached SCSI generic sg5 at scsi2, channel 0, id 6, lun 0, type 1’
The output of these 2 commands, when used together, will allow you to find the ‘/dev/sg’ entry, if necessary. Most installations will have a full path to the tape device already, formatted similar to one of the following:
‘/dev/scsi/host2/bus0/target6/lun0/generic’
or
‘/dev/scsi/h2/b0/t6/l0/generic’
If your system does not have long full paths to the tape generic device, you will have to locate it using the ‘cat’ and ‘dmesg’ commands described above.
Once you have the tape generic device path, you can use ‘vtaperd’ to read the tape into an image file. The command syntax is:
‘vtaperd ‘
There are no other options to vtaperd as of this release.
Example:
Read tape ‘TAPE05’:
vtaperd /dev/scsi/h2/b0/t6/l0/generic /vstape/images/TAPE05
This will read the entire tape to the file ‘TAPE05’ in the directory ‘/vstape/images’.
While in operation, the program will print out the byte count. It will stop when EOT is reached, or if there is an unrecoverable error reading the tape.
These files, once created, can be directly used by the IVT.