cvtcpy utility

The cvtcpy utility in the DM account copies a tape to another tape, including format and block conversions, and reads D3, CIE, Reality or Ultimate tape formats, with a block size up to 64 KB, and creates a D3 tape.

Arguments are expressed in any order, as keyword=value, and are all optional, except if:

if Input device UNIX name. This field is required.
of Output device UNIX name. If omitted, the data is dumped on the terminal or printer, in decimal, or hexadecimal if the x option is used. The output device or file must exist.
ib Physical input block size. This size is not necessarily the attached size. Some devices have header information in each block. If not specified, the input block size is obtained from the label, if present. The block size is expressed in decimal, in bytes or in kilobytes if followed by a k.
tib Physical tape input block size. This size is the block size on the input tape. If not specified, tib is set equal to ib. Some devices have a physical block size, which is dictated by the controller. For example, on HP-UX, reading a 16 KB block requires reading 32 512-byte blocks. In this example, we have ib=16k and tib=512. The block size is expressed in decimal, in bytes or in kilobytes if followed by a k.
ob Physical output block size. This size is not necessarily the attached size. Some devices have header information in each block. The actual attached size is in fact ob-oo (see oo option). If not specified, the output block size is set equal to the input block size after it has been determined. The block size is expressed in decimal, in bytes or in kilobytes if followed by a k.
io Input offset. This offset specifies at which byte offset the data actually starts in the physical block determined by ib. If not specified, the offset is assumed to be null.
oo Output offset. This offset specifies at which byte offset the data actually starts in the physical block determined by ob. If not specified, the offset is set equal to io.
il Input label block size. This value specifies the size of the block in which the label is found. If not specified, the label block size is assumed to be equal to the input block size. On devices that support variable block length (half-inch), this argument can be considered as the maximum block size of a label block. On devices where the device writes data in fixed blocks (SCT), it is important to specify the label block size exactly.
ol Output label block size. This value specifies the size of the block in which the label is written. If not specified, the label block size is assumed to be equal to the output block size. The logical label is written at the beginning of the label block, at the offset oo, if specified.
reel Output reel number. If not specified, the reel number is extracted from the input label.
fwd Number of files to skip before reading.
skip Number of blocks to skip before reading. The label is not skipped, unless a u option is used. If both fwd and skip are specified, the fwd operation is done first, and then the blocks are skipped.
seek Number of blocks to skip on the output device before writing. This option is supported only if the device is a direct access device (floppy disk or file).
count Maximum number of input blocks to transfer. If not specified, the data is copied until an error occurs or two consecutive file marks are encountered. When the maximum number of blocks has been reached two file marks are written on the output device, thus truncating the data.
files Maximum number of input files to transfer. If not specified, the data is copied until an error occurs or two consecutive file marks are encountered. When the maximum number of files has been reached a second file mark is written on the output device to terminate the tape properly.
itype Input device type option allows setting usual defaults for the device block size, label size and offset. These values can be explicitly specified to override the default. The valid types are: floppy, sct, 8mm, dat or 4mm, half or half. If the device is a pseudo floppy disk (UNIX file), the device type is determined automatically and can be omitted.
otype Output device type option allows setting usual defaults for the device block size, label size and offset. These values can be explicitly specified to override the default. The valid types are identical to itype.
el Embedded label length option allows reading labels that are embedded in a block of data instead of being located in its on block.

When possible, the label logical format is determined automatically.

Syntax

cvtcpy {keyword= value} {(options}

Parameter(s)

options f Does not write any file mark.
i Ignores block size on tape label, use values set by TCL parameters.
n Does not discard the first block on the second source reel. By default, cvtcpy assumes that the last block on reel was duplicated on the following reel, and discards it when reading. This option keeps the first block. If a CIE end of reel label (_r) is recognized, this option is set automatically.
p Outputs to the printer.
q Quiet suppresses all messages, except the final message and the error messages.
s Single reel disables the mechanism by which cvtcpy attempts to cross reels on the source tape. Without this option, three consecutive file marks are interpreted as an end of tape.
u Unlabeled tape. No label is expected and none is written. With this option, the block sizes must be explicitly specified.
v Verbose displays more information about the process.
x Dumps data in hexadecimal when there is no output device (dump to the terminal or the printer).
Warning: Multireel on the destination is not supported.

Since the data block sizes can be different, the very last block may be padded with segment block characters (decimal 252). This should impact D3 tapes (t-dump/save), but may affect applications reading the tapes by some other means.

  • I/O errors after a file mark, when trying to read the label, are treated as an EOD.

  • I/O errors are reported with the UNIX error code returned in errno.

  • Supported only on some platforms.

Example(s)

Copies a half-inch tape to an 8mm tape. All defaults apply (output block size 16 KB, no offset, label block size=512).

cvtcpy if=/dev/rmt0.1 itype=half of=/dev/rmt1.1 otype=8mm

Dumps a pseudo tape (UNIX file) on the terminal, in hexadecimal.

cvtcpy if=/tmp/floppy (x

Copies an 8mm tape to /dev/rmt0.1 (whatever it is), specifying a label block size of 512 (the actual label data is still 80 bytes), a physical data block size of 12000, and no offset (this means the attached block size is 12000-0=12000).

cvtcpy if=/dev/rmt1.1 itype=8mm of=/dev/rmt0.1 ol=512 ob=12000 oo=0

Copies 3 files, skipping the first file, from a half-inch tape to an 8mm tape.

cvtcpy if=/dev/rmt0.1 itype=half of=/dev/rmt1.1 otype=8mm fwd=1 files=3