10. - OMA/2 (TDF) on FakeTape Drives

10.1. - General Support

All FLEX-ES FakeTape drives support the ability to read, but not to write, emulated tapes in the IBM Optical Media Attach/2 format ("OMA/2"). OMA/2 format is sometimes referred to as TDF format after the name of the Tape Description File (TDF) which it employs.

(Note: The OMA/2 format may be used only with files on server disk (including CD-ROM). It may not be used with server cartridge tape.)

The original IBM OMA/2 device functioned as an emulated 3422 tape drive; all types of FLEX-ES emulated tape drives may be used to read OMA/2 files.

If you are installing VM/ESA or z/VM from OMA/2 formatted installation CD-ROMs, then please note that the VM installation code checks the device type to ensure that it is specifically a 3422 for a CD-ROM media installation. You are advised to define an emulated 3422 to accomodate this check during VM installation from OMA/2 formatted CD-ROM.

OMA/2 is described in the IBM publications: IBM S/370 and S/390 Optical Media Attach/2 User's Guide (IBM Document Number SC53-1200) and IBM S/370 and S/390 Optical Media Attach/2 Technical Reference (IBM Document Number SC53-1201). In 2002, IBM re-introduced OMA/2 support into a currently manufactured IBM device, providing it in the 2074 communications unit with EC number J10980.

10.2. - The TDF

An OMA/2 format "tape" has a format more complex than that of an ordinary tape. It consists of a Tape Description File ("TDF") which in turn lists the component files which constitute the OMA/2 "tape". These component files may be in physically noncontiguous locations. This TDF also specifies options for the interpretation (format) of these component files.

The filename of the TDF need not end with any special suffix. In these examples, " .tdf" is often used, but this style of usage is not required.

10.2.1. - TDF: @TDF Entry

The first entry in a TDF is the "verification entry" (the "@TDF" line). This line must begin, in the first column, with the exact literal string "@TDF" (in uppercase, in ASCII).

The OMA/2 specification defines several optional fields for the "@TDF" entry: DEN1600, DEN6250, SIZE and a type of comment introduced by a ";" character.

FLEX-ES supports none of these options. The DEN1600 and DEN6250 are not necessary for emulated tape. In the case of the SIZE option, it is not necessary as standard FLEX-ES tape size handling applies. (See the maxwritesize device option, as described in FSIMM310: Resource Language Reference.) The use of the ";" character to begin comments is not supported.

10.2.2. - TDF: TM and EOT Entries

A TDF may contain one or more TM (Tape Mark) entries and at most one valid EOT (End Of Tape) entry. FLEX-ES supports these. They must begin in the first character of the line in which they appear, be in ASCII, and be in uppercase. Nothing else should appear on a line containing one of these entries.

There is an implied Tape Mark between the component files of an OMA/2 tape, and an implied Tape Mark after the last component file. Use of the TM entry causes an explicit Tape Mark independent of (or in addition to) any implied Tape Marks.

If an EOT entry is not specified, the end of the file is used instead.

10.2.3. - TDF: filespec Entries

A TDF also contains "filespec" entires which define the component files which constitute the OMA/2 "tape". Each filespec entry must occupy a single line. As described in the IBM OMA/2 User's Guide, these entries consist of three fields: a "filespec" field which identifies the file, a "file-formats" field which indicates the manner in which the file is to be interpreted, and a "file-description-information" field which contains further information relevant to the file format.

10.2.3.1. - TDF: The filespec Field (Filename)

In a FLEX-ES OMA/2 TDF, the "filespec" (file name) will in use have prepended to it a "prefix": a server OS pathname which give the path to the file. (The prefix is specified outside of the TDF file when the file is mounted in a CLI session.) If this prefix begins with a slash character ("/"), then it is a "fully qualified" path and it specifies a location based on the root of the filesystem. If it does not, then it is a "relative" path and it specifies a location relative to the current working directory of the CLI session in which the mount command which mounts the OMA/2 tape is issued. The prefix may or may not end with a slash character (to separate it from the filename it prefixes). If a slash character is not specified, it will be supplied.

The component filename itself need not, and generally should not, begin with a slash character. If one is specified, it will be treated as a redundant slash by the server OS during the mount and ignored.

The component filenames themselves may appear in uppercase or lowercase. They will be transformed to lowercase in use, however (without modifying the TDF). When creating an OMA/2 file on server disk, it is important to use lowercase filenames. If an uppercase filename is used, it will not match. In such a situation an alert trace will be taken and an errno of 2 (file not found) reported.

If any backslash characters appear in either the prefix or the component filenames, they will be translated to front slash characters (without modifying the TDF).

The actual component files must be at least 16 bytes in length and must be an exact multiple of 16 bytes in length.

10.2.3.2. - TDF: The file-format Field

The OMA/2 format defines four types of component file formats. Three of these are supported by FLEX-ES: HEADERS, FIXED, and UNDEFINED. If used, these three keywords may be all uppercase or all lowercase (but not a mix). The fourth type, TEXT, is not supported.

