DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

tapecntl(1)


tapecntl -- tape control for tape device

Synopsis

tapecntl [-Cabelrtuvw] [-c n] [-d n] [-f n] [-p n] [device]

Description

tapecntl sends the optional commands to the tape device driver sub-device /dev/rmt/ntape*. Error messages are written to standard error. device is the tape device, and defaults to /dev/rmt/ntape1 if not specified.

Not all options are supported by all tape devices or all tape device drivers.

Options

tapecntl takes the following options:

-C
Read compression characteristics.

-a
Position the tape to the end of data (EOD) mark. This option is valid only for SCSI tape devices.

-b
Read block length limits from the tape device and display them.

-c [n]
Set compression characteristics where n is:

value of n compression decompression
0 off off
1 on off
2 off on
3 on on

 value of n   compression   decompression
 0            off           off
 1            on            off
 2            off           on
 3            on            on


NOTE: This option only works with SCSI drives that support data compression and decompression.


-e
Erase the tape. The erase bar is activated while moving the tape from beginning to end, erasing all data tracks in a single pass over the tape.

-l
Load the tape media and position the tape at the beginning of tape (BOT) mark.

-r
Reset the tape device, initializing the tape controller registers and positioning the tape at the beginning of tape (BOT) mark.

-t
Retension the tape, moving the tape from beginning to end and back, thereby repacking the tape with the proper tension across its length.

-u
Unload the tape media from the tape device. Depending on the device, unloading may include ejecting the cartridge.

-v
Set the tape device to read and write variable length blocks. This option works only on devices that support variable length blocks.

-w
Rewind the tape, moving the tape to the BOT mark.

-d [n]
Set the tape density where n is the numeric density code as defined in the SCSI-2 specification. This option works only with SCSI drives. The number specified must be in decimal. Common density codes include:

0
the default value for the device, meaning autodetect

4
QIC-11

5
QIC-24;

15
QIC-120

16
QIC-150

Zero is the recommended value. For DAT devices, 0 and 13 both denote the DDS format and are the only valid density codes.


-f [n]
Set the tape device to read and write in fixed length blocks of n bytes. Individual devices have specific limitations and you should set this parameter only to a value supported by the device.

-p [n]
Position tape past the end of file (EOF) mark n, where n is an integer, positive or negative, representing the number of EOF marks to move forward or backward. A positive integer moves the tape forward relative to its current position, to a point just after the specified EOF mark. A negative integer moves the tape backward in the same manner, to a point on the tape just before the specified EOF mark. So, for example, using -p 2 will move the tape to the beginning of the third record; using -p -1 will move the tape back past the previous file mark, putting the tape at the end of the record. For this reason, backward positioning cannot move to the beginning of a record, and because backward positioning is slow, rewinding and moving forward to the needed record is the recommended approach.


NOTE: Backward positioning is not available on all devices.

A positioning value of zero is ignored. Illegal or out-of-range values will leave the tape positioned at the last valid EOF mark.

Options can be used individually or strung together.

The default mode for I/O from any magnetic tape, such as QICtape, 9-track, or DAT is fixed-length blocks which are 512 bytes long.

Devices

Node names for device and their corresponding functionality are:

ctape*
Does not retension tape at open. Rewinds and does not unload tape at close.

nrtape*
Retensions tape at open. Does not rewind and does not unload tape at close.

ntape*
Does not retension tape at open. Does not rewind and does not unload tape at close.

rtape*
Retensions tape at open. Rewinds and does not unload tape at close.

utape*
Does not retension tape at open. Rewinds and unloads tape at close.

Files


/dev/rmt/ctape*

/dev/rmt/nrtape*

/dev/rmt/ntape*

/dev/rmt/rtape*

/dev/rmt/utape*

/usr/bin/tapecntl

Exit codes

Exit codes for tapecntl and their meanings are as follows:

1
Device function could not initiate properly due to misconnected cables or poorly inserted tape cartridge.

2
Device function failed to complete properly due to unrecoverable error condition, either in the command setup or due to mechanical failure.

3
Device function failed due to the cartridge being write protected or to the lack of written data on the tape.

4
Device /dev/rmt/ntape* or /dev/rmt/ctape* failed to open properly due to already being opened or claimed by another process.

Notices

Using variable-length block mode when writing magnetic tapes is discouraged because it may not work correctly in releases before SVR4.2 MP. Magnetic tape should always be written in fixed-length block mode, even though you are free to change the default fixed-block length from 512 bytes to any other fixed-block mode the tape drive supports.

The default mode for I/O from any magnetic tape (QICtape, 9-track, DAT) is fixed-length blocks 512 bytes long.


© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004