dat(HW) 19 June 1992 dat(HW) Name dat - digital audio tape device Description Digital Audio Tape (DAT) devices, such as the HP DAT device, are cassette tape drives based on DAT technology. These devices use a Digital Data Storage (DDS) recording format developed for computer applications. Digital Audio Tapes are also referred to as either 4-mm tapes or DAT tapes. The DDS media requires no pre-formatting unless you want to partition the tape. See the section ``Partitions'' later in this manual page. A typi- cal 60-meter cassette holds approximately 1300 megabytes of data. The DAT drive operates similarly to other SCSI cartridge tape drives (and traditional nine-track drives). You can use typical UNIX system utili- ties (such as tar(C), cpio(C), and tape(C) with DAT drives in the same way that you use these utilities with other SCSI tape drives. Several DDS features are explained in later sections: setmarks, fast search, and partition support. These features allow applications greater speed and flexibility in archiving and accessing data. Setmarks Data on tapes is usually organized as a sequence of one or more tape records, forming a file. A tape can contain a sequence of tape records and files. Filemarks indicate the end of a file and mark separation between files. Positioning a tape to a filemark occurs much faster than the typical read/write speed. The DDS format introduces an additional type of mark, called the setmark. Logically, it is a higher organizational unit than a filemark; a search to a setmark ignores filemarks (whereas the reverse is not true). Together, filemarks and setmarks are called tapemarks. The DDS format still uses records and filemarks in the standard manner. If you, or an application, choose to ignore setmarks, then the DDS drive responds the same way as other SCSI tape devices. One way to use setmarks is by grouping together sets of files that are logically connected. This is especially valuable on larger capacity tapes (such as the HP DAT tape) that can contain numerous files. By using setmarks in conjunction with filemarks, access to a specified file can be improved dramatically. You can write setmarks by using the tape command. See tape(C). Fast search This is a function of the drive firmware. It cannot be evoked by a com- mand from the host system. The DDS mechanism enables a tapemark search at speeds in excess of 100 times the normal read/write speed. At these speeds, a search for a setmark on a 1300 megabyte tape typically takes only 22.5 seconds. Partitions The DDS format allows the tape to be formatted into two entirely separate and independent partitions, each with its own distinct data area. Each partition can have a minimum size (this value is dependent on the tape type; for example, HP DAT specifies a minimum value of 1 megabyte) and a maximum size of the whole tape. Select the desired device file to access individual partitions. You do not need to partition or format a DDS tape before use. If you want to use the simplest mode of operation, you can take any DAT cassette, insert it into the drive, and start to use it immediately. In this case, the tape effectively has one partition that spans the entire tape. If you format the tape into two partitions, the tape behaves as two independent units. Each partition acts as a logically distinct tape, and tape operations are specific to the partition selected (via the device file). Several examples illustrate this. This example shows a partitioned tape with device driver files: ls -l /dev/nurStp1 /dev/nrStp1.1 crw-rw-rw- 2 root other 46, 4 /dev/nurStp1.0 crw-rw-rw- 1 root other 46, 68 /dev/nurStp1.1 To simplify references to the two partitions, you can link the device filenames to mnemonic filenames: ln /dev/nurStp1.0 /dev/part1 ln /dev/nurStp1.1 /dev/part2 In the following example, the first command archives /dir_A onto parti- tion 1, and the second command archives /dir_B onto partition 2: find /dir_A -print | cpio -oB > /dev/part1 find /dir_B -print | cpio -oB > /dev/part2 Note that both partitions are on the same tape. If an application rewinds the tape, selecting /dev/part2, then the tape head is positioned at the beginning of the tape for partition 2. Use the tape command to format a tape into two partitions. For example, to create a 500 megabyte partition on a DDS tape, enter: tape -a 500 partition Partition 2 is 500 megabytes, while partition 1 is the remainder of the tape. For a 1300 megabyte tape, this implies that partition 1 is approx- imately 800 megabytes. To reformat two partitions into a single parti- tion, execute the tape command with a partition size of 0. Files The device files created for the DAT are: /dev/urStp1.0 /dev/urStp1.1 /dev/nurStp1.0 /dev/nurStp1.1 /dev/nrStp1.0 /dev/nrStp1.1 /dev/xStp1.0 /dev/xStp1.1 The DAT partition 1 is linked to the default SCSI tape device locations: /dev/rStp1 linked to /dev/nurStp1.0 /dev/rStp1.0 linked to /dev/nurStp1.0 /dev/nrStp1 linked to /dev/nrStp1.0 /dev/xStp1 linked to /dev/xStp1.0 /dev/urStp1 linked to /dev/urStp1.0 /dev/rStp1.1 linked to /dev/nurStp1.1 The following tables define the filename prefixes and suffixes: _________________________________________________________________________ Prefix Definition _________________________________________________________________________ nu no unload on close u unload on close r rewind on close nr no rewind on close x control override (same as SCSI tapes) _________________________________________________________________________ Suffix Definition _________________________________________________________________________ .0 partition 1 .1 partition 2 Standard SCSI tape devices /dev/rStp1, /dev/nrStp1, and /dev/xStp1 are linked into the .0 device nodes. /dev/rStp1 is linked to /dev/nurStp1.0. This creates a minor number for rStp1 that is different than the minor number for a standard SCSI tape. Notes The HP DAT drive supports Immediate Response. (Immediate Response is the ability of the drive to return good status on write requests after the data has been written to the buffer, but before the actual data is writ- ten to tape.) Immediate Response is automatically enabled. The device performs all error detection and error correction. Although the HP DAT drive can operate in both variable mode and fixed- block mode, only fixed-block mode is supported for higher performance. See also tape(C), tape(HW)