Using Tapes on Bama
Unix systems and tape drives have an uneasy relationship, especially in large, multi-user environments, such as Bama. The facilities are all there to read and write to tapes, but some of the other special software you might need to control their use is not. In Unix there is no command to "allocate" or "deallocate" tape drives, that is, take over ownership to protect your tape while you use the drive, then give it back. There is also no facility to monitor tape mounting, such as the reading of tape labels to make sure the correct tape is being put on for the user who is asking. In addition, tape device names are confusing, to say the least.
The way around these problems is to add a "third-party" piece of software that can handle all these tasks. While we are currently looking at such software, we have not yet found one that is scaled right for the small amount of tape use that we anticipate for Bama users. This does not mean that you cannot use tapes at all right now, however. If you have information that needs to be written to or read from a tape, please come to the Help Desk in Gordon Palmer to ask for assistance.
We have added a couple of routines to assist with tapes that were written in the IBM environment. We also have the usual Unix utilities for talking to tape devices. We can handle three types of tapes on Bama: 8mm, 4mm, and IBM 3480/3490 cartridge tapes.
Some Basic Terminology
- Device Names:
- Bama has different, specific names for each of its tape devices.
They all start the same way, which is "/dev/rmt/". Following that
there is a number indicating which drive it is, then some optional
letters indicating the desired behavior of the tape drive. For instance,
the basic name for the 3480/3490 drive is:
/dev/rmt/3
Referred to in this manner, the tape drive will rewind when it is done. If you want the drive to stay where it was when the last read or write finished, you must specify this. In this case the device name is:
/dev/rmt/3n
where "n" stands for "no-rewind." Of the other tape drives we have, number 2 is the 4mm drive, and numbers 0 and 1 are the 8mm drives. - Tape Label:
- Tapes can sometimes have a short file at the beginning that has information about the tape. One important piece of information kept there is the name of the tape. Tape systems often process this label to make sure that the tape being mounted on the drive is the one being requested.
- ASCII and EBCDIC:
- Information that is carried by a set of characters (i.e. letters and punctuation, etc), must be represented to the computer entirely as a set of numbers. ASCII and EBCDIC are two systems for encoding the information. ASCII is by far the most common and EBCDIC is an IBM standard. Bama uses ASCII. So, any information that is being transferred from UA1VM to Bama must undergo an EBCDIC to ASCII translation. The routines we have for reading tapes written on UA1VM can perform this translation.
- Binary Data:
- Numbers that are written to the tape in native machine form, without being formatted and encoded into ASCII or EBCDIC, are called binary. Different machines will use different schemes to record numbers in binary; therefore it is not a simple task to read data written for one type of machine on all others.
Reading IBM Tapes
The 3480/3490 cartridge drive can be used to read tapes written on the IBM (UA1VM). The exception to this is that we don't have a technique to read IBM binary tapes. We can read tapes that were written with "tape dump" and "movefile". On Bama the corresponding routines are "cmstape" and "movefile". There is a man page available for "cmstape" but not for "movefile". To get help with this routine just type its name. Cmstape expects the tape to be labeled and will skip over the label. With movefile you must tell it to skip over the label.
Reading and Writing on Unix
Unix systems do have a variety of tape routines. Due to the nature of Unix, they don't particularly care if the endpoint of their output is actually a tape device or not. They also know nothing about tape labels. Here are some of the routines. These all have man pages available.
- tar:
- This is the old standard tape archive routine. It can take many files or entire directory trees and pack them up into one file.
- dd:
- This is a device-to-device copy utility. It can do several kinds of translations as it goes, such as ASCII to EBCDIC, or blocked to unblocked (and visa versa).
- cpio:
- This reads and writes to a cpio archive. The difference between this and "tar" is that this can span multiple volumes (i.e. more than one tape).
- tcopy:
- This provides a way to make a verbatim copy of a tape. When used without a given destination device it will describe the form of the data on the tape (i.e. record and block lengths and number of files).
- mt:
- Performs basic positioning of the tape, like rewinding, skipping files, etc.
This should give you an idea of what is possible using tapes on Bama. If you need to get information onto Bama using tapes from some outside source, such as a government agency, don't hesitate to come get help on this.
A Word About CDs
Bama does have a CD-ROM available. On many Unix systems, this drive is monitored so that when a CD is inserted, the operating system picks up on this and mounts the CD just like a normal file system. Bama will do this.
Because the CD-ROM on Bama is awkward to access at this time, we have another method of getting CDs mounted on Bama. In the Faculty Resource Center (A-204 Gordon Palmer) there is small Unix machine which has a CD-ROM drive. Any CD that is placed in that drive will be shared with Bama and can be accessed as though it were really on Bama. Come to the Help Desk for more information on this.
© 1999, The University of Alabama. The information included here is for the University of Alabama central computing facility as it was configured on the document date. It may or may not apply to other Unix systems.

