Writing to and reading from files on tapes is done by using rmt special files. There are several special files associated with each tape drive known to the operating system. These special files are /dev/rmt*, /dev/rmt*.1, /dev/rmt*.2, ... /dev/rmt*.7. The rmt* is the logical name of a tape drive, such as rmt0, rmt1, and so on.
By selecting one of the special files associated with a tape drive, you make choices about how the I/O operations related to the tape drive will be performed.
|Density||You can select whether to write with the tape drive's Density Setting #1 or with the tape drive's Density Setting #2. The values for these density settings are part of the attributes of the tape drive. Because it is customary to set Density Setting #1 to the highest possible density for the tape drive and Density Setting #2 to the next highest possible density for the tape drive, special files that use Density Setting #1 are sometimes referred to as high density and special files that use Density Setting #2 sometimes are referred to as low density, but this view is not always correct. When reading from a tape, the density setting is ignored.|
|Rewind-on-Close||You can select whether the tape is rewound when the special file referring to the tape drive is closed. If rewind-on-close is selected, the tape is positioned at the beginning of the tape when the file is closed.|
|Retension-on-Open||You can select whether the tape is retensioned when the file is opened. Retensioning means winding to the end of the tape and then rewinding to the beginning of the tape to reduce errors. If retension-on-open is selected, the tape is positioned at the beginning of the tape as part of the open process.|
The following table shows the names of the rmt special files and their characteristics.
|Special File||Rewind on Close||Retension on Open||Density Setting|
Suppose you want to write three files on the tape in tape drive rmt2. The first file is to be at the beginning of the tape, the second file after the first file, and the third file after the second file. Further, suppose you want Density Setting #1 for the tape drive. The following list of special files, in the order given, could be used for writing the tape.
These particular special files are chosen because:
Besides controlling tape operations by choosing a particular rmt special file, you can use the tctl command to control tape operations.