10.2.3.3. - TDF: The file-description-information Field

The OMA/2 format defines two types of "file description information" used in conjunction with the file formats.

FLEX-ES supports the RECSIZE file description information parameter (used with file types FIXED and UNDEFINED). If used, RECSIZE must be uppercase.

FLEX-ES does not support the CODEPAGE file description information parameter (and its parameters). CODEPAGE is used only with the (also unsupported) TEXT component file format.

10.2.4. - TDF: Example


@TDF
image.tape UNDEFINED RECSIZE 1024
linux.prm  UNDEFINED RECSIZE 80
INITRD.GZ  UNDEFINED RECSIZE 1024
TM
TM
EOT
* This is a comment line

In this example, the filespec " INITRD.GZ" will be transformed in use to a lowercase " initrd.gz" (but the TDF itself will remain unmodified). All three filespecs will be prepended by a prefix specified at mount time.

10.3. - Resource Definition

An emulated tape device which is to be used for reading OMA/2 tapes must have the OMA/2 tape TDF mounted explicitly on it using the CLI mount command. The syntax of this mount command (described below) cannot be used in the device's definition in the resource configuration file.

This means that all emulated tape devices intended to be used with OMA/2 tapes should be defined either as OFFLINE or with some appropriate FakeTape or AWSTAPE filename (if they are to be used first with FakeTape or AWSTAPE emulated tapes. The OMA/2 format will be detected automatically when the OMA/2 tape is mounted.

Unless a tape device has been defined with a device option incompatible with OMA/2 usage (see below), tapes of all types (that is, not simply OMA/2 tapes) may be mounted. Thus, it is possible on a single drive to mount a FakeTape, unmount the FakeTape, mount an OMA/2 tape, unmount it, mount an AWSTAPE, and so forth.

The following tape device options are meaningful with OMA/2 usage:

Note that the noidrc option should only be coded on 3480 devices.

The following tape device option, which may be specified on both 3420 and 3480 family devices, is not meaningful with OMA/2 usage. However, it will not cause errors if is it specified:

The following tape device option, which may be specified only on 3480 family devices, is not meaningful with OMA/2 usage. However, it will not cause errors if it is specified:

The following tape device options should not be specified with tape devices intended for OMA/2 use:

See FSIMM310: Resource Language Reference and FSIMM300 System Programmer's Guide for further information on FLEX-ES emulated tape device options.

10.4. - Mounting and Reading

10.4.1. - TDF and Component File Availability

To read an OMA/2 format emulated tape, its Tape Description File (TDF) and all of the components named in this TDF file must be available to the server on which the FakeTape drive is running. If these are simply files in the server filesystem, they must be readable and accessible. If these are on CD-ROM, the CD-ROM must first be mounted as a part of the server's filesystem. (Once mounted, the TDF and other files may either be used directly or copied to the server filesystem.) It is not possible to use an OMA/2 format emulated tape with server cartridge tape.

10.4.2. - The CLI mount Command

Then use the CLI mount command to mount the OMA/2 file on the FakeTape drive. The FakeTape drive will automatically detect that the mounted emulated tape file is in OMA/2 format and read it accordingly. When used to mount OMA/2 tapes, the second parameter of the CLI mount command employs a special form:

mount IOaddress prefix: full-TDF-filename

No spaces may appear around the colon.

The IOaddress (the first parameter) is the mainframe I/O address in hexadecimal as is conventional for all CLI mount commands.

The full-TDF-filename is the fully qualified server OS filename of the TDF file. Because it must be a fully qualified filename, it must begin with "/".

For example, consider a TDF file which is named " linux.tdf" and which is in the directory " /tapes". The fully qualified pathname for this TDF file would be: " /tapes/linux.tdf".

Assume that this TDF file contains the following:


@TDF
image.tape UNDEFINED RECSIZE 1024
linux.prm  UNDEFINED RECSIZE 80
initrd.gz  UNDEFINED RECSIZE 1024
TM
TM
EOT

Further assume that the three component files are also in the directory " /tapes".

Such a TDF file might be mounted with the command:

mount 180 /tapes:/tapes/linux.tdf

During the mounting process, the prefix " /tapes", along with a slash, will be prepended to the three filenames.

The prefix and the TDF fully qualified filename are not limited to a single level of directories. The following is, for example, a valid command (assuming the TDF file and component files exist as appropriate):

mount 181 /mnt/cdrom:/mnt/cdrom/tapes/uaa974.tdf

The prefix need not be the same as the beginning of the TDF fully qualified filename (though most usually it is). If the files referenced in the TDF were in some location other than the TDF itself, a command such as this might be used:

mount 182 /tapes2:/scratch/testtape.tdf

10.4.3. - Writing Not Supported

Any attempt to write to a OMA/2 format tape file will result in a unit check from the FakeTape drive. There is, therefore, no utility to initialize a blank OMA/2 format tape (as there is with AWSTAPE format tapes).

Note, however, that an attempt to use a FLEX-ES emulated tape drive to mount a tape file which does not exist will result in the writing of an empty FakeTape file of the specified name.