Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tape(C) — OpenDesktop 2.0.0a

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

backup(ADM)

cpio(C)

dd(C)

mcconfig(F)

mcdaemon(F)

restore(ADM)

tape(HW)

tar(C)

xbackup(ADM)

xrestore(ADM)


 tape(C)                         19 June 1992                         tape(C)


 Name

    tape, mcart - magnetic tape maintenance program

 Syntax

    tape [ -csf8i ] [ -a arg ] command [ device ]

    mcart command [ device ]

 Description

    The tape command sends commands to, and receives status from, the tape
    subsystem.  tape can communicate with QIC-02 cartridge tape drives, SCSI
    tape drives, and QIC-40, QIC-80 and Irwin mini-cartridge tape drives.
    (The mcart program is automatically invoked by tape when options specific
    to the Irwin driver are used.)

    The tape command reads /etc/default/tape to find the default device name
    for sending commands and receiving status.  For example, the following
    line in /etc/default/tape will cause tape to communicate with the QIC-02
    cartridge tape device:

       device = /dev/xct0

    If a device name is specified on the command line, it overrides the
    default device.  tape queries the device to determine its device type.
    If the device does not respond to the query, tape will print a warning
    message and assume the device is a QIC-02 cartridge tape.

    The Irwin driver has a special default file /etc/default/mcconfig that
    contains special driver options (see mcconfig(F) for details).  In addi-
    tion, the Irwin driver uses a daemon startup program, /etc/mcdaemon, to
    provide background ECC encode/decode.

 Options

    You can explicitly specify the type of the device by using the device
    type flags, as follows:

       -c      QIC-02 cartridge tape
       -s      SCSI tape
       -f      QIC-40 mini-cartridge tape
       -8      QIC-80 mini-cartridge tape
       -i      Irwin mini-cartridge tape

    The -a flag allows you to pass an argument to commands that can use them.
    The command to format a DAT tape into two partitions requires the size to
    be passed as an argument.  The -a option can also be used with the format
    command (used only with QIC-40, QIC-80, and Irwin tape drives) and the
    setblk command (only valid with SCSI drives).

    The following commands can be used with the various tape drivers sup-
    ported under UNIX.  The letters following each description indicate which
    drivers support each command:

       A       All drivers
       C       QIC-02 cartridge tape driver
       S       SCSI tape driver
       F       QIC-40 and QIC-80 mini-cartridge tape drivers
       I       Irwin mini-cartridge tape driver


    amount      Report amount of data in current or last transfer.  (C,S,F)

    erase       Erase and retension the tape cartridge.  (C,S,F)

    load        Load the tape cartridge.  (S)

    reset       Reset tape controller and tape drive. Clears error conditions
                and returns tape subsystem to power-up state.  (C,S,F)

    reten       Retension tape cartridge.  Should be used periodically to
                remedy slack tape problems.  Tape slack can cause an unusu-
                ally large number of tape errors.  (A)

    rewind      Rewind to beginning of tape (BOT).  (For HP DAT tapes: if the
                tape is partitioned, the logical partition is rewound to the
                logical BOT.  (See dat(HW) for details.) (A)

    status      The status output looks like this:

                status: status message
                soft errors: n
                underruns: m

                Status is a report of the current status of the drive; ``no
                cartridge'', ``write protected'', or ``beginning of tape''
                are typical status messages.

                Soft errors is the number of recoverable errors that occurred
                during the last tape operation.  A recoverable error is one
                which is correctable by the drive or controller.  An example
                of a non-recoverable ``hard'' error is an attempt to write to
                a write-protected cartridge.  Note that if the number of soft
                errors greatly exceeds the manufacturer's specifications, the
                drive may require service or replacement, or you may be using
                a defective tape.

                Underruns is the number of times the tape drive had to stop
                and restart due to tape buffer underflows.  Underruns are not
                an error indication; they mean that the data transfer did not
                occur at the drive's maximum data transfer rate.  The number
                of underruns can be affected by system load.  (C,S,F)

    partition   Partition an HP DAT tape into logical partitions 1 and 2.
                The size (in megabytes) of partition 2 is specified on the
                command line.  (The size of partition 1 is the remainder of
                the tape.) For example:  tape -a 200 partition creates a 200
                megabyte partition (in partition 2) while partition 1
                comprises the rest of the tape.  (For a 1300 megabyte unfor-
                matted DAT tape, partition 1 contains approximately 1100
                megabytes of data.)  (HP DAT only.  See dat(HW) for addi-
                tional information.)

    unload      Unloads the tape cartridge.  (S)

    format      Format the tape cartridge.  Floppy controller-based tapes
                must be formatted before they can be used.  This command
                takes approximately one minute per megabyte of tape capacity.
                If an argument is provided with the -a flag, the number of
                tracks specified by the argument will be formatted.  Only
                even numbers less than or equal to the number of tracks on
                the tape are allowed.  (See tape(HW) for more information.)
                If no argument is given, the entire tape will be formatted.
                (F,I)

                Reformatted tapes are available and highly recommended.
                Pre-formatted tapes are more reliable than user-formatted
                tapes.  Before reformatting a used tape, you must erase it
                with a bulk eraser.  Proper use of a bulk eraser is not
                trivial; refer to the documentation for your bulk eraser.

    getbb       Prints a list of bad tape blocks detected during the last
                tape operation.  This listing can be saved in a file for use
                by the putbb command.  (F)

    map         Prints out a map of the bad blocks on the tape.  The format
                is a series of lines of the format:

                track n: -------------X------...

                Each ``-'' represents a good block on the track; an ``X''
                represents a block marked as bad.  (F)

    putbb       Reads a list of bad tape blocks from the standard input and
                adds them to the bad block table on the tape.  The format
                expected by putbb is the same as generated by the getbb com-
                mand.  (F)

    rfm         Wind tape forward to the next file mark.  (C,S)

    rsm         Position tape forward to the next setmark.  (HP DAT only.
                See the dat(HW) manual page for more information.)

    wfm         Write a file mark at the current tape position.  (C,S)

    wsm         Write a setmark at the current tape position.  (HP DAT only.
                See the dat(HW) manual page for more information.)

    eod         Position the tape to the EOD (the end of written data) (HP
                DAT only.  See the dat(HW) manual page for more information.)

    setblk      Set the tape block size to a specified byte size (S).  For
                example, the following command sets the tape block size to
                512 Bytes:

                tape -a 512 setblk


 Irwin-specific commands

    The following commands are all specific to Irwin drives.

    drive       displays information about the Irwin driver and the tape
                drive.  An example display is:

                Special file: /dev/rctmini
                Driver version: 1.0.6a
                Drive type: 285XL
                Drive firmware: A0
                Controller type: SYSFDC
                Unit select (0-3): 3

                Special file is the name of the special file used to access
                the driver.

                Driver version is the version of the driver linked with the
                kernel.

                Drive type is an ``equivalent'' tape drive model number as
                determined by the MC driver.  Since the exact model number of
                the tape drive depends on the drive's form factor and whether
                the drive is mounted in its own cabinet, the equivalent model
                number may not be the exact model of the installed tape
                drive. The following is a list of equivalent drives:

                110:        110, 310, 410

                120[XL]:    120, 220, 320, 420, 720, 2020

                125:        125, 225, 325, 425, 725

                145[XL]:    145, 245, 345, 445, 745, 2040

                165:        165, 265, 465, 765

                285XL:      285, 485, 785, 2080

                287XL:      287, 487, 787, 2120

                The brackets in the 120[XL] and 145[XL] mean the letters
                ``XL'' may or may not be present.  When the letters ``XL''
                appear, the drive is capable of servo writing extra long
                (that is, 307.5 foot DC2120) tapes.

                Note:  When this field displays ``125/145,'' either a 125
                drive or an early model 145 drive with a DC1000 is present:
                the driver can't distinguish between the two.  A 125 drive
                will only accept a DC1000 cartridge (a DC2000 or DC2120 will
                not fit).  A 145 drive will accommodate DC1000, DC2000, or
                DC2120 cartridges.

                Drive firmware is the firmware part number and revision
                level.  This line is present only for drives which report
                this information.

                Controller type is a mnemonic for the floppy controller to
                which the tape drive is attached:

                ________________________________________________________
                Mnemonic     Description
                ________________________________________________________
                SYSFDC       System floppy controller
                ALTFDC       Alternate floppy controller
                4100MC       Irwin 4100MC Micro Channel controller
                4100MCB      Second 4100MC Micro Channel controller
                4100         Irwin 4100 PC Bus controller
                4100B        Second 4100 PC Bus controller

                Unit select (0-3) gives the controller's unit select, in the
                range 0 through 3.  The unit select selects the drive.

    info        displays Irwin cartridge information.  For example:

                Cartridge state: Formatted
                Cartridge format: 145
                Write protect slider position: RECORD

                Cartridge state is the current state of the cartridge's for-
                mat.

                Cartridge format indicates the format on the cartridge's
                tape.  The format is given in a code which is the same as the
                drive model on which the cartridge was originally formatted
                (see drive and tape(HW) for details). When the cartridge is
                blank, the code has the format which would be applied by the
                format command.

                Write protect slider position is RECORD or PROTECT.

    capacity    cartridge capacity in 512-byte blocks.

    kapacity    cartridge capacity in 1024-byte blocks.

                These two commands give the total usable data storage capa-
                city of a formatted tape cartridge.  Variations in cartridge
                capacity are due to differing numbers of bad blocks.

 Files

    Devices:

    /dev/rStp0    /dev/rct0    /dev/erct0     /dev/rmc1
    /dev/nrStp0   /dev/nrct0   /dev/xct0      /dev/mcdaemon
    /dev/xStp0    /dev/rct2    /dev/rctmini
    /dev/rft0     /dev/nrct2   /dev/xctmini
    /dev/xft0     /dev/xct0    /dev/rmc0

    /etc/default/tape
    /etc/default/mcconfig
    /etc/mcdaemon


    For DAT tapes:

    /dev/urStp0.0    /dev/urStp0.1
    /dev/nurStp0.0   /dev/nurStp0.1
    /dev/nrStp0.0    /dev/nrStp0.1
    /dev/xStp0.0     /dev/xStp0.1


    The DAT partition 1 is linked to the default SCSI tape device locations:

    /dev/rStp0     linked to   /dev/nurStp0.0
    /dev/rStp0.0   linked to   /dev/nurStp0.0
    /dev/nrStp0    linked to   /dev/nrStp0.0
    /dev/xStp0     linked to   /dev/xStp0.0
    /dev/urStp0    linked to   /dev/urStp0.0
    /dev/rStp0.1   linked to   /dev/nurStp0.1


    Note that if you have not installed a cartridge tape on your system, SCSI
    tapes device are linked to /dev/rct0.

    Include files:

    /usr/include/sys/tape.h
    /usr/include/sys/ct.h
    /usr/include/sys/ft.h
    /usr/include/sys/ir.h

 See also

    backup(ADM), cpio(C), dd(C), mcconfig(F), mcdaemon(F), restore(ADM),
    tape(HW), tar(C), xbackup(ADM), xrestore(ADM)

 Notes

    See tape(HW) and the Release Notes for a list of supported tape drives.

    The amount and reset commands can be used while the tape is busy with
    other operations.  All other commands wait until the currently executing
    command has been completed before proceeding.

    If you use the status command while the tape drive is busy, no message is
    displayed until the drive is free.

    When you are using the non-rewinding tape device or the tape commands rfm
    and wfm, the tape drive light remains on after the command has been com-
    pleted, indicating that more operations may be performed on the tape.
    The tape rewind command may be used to clear this condition.

    For more information on device files, (listed above), see the tape(HW)
    manual page.

 Value added

    tape and mcart are extensions of AT&T System V provided by The Santa Cruz
    Operation, Inc.


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026