[ Previous Article |
Book Contents |
Library Home |
Legal |
Search ]
System Management Guide: Operating System and Devices
Special Files for Tape Drives
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 |
/dev/rmt* |
Yes |
No |
#1 |
/dev/rmt*.1 |
No |
No |
#1 |
/dev/rmt*.2 |
Yes |
Yes |
#1 |
/dev/rmt*.3 |
No |
Yes |
#1 |
/dev/rmt*.4 |
Yes |
No |
#2 |
/dev/rmt*.5 |
No |
No |
#2 |
/dev/rmt*.6 |
Yes |
Yes |
#2 |
/dev/rmt*.7 |
No |
Yes |
#2 |
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.
- /dev/rmt2.3
- /dev/rmt2.1
- /dev/rmt2
These particular special files are chosen because:
- /dev/rmt2.3 is chosen as the first file because this file has Retension-on-Open, which ensures that the first file is at the beginning of the tape. Rewind-on-Close is not chosen because the next I/O operation is to begin where this file ends. If the tape is already at the beginning when the first file is opened, using the /dev/rmt2.1 file as the first file would be faster since time for retensioning the tape is eliminated.
- /dev/rmt2.1 is chosen for the second file because this file has neither Retension-on-Open nor Rewind-on-Close chosen. There is no reason to go to the beginning of the tape either when the file is opened or when it is closed.
- /dev/rmt2 is chosen for the third and final file because Retension-on-Open is not wanted since the third file is to follow the second file. Rewind-on-Close is selected because there are no plans to do any more writing after the third file on the tape. The next use of the tape will begin at the beginning of the tape.
Besides controlling tape operations by choosing a particular rmt special file, you can use the tctl command to control tape operations.
[ Previous Article |
Book Contents |
Library Home |
Legal |
Search ]