Merge commit '9276b3991ba20d5a5660887ba81b0bc7bed25a0c'
[unleashed.git] / share / man / man7d / st.7d
blob3ffc950f02efe9fe912ec242697c0513235d2ed5
1 '\" te
2 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH ST 7D "April 9, 2016"
7 .SH NAME
8 st \- driver for SCSI tape devices
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBst@\fR\fItarget\fR\fB,\fR\fIlun\fR\fB:\fR\fIl\fR\fB,\fR\fIm\fR\fB,\fR\fIh\fR\fB,\fR\fIc\fR\fB,\fR\fIu\fR\fIb\fR\fIn\fR
13 .fi
15 .SH DESCRIPTION
16 .LP
17 The \fBst\fR device driver provides a standard interface to various \fBSCSI\fR
18 tape devices. See \fBmtio\fR(7I) for details.
19 .sp
20 .LP
21 To determine if the \fBst\fR device driver supports your tape device, SPARC
22 users should enter the following on a command line:
23 .sp
24 .in +2
25 .nf
26 % strings /kernel/drv/sparcv9/st | grep -i <tape device name>
27 .fi
28 .in -2
30 .sp
31 .LP
32 x86 users can do the following to determine if the \fBst\fR device driver
33 supports a particular tape device:
34 .sp
35 .in +2
36 .nf
37 % strings /kernel/drv/st | grep -i <tape device name>
38 .fi
39 .in -2
41 .sp
42 .LP
43 The driver can be opened with either rewind on close or no rewind on close
44 options. It can also be opened with the \fBO_NDELAY\fR (see \fBopen\fR(2))
45 option when there is no tape inserted in the drive. A maximum of four tape
46 formats per device are supported (see \fBFILES\fR below). The tape format is
47 specified using the device name. (Tape format is also referred to as tape
48 density).
49 .sp
50 .LP
51 Following are a list of SCSI commands that can be executed while another host
52 reserves the tape drive. The commands are:
53 .sp
54 .in +2
55 .nf
56 SCMD_TEST_UNIT_READY
57 SCMD_REQUEST_SENSE
58 SCMD_READ_BLKLIM
59 SCMD_INQUIRY
60 SCMD_RESERVE
61 SCMD_RELEASE
62 SCMD_DOORLOCK
63 SCMD_REPORT_DENSITIES
64 SCMD_LOG_SENSE_G1
65 SCMD_PERSISTENT_RESERVE_IN
66 SCMD_PERSISTENT_RESERVE_OUT
67 SCMD_REPORT_LUNS
68 .fi
69 .in -2
71 .sp
72 .LP
73 In multi-initiator environments, the driver will not reserve  the tape drive if
74 above commands are issued. For other SCSI commands, the driver reserves the
75 tape drive and releases the drive at close if  it has been reserved. Refer to
76 the MTIOCRESERVE and MTIOCRELEASE ioctls  in \fBmtio\fR(7I) for information
77 about how to allow a tape drive to remain  reserved upon close. See the flag
78 options below for information about  disabling this feature.
79 .sp
80 .LP
81 If a SCSI-3 persistent reservation is done through the driver, the  driver
82 disables all existing SCSI-2 reservations.
83 .sp
84 .LP
85 If the tape drive is opened in O_NDELAY mode, no reservation occurs  during the
86 open, as per the POSIX standard (see \fBstandards\fR(5)). However, if a command
87 not found in the above list is used, a  reservation will occur to provide
88 reserve/release functionality before the command is issued.
89 .SS "Persistent Errors and Asynchronous Tape Operation"
90 .LP
91 The \fBst\fR driver now supports persistent errors (see \fBmtio\fR(7I) and
92 asynchronous tape operations (see \fBmtio\fR(7I), \fBaioread\fR(3C), and
93 \fBaiowrite\fR(3C)).
94 .SS "Read Operation"
95 .LP
96 If the driver is opened for reading in a different format than the tape is
97 written in, the driver overrides the user-selected format. For example, if a
98 1/4" cartridge tape is written in QIC-24 format and opened for reading in
99 QIC-150, the driver detects a read failure on the first read and automatically
100 switches to QIC-24 to read the data.
103 Note that if the low density format is used, no indication is given that the
104 driver has overridden the format you selected. Other formats issue a warning
105 message to inform you of an overridden format selection. Some devices
106 automatically perform this function and do not require driver support (1/2"
107 reel tape drive, for example).
108 .SS "Write Operation"
110 Writing from the beginning of tape is performed in the user-specified format.
111 The original tape format is used for appending onto previously written tapes.
112 .SS "Tape Configuration"
114 The \fBst\fR driver has a built-in configuration table for most Sun-supported
115 tape drives. For those tape drives that are not in the table, the \fBst\fR
116 driver tries to read the configuration from the tape drive through optional
117 SCSI-3 commands. To support the addition of third party tape devices which are
118 not in the  built-in configuration table or not able to report their
119 configuration, device information can be supplied in \fBst.conf\fR as global
120 properties that apply to each node, or as properties that are applicable to one
121 node only. By supplying the information in \fBst.conf\fR, the built-in
122 configuration is overridden and the \fBst\fR driver will not query the
123 configuration from tape drives. The \fBst\fR driver looks for the property
124 called \fBtape-config-list\fR. The value of this property is a list of
125 triplets, where each triplet consists of three strings.
128 The formal syntax is:
130 .in +2
132 tape-config-list = <triplet> [, <triplet> *];
134 .in -2
139 where
141 .in +2
143 <triplet> := <vid+pid>, <pretty print>, <data-property-name>
145 .in -2
152 .in +2
154 <data-property-name> = <version>, <type>, <bsize>,
155         <options>, <number of densities>,
156         <density> [, <density>*], <default-density>;
158 .in -2
165 .in +2
167 <data-property-name> = <version 2>, <type>, <bsize>,
168                 <options>, <number of densities>,
169                 <density> [, <density>*], <default-density>,
170                 <non-motion time-out>, <I/O time-out>,
171                 <rewind time-out>, <space time-out>,
172                 <load time-out>, <unload time-out>,
173                 <erase time-out>;
175 .in -2
179 .in +2
183 .in -2
187 A semicolon (\fB;\fR) is used to terminate a prototype devinfo node
188 specification. Individual elements listed within the specification should not
189 be separated by a semicolon. (Refer to \fBdriver.conf\fR(4) for more
190 information.)
193 \fB<vid+pid>\fR is the string that is returned by the tape device on a
194 \fBSCSI\fR inquiry command. This string may contain any character in the range
195 \fB0x20-0x7e\fR. Characters such as " " " (double quote) or " ' " (single
196 quote), which are not permitted in property value strings, are represented by
197 their octal equivalent (for example, \fB\e042\fR and \fB\e047\fR). Trailing
198 spaces may be truncated.
201 \fB<pretty print>\fR is used to report the device on the console. This string
202 may have zero length, in which case the \fB<vid+pid>\fR will be used to report
203 the device.
206 \fB<data-property-name>\fR is the name of the property which contains all the
207 tape configuration values (such as \fB<type>\fR, \fB<bsize>\fR, etc.)
208 corresponding for the tape drive for the specified \fB<vid+pid>\fR\&.
211 \fB<version>\fR is a version number and should be 1 or 2. In the future, higher
212 version numbers may be used to allow for changes in the syntax of the
213 \fB<data-property-name>\fR value list.
216 \fB<type>\fR is a type field. Valid types are defined in
217 \fB/usr/include/sys/mtio.h\fR. For third party tape configuration, the
218 following generic types are recommended:
223 l l
224 l l .
225 \fBMT_ISQIC\fR  0x32
226 \fBMT_ISREEL\fR 0x33
227 \fBMT_ISDAT\fR  0x34
228 \fBMT_IS8MM\fR  0x35
229 \fBMT_ISOTHER\fR        0x36
230 \fBMT_ISTAND25G\fR      0x37
231 \fBMT_ISDLT\fR  0x38
232 \fBMT_ISSTK9840\fR      0x39
233 \fBMT_ISBMDLT1\fR       0x3A
234 \fBMT_LTO\fR    0x3B
239 \fB<bsize>\fR is the preferred block size of the tape device. The value should
240 be \fB0\fR for variable block size devices.
243 \fB<options>\fR is a bit pattern representing the devices, as defined in
244 \fB/usr/include/sys/scsi/targets/stdef.h\fR. Valid flags for tape configuration
245 are shown in the following table. Note that this table does not list flags that
246 are non-configurable in \fBst.conf\fR (including \fBST_KNOWS_MEDIA\fR which
247 uses the media type reported from the mode select data to select the correct
248 density code).
253 l l
254 l l .
255 \fBST_VARIABLE\fR       0x0001
256 \fBST_QIC\fR    0x0002
257 \fBST_REEL\fR   0x0004
258 \fBST_BSF\fR    0x0008
259 \fBST_BSR\fR    0x0010
260 \fBST_LONG_ERASE\fR     0x0020
261 \fBST_AUTODEN_OVERRIDE\fR       0x0040
262 \fBST_NOBUF\fR  0x0080
263 \fBST_KNOWS_EOD\fR      0x0200
264 \fBST_UNLOADABLE\fR     0x0400
265 \fBST_SOFT_ERROR_REPORTING\fR   0x0800
266 \fBST_LONG_TIMEOUTS\fR  0x1000
267 \fBST_NO_RECSIZE_LIMIT\fR       0x8000
268 \fBST_MODE_SEL_COMP\fR  0x10000
269 \fBST_NO_RESERVE_RELEASE\fR     0x20000
270 \fBST_READ_IGNORE_ILI\fR        0x40000
271 \fBST_READ_IGNORE_EOFS\fR       0x80000
272 \fBST_SHORT_FILEMARKS\fR        0x100000
273 \fBST_EJECT_TAPE_ON_CHANGER_FAILURE\fR  0x200000
274 \fBST_RETRY_ON_RECOVERED_DEFERRED_ERROR\fR      0x400000
275 \fBST_WORMABLE\fR       0x1000000
279 .ne 2
281 \fB\fBST_VARIABLE\fR\fR
283 .sp .6
284 .RS 4n
285 The flag indicates the tape device supports variable length record sizes.
289 .ne 2
291 \fB\fBST_QIC\fR\fR
293 .sp .6
294 .RS 4n
295 The flag indicates a Quarter Inch Cartridge (QIC) tape device.
299 .ne 2
301 \fB\fBST_REEL\fR\fR
303 .sp .6
304 .RS 4n
305 The flag indicates a 1/2\(miinch reel tape device.
309 .ne 2
311 \fB\fBST_BSF\fR\fR
313 .sp .6
314 .RS 4n
315 If flag is set, the device supports backspace over EOF marks (bsf - see
316 \fBmt\fR(1)).
320 .ne 2
322 \fB\fBST_BSR\fR\fR
324 .sp .6
325 .RS 4n
326 If flag is set, the tape device supports the backspace record operation (bsr -
327 see \fBmt\fR(1)). If the device does not support bsr, the \fBst\fR driver
328 emulates the action by rewinding the tape and using the forward space record
329 (fsf) operation to forward the tape to the correct file. The driver then uses
330 forward space record (fsr - see \fBmt\fR(1)) to forward the tape to the correct
331 record.
335 .ne 2
337 \fB\fBST_LONG_ERASE\fR\fR
339 .sp .6
340 .RS 4n
341 The flag indicates the tape device needs a longer time than normal to erase.
345 .ne 2
347 \fB\fBST_AUTODEN_OVERRIDE\fR\fR
349 .sp .6
350 .RS 4n
351 The auto-density override flag. The device is capable of determining the tape
352 density automatically without issuing a "mode-select"/"mode-sense command."
356 .ne 2
358 \fB\fBST_NOBUF\fR\fR
360 .sp .6
361 .RS 4n
362 The flag disables the device's ability to perform buffered writes. A buffered
363 write occurs when the device acknowledges the completion of a write request
364 after the data has been written to the device's buffer, but before all of the
365 data has been written to the tape.
369 .ne 2
371 \fB\fBST_KNOWS_EOD\fR\fR
373 .sp .6
374 .RS 4n
375 If flag is set, the device can determine when EOD (End of Data) has been
376 reached. When this flag is set, the \fBst\fR driver uses fast file skipping.
377 Otherwise, file skipping happens one file at a time.
381 .ne 2
383 \fB\fBST_UNLOADABLE\fR\fR
385 .sp .6
386 .RS 4n
387 The flag indicates the device will not complain if the \fBst\fR driver is
388 unloaded and loaded again (see \fBmodload\fR(8) and \fBmodunload\fR(8)). That
389 is, the driver will return the correct inquiry string.
393 .ne 2
395 \fB\fBST_SOFT_ERROR_REPORTING\fR\fR
397 .sp .6
398 .RS 4n
399 The flag indicates the tape device will perform a "request sense" or "log
400 sense" command when the device is closed. Currently, only Exabyte and \fBDAT\fR
401 drives support this feature.
405 .ne 2
407 \fB\fBST_LONG_TIMEOUTS\fR\fR
409 .sp .6
410 .RS 4n
411 The flag indicates the tape device requires timeouts that are five times longer
412 than usual for normal operation.
416 .ne 2
418 \fB\fBST_NO_RECSIZE_LIMIT\fR \fR
420 .sp .6
421 .RS 4n
422 The flag applies to variable-length tape devices. If this flag is set, the
423 record size is not limited to a 64 Kbyte record size. The record size is only
424 limited by the smaller of either the record size supported by the device or the
425 maximum DMA transfer size of the system. (Refer to \fBLarge Record Sizes\fR and
426 \fBWARNINGS\fR.) The maximum block size that will not be broken into smaller
427 blocks can be determined from the mt_bf returned from the MTIOCGET ioctl().
428 This number is the lesser of the upper block limit returned by the drive from
429 READ BLOCK LIMITS command and the dma-max property set by the Host Bus Adapter
430 (HBA) to which the drive is attached.
434 .ne 2
436 \fB\fBST_MODE_SEL_COMP\fR\fR
438 .sp .6
439 .RS 4n
440 If the \fBST_MODE_SEL_COMP\fR flag is set, the driver determines which of the
441 two mode pages the device supports for selecting or deselecting compression. It
442 first tries the Data Compression mode page (\fB0x0F\fR); if this fails, it
443 tries the Device Configuration mode page (\fB0x10\fR). Some devices, however,
444 may need a specific density code for selecting or deselecting compression.
445 Please refer to the device specific \fBSCSI\fR manual. When the flag is set,
446 compression is enabled only if the "c" or "u" device is used. Note that when
447 the lower 2 densities of a drive are identically configured and the upper 2
448 densities are identically configured, but the lower and upper differ from each
449 other and ST_MODE_SEL_COMP is set, the "m" node sets compression \fBon\fR for
450 the lower density code (for example, 0x42) and the "c" and "u" nodes set
451 compression \fBon\fR for the higher density (for example, 0x43). For any other
452 device densities, compression is disabled.
456 .ne 2
458 \fB\fBST_NO_RESERVE_RELEASE\fR\fR
460 .sp .6
461 .RS 4n
462 The \fBST_NO_RESERVE_RELEASE\fR flag disables the use of reserve on open and
463 release on close. If an attempt to use a ioctl of \fBMTRESERVE\fR or
464 \fBMTRELEASE\fR on a drive with this flag set, it will return an error of
465 \fBENOTTY\fR (inappropriate ioctl for device).
469 .ne 2
471 \fB\fBST_READ_IGNORE_ILI\fR\fR
473 .sp .6
474 .RS 4n
475 The \fBST_READ_IGNORE_ILI\fR flag is applicable only to variable block devices
476 which support the SILI bit option. The \fBST_READ_IGNORE_ILI\fR flag indicates
477 that SILI (suppress incorrect length indicator) bit will be set during reads.
478 When this flag is set, short reads (requested read size is less than the record
479 size on the tape) will be successful and the number of bytes transferred will
480 be equal to the record size on the tape. The tape will be positioned at the
481 start of the next record skipping over the extra data (the remaining data has
482 been has been lost). Long reads (requested read size is more than the record
483 size on the tape) will see a large performance gain when this flag is set, due
484 to overhead reduction. When this flag is not set, short reads will return an
485 error of \fBENOMEM\fR.
489 .ne 2
491 \fB\fBST_READ_IGNORE_EOFS\fR\fR
493 .sp .6
494 .RS 4n
495 The \fBST_READ_IGNORE_EOFS\fR flag is applicable only to 1/2" Reel Tape drives
496 and when performing consecutive reads only. It should not be used for any other
497 tape command. Usually End-of-recorded-media (EOM) is indicated by two EOF marks
498 on 1/2" tape and application cannot read past EOM. When this flag is set, two
499 EOF marks no longer indicate EOM allowing applications to read past two EOF
500 marks. In this case it is the responsibility of the application to detect
501 end-of-recorded-media (EOM). When this flag is set, tape operations (like
502 MTEOM) which positions the tape at end-of-recorded-media will fail since
503 detection of end-of-recorded-media (EOM) is to be handled by the application.
504 This flag should be used when backup applications have embedded double
505 filemarks between files.
509 .ne 2
511 \fB\fBST_SHORT_FILEMARKS\fR\fR
513 .sp .6
514 .RS 4n
515 The \fBST_SHORT_FILEMARKS\fR flag is applicable only to EXABYTE 8mm tape drives
516 which supports short filemarks. When this flag is set, short filemarks is used
517 for writing filemarks. Short filemarks could lead to tape incompatible with
518 some otherwise compatible device. By default long filemarks will be used for
519 writing filemarks.
523 .ne 2
525 \fB\fBST_EJECT_TAPE_ON_CHANGER_FAILURE\fR\fR
527 .sp .6
528 .RS 4n
529 If \fBST_EJECT_TAPE_ON_CHANGER_FAILURE\fR flag is set, the tape is ejected
530 automatically if the tape cartridge is trapped in the medium due to positioning
531 problems of the medium changer.
533 The following ASC/ASCQ keys are defined to the reasons for causing tape
534 ejection if \fBST_EJECT_TAPE_ON_CHANGER_FAILURE\fR option is set to 0x200000:
536 Sense  ASC/ASCQ  Description
540 4      15/01     Mechanical Failure
542 4      44/00     Internal Target Failure
544 2      53/00     Media Load or Eject Failed
546 4      53/00     Media Load or Eject Failed
548 4      53/01     Unload Tape Failure
552 .ne 2
554 \fB\fBST_RETRY_ON_RECOVERED_DEFERRED_ERROR\fR\fR
556 .sp .6
557 .RS 4n
558 If \fBST_RETRY_ON_RECOVERED_DEFERRED_ERROR\fR flag is set, the \fBst\fR driver
559 will retry the last write if this cmd caused a check condition with error code
560 0x71 and sense code 0x01. Some tape drives, notably the IBM 3090, require this
561 option.
565 .ne 2
567 \fB\fBST_WORMABLE\fR\fR
569 .sp .6
570 .RS 4n
571 When \fBST_WORMABLE\fR is set, \fBst\fR attempts to detect the presence of WORM
572 media in the device.
577 \fB<number of densities>\fR is the number of densities specified. Each tape
578 drive can support up to four densities. The value entered should therefore be
579 between \fB1\fR and \fB4\fR; if less than \fB4\fR, the remaining densities will
580 be assigned a value of \fB0x0\fR.
583 \fB<density>\fR is a single-byte hexadecimal number. It can either be found in
584 the device specification manual or be obtained from the device vendor.
587 \fB<default-density>\fR has a value between \fB0\fR and (<number of densities>
588 - \fB1\fR).
591 \fB<non-motion time-out>\fR Time in seconds that the drive should be able to
592 perform any SCSI command that doesn't require tape to be moved. This includes
593 mode sense, mode select, reserve, release, read block limits, and test unit
594 ready.
597 \fB<I/O time-out>\fR Time in seconds to perform data transfer I/O to or from
598 tape including worst case error recovery.
601 \fB<rewind time-out>\fR Time in seconds to rewind from anywhere on tape to BOT
602 including worst case recovery forcing buffered write data to tape.
605 \fB<space time-out>\fR Time in seconds to space to any file, block or end of
606 data on tape. Including worst case when any form of cataloging is invalid.
609 \fB<load time-out>\fR Time in seconds to load tape and be ready to transfer
610 first block. This should include worst case recovery reading tape catalog or
611 drive specific operations done at load.
614 \fB<unload time-out>\fR Time in seconds to unload tape. Should include worst
615 case time to write to catalog, unthread, and tape cartridge unloading. Also
616 should include worst case time for any drive specific operations that are
617 preformed at unload. Should not include rewind time as the driver rewinds tape
618 before issuing the unload.
621 \fB<erase time-out>\fR Time in seconds to preform a full (BOT to EOT) erase of
622 longest medium with worst case error recovery.
623 .SS "Device Statistics Support"
625 Each device maintains I/O statistics both for the device and for each partition
626 allocated on that device. For each device/partition, the driver accumulates
627 reads, writes, bytes read, and bytes written. The driver also takes
628 hi-resolution time stamps at queue entry and exit points, which facilitates
629 monitoring the residence time and cumulative residence-length product for each
630 queue.
633 Each device also has error statistics associated with it. These must include
634 counters for hard errors, soft errors and transport errors. Other data may be
635 implemented as required.
636 .SH IOCTLS
638 The behavior of \fBSCSI\fR tape positioning ioctls is the same across all
639 devices which support them. (Refer to \fBmtio\fR(7I).) However, not all devices
640 support all ioctls. The driver returns an \fBENOTTY\fR error on unsupported
641 ioctls.
644 The retension ioctl only applies to 1/4" cartridge tape devices. It is used to
645 restore tape tension, thus improving the tape's soft error rate after extensive
646 start-stop operations or long-term storage.
649 In order to increase performance of variable-length tape devices (particularly
650 when they are used to read/write small record sizes), two operations in the
651 \fBMTIOCTOP\fR ioctl, \fBMTSRSZ\fR and \fBMTGRSZ\fR, can be used to set and get
652 fixed record lengths. The ioctl also works with fixed-length tape drives which
653 allow multiple record sizes. The min/max limits of record size allowed on a
654 driver are found by using a SCSI-2 \fBREAD\fR \fBBLOCK\fR \fBLIMITS\fR command
655 to the device. If this command fails, the default min/max record sizes allowed
656 are 1 byte and 63k bytes. An application that needs to use a different record
657 size opens the device, sets the size with the \fBMTSRSZ\fR ioctl, and then
658 continues with I/O. The scope of the change in record size remains until the
659 device is closed. The next open to the device resets the record size to the
660 default record size (retrieved from \fBst.conf\fR).
663 Note that the error status is reset by the \fBMTIOCGET\fR get status ioctl call
664 or by the next read, write, or other ioctl operation. If no error has occurred
665 (sense key is \fB0\fR), the current file and record position is returned.
666 .SH ERRORS
667 .ne 2
669 \fB\fBEACCES\fR\fR
671 .RS 10n
672 The driver is opened for write access and the tape is write-protected or the
673 tape unit is reserved by another host.
677 .ne 2
679 \fB\fBEBUSY\fR\fR
681 .RS 10n
682 The tape drive is in use by another process. Only one process can use the tape
683 drive at a time. The driver will allow a grace period for the other process to
684 finish before reporting this error.
688 .ne 2
690 \fB\fBEINVAL\fR\fR
692 .RS 10n
693 The number of bytes read or written is not a multiple of the physical record
694 size (fixed-length tape devices only).
698 .ne 2
700 \fB\fBEIO\fR\fR
702 .RS 10n
703 During opening, the tape device is not ready because either no tape is in the
704 drive, or the drive is not on-line. Once open, this error is returned if the
705 requested I/O transfer could not be completed.
709 .ne 2
711 \fB\fBENOTTY\fR\fR
713 .RS 10n
714 This indicates that the tape device does not support the requested ioctl
715 function.
719 .ne 2
721 \fB\fBENXIO\fR\fR
723 .RS 10n
724 During opening, the tape device does not exist.
728 .ne 2
730 \fB\fBENOMEM\fR\fR
732 .RS 10n
733 This indicates that the record size on the tape drive is more than the
734 requested size during read operation.
737 .SH EXAMPLES
739 \fBExample 1 \fRGlobal tape-config list property
742 The following is an example of a global \fBtape-config-list\fR property:
745 .in +2
747 tape-config-list =
748 "Magic DAT", "Magic 4mm Helical Scan", "magic-data",
749 "Major Appliance", "Major Appliance Tape", "major-tape";
752 magic-data  = 1,0x34,1024,0x1639,4,0,0x8c,0x8c,0x8c,3;
753 major-tape = 2,0x3c,0,0x18619,4,0x0,0x0,0x0,0x0,
754              3,0,0,30,120,0,0,36000;
756 name="st" class="scsi"
757           target=0 lun=0;
758 name="st" class="scsi"
759           target=1 lun=0;
760 name="st" class="scsi"
761           target=2 lun=0;
762           .
763           .
764           .
765 name="st" class="scsi"
766           target=6 lun=0;
768 .in -2
771 \fBExample 2 \fRTape-config-list property applicable to target 2 only
774 The following is an example of a tape-config-list property applicable to target
775 2 only:
778 .in +2
780 name="st" class="scsi"
781         target=0 lun=0;
782 name="st" class="scsi"
783         target=1 lun=0;
784 name="st" class="scsi"
785         target=2 lun=0
786         tape-config-list =
787         "Magic   DAT", "Magic 4mm Helical Scan", "magic-data"
788         magic-data = 1,0x34,1024,0x1639,4,0,0x8c,0x8c,0x8c,3;
789 name="st" class="scsi"
790         target=3 lun=0;
791           .
792           .
793           .
794 name="st" class="scsi"
795         target=6 lun=0;
797 .in -2
799 .SS "Large Record Sizes"
801 To support applications such as seismic programs that require large record
802 sizes, the flag \fBST_NO_RECSIZE_LIMIT\fR must be set in drive option in the
803 configuration entry. A SCSI tape drive that needs to transfer large records
804 should \fBOR\fR this flag with other flags in the 'options' field in
805 \fBst.conf\fR. (Refer to \fBTape Configuration\fR.) By default, this flag is
806 set for the built-in config entries of Archive \fBDAT\fR and Exabyte drives.
809 If this flag is set, the \fBst\fR driver issues a SCSI-2 \fBREAD\fR \fBBLOCK\fR
810 \fBLIMITS\fR command to the device to determine the maximum record size allowed
811 by it. If the command fails, \fBst\fR continues to use the maximum record sizes
812 mentioned in the \fBmtio\fR(7I) man page.
815 If the command succeeds, \fBst\fR restricts the maximum transfer size of a
816 variable-length device to the minimum of that record size and the maximum
817 \fBDMA\fR size that the host adapter can handle. Fixed-length devices are bound
818 by the maximum \fBDMA\fR size allocated by the machine. Note that tapes created
819 with a large record size may not be readable by earlier releases or on other
820 platforms.
823 (Refer to the \fBWARNINGS\fR section for more information.)
824 .SS "EOT Handling"
826 The Emulex drives have only a physical end of tape (PEOT); thus it is not
827 possible to write past EOT. All other drives have a logical end of tape
828 (\fBLEOT\fR) before \fBPEOT\fR to guarantee flushing the data onto the tape.
829 The amount of storage between \fBLEOT\fR and \fBPEOT\fR varies from less than 1
830 Mbyte to about 20 Mbyte, depending on the tape drive.
833 If \fBEOT\fR is encountered while writing an Emulex, no error is reported but
834 the number of bytes transferred is \fB0\fR and no further writing is allowed.
835 On all other drives, the first write that encounters \fBEOT\fR will return a
836 short count or \fB0\fR. If a short count is returned, then the next write will
837 return \fB0\fR. After a zero count is returned, the next write returns a full
838 count or short count. A following write returns \fB0\fR again. It is important
839 that the number and size of trailer records be kept as small as possible to
840 prevent data loss. Therefore, writing after \fBEOT\fR is not recommended.
843 Reading past \fBEOT\fR is transparent to the user. Reading is stopped only by
844 reading EOF's. For 1/2" reel devices, it is possible to read off the end of the
845 reel if one reads past the two file marks which mark the end of recorded media.
846 .SH FILES
847 .ne 2
849 \fB\fB/kernel/drv/st.conf\fR\fR
851 .sp .6
852 .RS 4n
853 driver configuration file
857 .ne 2
859 \fB\fB/usr/include/sys/mtio.h\fR\fR
861 .sp .6
862 .RS 4n
863 structures and definitions for mag tape io control commands
867 .ne 2
869 \fB\fB/usr/include/sys/scsi/targets/stdef.h\fR\fR
871 .sp .6
872 .RS 4n
873 definitions for \fBSCSI\fR tape drives
877 .ne 2
879 \fB\fB/dev/rmt/[0\(mi 127][l,m,h,u,c][b][n]\fR\fR
881 .sp .6
882 .RS 4n
883 where \fBl,m,h,u,c\fR specifies the density (low, medium, high,
884 ultra/compressed), \fBb\fR the optional BSD behavior (see \fBmtio\fR(7I)), and
885 \fBn\fR the optional no rewind behavior. For example, \fB/dev/rmt/0lbn\fR
886 specifies unit 0, low density, BSD behavior, and no rewind.
888 For 1/2" reel tape devices (HP-88780), the densities are:
893 l l
894 l l .
895 \fBl\fR 800 BPI density
896 \fBm\fR 1600 BPI density
897 \fBh\fR 6250 BPI density
898 \fBc\fR data compression
899 \fB \fR (not supported on all modules)
902 For 8mm tape devices (Exabyte 8200/8500/8505):
907 l l
908 l l .
909 \fBl\fR Standard 2 Gbyte format
910 \fBm\fR 5 Gbyte format (8500, 8505 only)
911 \fBh,c\fR       5 Gbyte compressed format (8505 only)
914 For 4mm \fBDAT\fR tape devices (Archive Python):
919 l l
920 l l .
921 \fBl\fR Standard format
922 \fBm,h,c\fR     data compression
925 For all QIC (other than QIC-24) tape devices:
930 l l
931 l l .
932 \fBl,m,h,c\fR   density of the tape cartridge type
933         (not all devices can read and
934         write all formats)
937 For QIC-24 tape devices (Emulex MT\(mi02):
942 l l
943 l l .
944 \fBl\fR QIC-11 Format
945 \fBm,h,c\fR     QIC-24 Format
950 .SH SEE ALSO
952 \fBmt\fR(1), \fBmodload\fR(8), \fBmodunload\fR(8), \fBopen\fR(2),
953 \fBread\fR(2), \fBwrite\fR(2), \fBaioread\fR(3C), \fBaiowrite\fR(3C),
954 \fBkstat\fR(3KSTAT), \fBdriver.conf\fR(4), \fBscsi\fR(4), \fBstandards\fR(5),
955 \fBesp\fR(7D), \fBisp\fR(7D), \fBmtio\fR(7I), \fBioctl\fR(9E)
956 .SH DIAGNOSTICS
958 The \fBst\fR driver diagnostics may be printed to the console or messages file.
961 Each diagnostic is dependent on the value of the system variable
962 \fBst_error_level\fR. \fBst_error_level\fR may be set in the \fB/etc/system\fR
963 file. The default setting for \fBst_error_level\fR is 4 (SCSI_ERR_RETRYABLE)
964 which is suitable for most configurations since only actual fault diagnostics
965 are printed. Settings range from values 0 (SCSI_ERR_ALL) which is most verbose,
966 to 6 (SCSI_ERR_NONE) which is least verbose. See \fBstdef.h\fR for the full
967 list of error-levels. SCSI_ERR_ALL level the amount of diagnostic information
968 is likely to be excessive and unnecessary.
971 The st driver diagnostics are described below:
973 .in +2
975 Error for Command: <scsi_cmd_name()> Error Level:<error_class>
976 Requested Block: <blkno>  Error Block: <err_blkno>
977 Vendor: <name>: Serial Number: <inq_serial>
978 Sense Key: <es_key> ASC: 0x<es_add_code> (scsi_asc_ascq_name()>), ASCQ:
979 0x<es_qual_code>, FRU: 0x<ex_fru_code>
981 .in -2
985 where <error_class> may be any one of the following: "All," "Unknown,"
986 "Informational," "Recovered," "Retryable," "Fatal"
989 The command indicated by <scsi_cmd_name> failed. Requested Block represents the
990 block where the transfer started. Error Block represents the block that caused
991 the error. Sense Key, ASC, ASCQ and FRU information is returned by the target
992 in response to a request sense command. See SCSI protocol documentation for
993 description of Sense Key, ASC, ASCQ, FRU.
996 The st driver attempts to validate entries in the \fBst.conf\fR file. Each
997 field in the entry is checked for upper and lower limits and invalid bits set.
998 The fields are named as follows in config string order:
1000 .in +2
1002         conf version
1003         drive type
1004         block size
1005         options
1006         number of densities
1007         density code
1008         default density
1009         non motion timeout
1010         I/O timeout
1011         space timeout
1012         load timeout
1013         unload timeout
1014         erase timeout
1016 .in -2
1020 The \fBst.conf\fR diagnostics are described below:
1022 .in +2
1024 <con-name> <field-in-err> <problem-with-field>
1026 .in -2
1030 where <con-name> is the name of the config string. Where <field-in-err> is the
1031 field containing invalid entries and where <problem-with-field> describes the
1032 nature of the invalid entry.
1034 .in +2
1036 Write/read: not modulo <n> block size
1038 .in -2
1043 The request size for fixed record size devices must be a multiple of the
1044 specified block size.
1046 .in +2
1048 Recovery by resets failed
1050 .in -2
1055 After a transport error, the driver attempted to recover by issuing a device
1056 reset and then a bus reset if device reset failed. These recoveries failed.
1058 .in +2
1060 Periodic head cleaning required
1062 .in -2
1067 The driver reported that periodic head cleaning is now required. This
1068 diagnostic is generated either due to a threshold number of retries, or due to
1069 the device communicating to the driver that head cleaning is required.
1071 .in +2
1073 Soft error rate (<n>%) during writing/reading was too high
1075 .in -2
1080 The soft error rate has exceeded the threshold specified by the vendor.
1082 .in +2
1084 SCSI transport failed: reason 'xxxx': {retrying|giving up}
1086 .in -2
1091 The Host Bus Adapter (HBA) has failed to transport a command to the target for
1092 the reason stated. The driver will either retry the command or, ultimately,
1093 give up.
1095 .in +2
1097 Tape not inserted in drive
1099 .in -2
1104 A media access command was attempted while there was no tape inserted into the
1105 specified drive. In this case, the drive returns sense key of DRIVE NOT READY.
1107 .in +2
1109 Transport rejected
1111 .in -2
1116 The Host Bus Adapter (HBA) driver is not accepting commands after failing to
1117 successfully transport a scsi packet to the target. The actual status received
1118 by the \fBst\fR driver from the underlying HBA driver was either
1119 TRAN_FATAL_ERROR or TRAN_BADPKT.
1121 .in +2
1123 Retrying command
1125 .in -2
1130 The \fBst\fR driver failed to complete a command. However the command is
1131 retryable and will be retried.
1133 .in +2
1135 Giving up
1137 .in -2
1142 The \fBst\fR driver has exhausted retries or otherwise is unable to retry the
1143 command and so is giving up.
1145 .in +2
1147 No target struct for st%d
1149 .in -2
1154 The \fBst\fR driver failed to obtain state information because the requested
1155 state structure was not allocated. The specified device was probably not
1156 attached.
1158 .in +2
1160 File mark detected
1162 .in -2
1167 The operation detected an end of file mark. (File marks signify the end of a
1168 file on the tape media).
1170 .in +2
1172 End-of-media detected
1174 .in -2
1179 The operation reached the end of the tape media.
1181 .in +2
1183 Exabyte soft error reporting failed. DAT soft error reporting failed
1185 .in -2
1190 The \fBst\fR driver was unable to determine if the soft error threshold had
1191 been exceeded because it did not successfully read the data it requires or did
1192 not obtain enough data. This data is retrieved using the log sense command.
1194 .in +2
1196 Log sense parameter code does not make sense
1198 .in -2
1203 The log sense command retrieves hardware statistics that are stored on the
1204 drive (for example, soft error counts and retries.) If the data retrieved from
1205 the drive is invalid, this message is printed and the data is not used.
1207 .in +2
1209 Restoring tape position at fileno=%x, blkno=%lx....
1211 .in -2
1216 The \fBst\fR driver is positioning to the specified file and block. This occurs
1217 on an open.
1219 .in +2
1221 Failed to restore the last <file/block> position:
1222 In this state, tape will be loaded at BOT during next open
1224 .in -2
1229 The \fBst\fR driver could not position to the specified location and will
1230 revert to the beginning of the tape when the next open is attempted.
1232 .in +2
1234 Device does not support compression
1236 .in -2
1241 The compression facility of the device was requested. However the device does
1242 not have a hardware compression capability.
1244 .in +2
1246 DAT soft error reset failed
1248 .in -2
1253 After DAT soft error reporting, the counters within the device that accumulate
1254 this sense data need to be re-set. This operation failed.
1256 .in +2
1258 Errors after pkt alloc (b_flags=0x%x, b_error=0x%x)
1260 .in -2
1265 Memory allocation for a \fBscsi\fR packet failed.
1267 .in +2
1269 Incorrect length indicator set
1271 .in -2
1276 The drive reported the length of data requested in a READ operation, was
1277 incorrect. Incorrect Length Indicator (ILI) is a very commonly used facility in
1278 SCSI tape protocol and should not be seen as an error per-se. Applications
1279 typically probe a new tape with a read of any length, using the returned length
1280 to the read system call for future reads. Along with this operation, an
1281 underlying ILI error is received. ILI errors are therefore informational only
1282 and are masked at the default \fBst_error_level\fR.
1284 .in +2
1286 Data property (%s) has no value
1287 Data property (%s) incomplete
1288 Version # for data property (%s) greater than 1
1290 .in -2
1295 These diagnostics indicate problems in retrieving the values of the various
1296 property settings. The \fBst\fR driver is in the process of setting the
1297 property/parameter values for the tape drive using information from either the
1298 built-in table within the driver or from uncommented entries in the
1299 \fBst.conf\fR file. The effect on the system may be that the tape drive may be
1300 set with default or generic driver settings which may not be appropriate for
1301 the actual type of tape drive being used.
1303 .in +2
1305 st_attach-RESUME: tape failure tape position will be lost
1307 .in -2
1312 On a resume after a power management suspend, the previously known tape
1313 position is no longer valid. This can occur if the tape was changed while the
1314 system was in power management suspend. The operation will not be retried.
1316 .in +2
1318 Write Data Buffering has been deprecated. Your applications should
1319 continue to work normally. However, they should be ported to use
1320 Asynchronous I/O.
1322 .in -2
1327 Indicates that buffering has been removed from Solaris.
1329 .in +2
1331 Cannot detach: fileno=%x, blkno=%lx
1333 .in -2
1338 The \fBst\fR driver cannot unload because the tape is not positioned at BOT
1339 (beginning of tape). May indicate hardware problems with the tape drive.
1341 .in +2
1343 Variable record length I/O
1344 Fixed record length (%d byte blocks) I/O
1346 .in -2
1351 Tape-drives can use either Fixed or Variable record length. If the drive uses
1352 Fixed length records, then the built in property table or the st.conf file will
1353 contain a non-zero record-length property. Most DAT, Exabyte and DLT drives
1354 support Variable record lengths. Many QIC format tape drives have historically
1355 been of Fixed record length.
1357 .in +2
1359 Command will be retried
1360  un_ncmds: %d can't retry cmd
1362 .in -2
1367 These diagnostics are only seen with tape drives with the
1368 ST_RETRY_ON_RECOVERED_DEFERRED_ERROR bit set. See \fBstdef.h\fR for explanation
1369 of the specific usage of this setting.
1370 .SH WARNINGS
1372 Effective with Solaris 2.4, the \fBST_NO_RECSIZE_LIMIT\fR flag is set for the
1373 built-in config entries of the Archive \fBDAT\fR and Exabyte drivers by
1374 default. (Refer to \fBLarge Record Sizes\fR.) Tapes written with large block
1375 sizes prior to Solaris 2.4 may cause some applications to fail if the number of
1376 bytes returned by a read request is less than the requested block size (for
1377 example, asking for 128 Kbytes and receiving less than 64 Kbytes).
1380 The \fBST_NO_RECSIZE_LIMIT\fR flag can be disabled in the config entry for the
1381 device as a work-around. (Refer to \fBTape Configuration\fR.) This action
1382 disables the ability to read and write with large block sizes and allows the
1383 reading of tapes written prior to Solaris 2.4 with large block sizes.
1386 (Refer to \fBmtio\fR(7I) for a description of maximum record sizes.)
1387 .SH BUGS
1389 Tape devices that do not return a \fBBUSY\fR status during tape loading prevent
1390 user commands from being held until the device is ready. The user must delay
1391 issuing any tape operations until the tape device is ready. This is not a
1392 problem for tape devices supplied by Sun Microsystems.
1395 Tape devices that do not report a blank check error at the end of recorded
1396 media may cause file positioning operations to fail. Some tape drives, for
1397 example, mistakenly report media error instead of blank check error.