1st(7D) Devices st(7D)
2
3
4
6 st - driver for SCSI tape devices
7
9 st@target,lun:l,m,h,c,ubn
10
11
13 The st device driver provides a standard interface to various SCSI tape
14 devices. See mtio(7I) for details.
15
16
17 To determine if the st device driver supports your tape device, SPARC
18 users should enter the following on a command line:
19
20 % strings /kernel/drv/sparcv9/st | grep -i <tape device name>
21
22
23
24 x86 users can do the following to determine if the st device driver
25 supports a particular tape device:
26
27 % strings /kernel/drv/st | grep -i <tape device name>
28
29
30
31 The driver can be opened with either rewind on close or no rewind on
32 close options. It can also be opened with the O_NDELAY (see open(2))
33 option when there is no tape inserted in the drive. A maximum of four
34 tape formats per device are supported (see FILES below). The tape for‐
35 mat is specified using the device name. (Tape format is also referred
36 to as tape density).
37
38
39 Following are a list of SCSI commands that can be executed while
40 another host reserves the tape drive. The commands are:
41
42 SCMD_TEST_UNIT_READY
43 SCMD_REQUEST_SENSE
44 SCMD_READ_BLKLIM
45 SCMD_INQUIRY
46 SCMD_RESERVE
47 SCMD_RELEASE
48 SCMD_DOORLOCK
49 SCMD_REPORT_DENSITIES
50 SCMD_LOG_SENSE_G1
51 SCMD_PERSISTENT_RESERVE_IN
52 SCMD_PERSISTENT_RESERVE_OUT
53 SCMD_REPORT_LUNS
54
55
56
57 In multi-initiator environments, the driver will not reserve the tape
58 drive if above commands are issued. For other SCSI commands, the driver
59 reserves the tape drive and releases the drive at close if it has been
60 reserved. Refer to the MTIOCRESERVE and MTIOCRELEASE ioctls in
61 mtio(7I) for information about how to allow a tape drive to remain
62 reserved upon close. See the flag options below for information about
63 disabling this feature.
64
65
66 If a SCSI-3 persistent reservation is done through the driver, the
67 driver disables all existing SCSI-2 reservations.
68
69
70 If the tape drive is opened in O_NDELAY mode, no reservation occurs
71 during the open, as per the POSIX standard (see standards(5)). However,
72 if a command not found in the above list is used, a reservation will
73 occur to provide reserve/release functionality before the command is
74 issued.
75
76 Persistent Errors and Asynchronous Tape Operation
77 The st driver now supports persistent errors (see mtio(7I) and asyn‐
78 chronous tape operations (see mtio(7I), aioread(3C), and aiowrite(3C)).
79
80 Read Operation
81 If the driver is opened for reading in a different format than the tape
82 is written in, the driver overrides the user-selected format. For exam‐
83 ple, if a 1/4" cartridge tape is written in QIC-24 format and opened
84 for reading in QIC-150, the driver detects a read failure on the first
85 read and automatically switches to QIC-24 to read the data.
86
87
88 Note that if the low density format is used, no indication is given
89 that the driver has overridden the format you selected. Other formats
90 issue a warning message to inform you of an overridden format selec‐
91 tion. Some devices automatically perform this function and do not
92 require driver support (1/2" reel tape drive, for example).
93
94 Write Operation
95 Writing from the beginning of tape is performed in the user-specified
96 format. The original tape format is used for appending onto previously
97 written tapes.
98
99 Tape Configuration
100 The st driver has a built-in configuration table for most Sun-supported
101 tape drives. For those tape drives that are not in the table, the st
102 driver tries to read the configuration from the tape drive through
103 optional SCSI-3 commands. To support the addition of third party tape
104 devices which are not in the built-in configuration table or not able
105 to report their configuration, device information can be supplied in
106 st.conf as global properties that apply to each node, or as properties
107 that are applicable to one node only. By supplying the information in
108 st.conf, the built-in configuration is overridden and the st driver
109 will not query the configuration from tape drives. The st driver looks
110 for the property called tape-config-list. The value of this property is
111 a list of triplets, where each triplet consists of three strings.
112
113
114 The formal syntax is:
115
116 tape-config-list = <triplet> [, <triplet> *];
117
118
119
120
121 where
122
123 <triplet> := <vid+pid>, <pretty print>, <data-property-name>
124
125
126
127
128 and
129
130 <data-property-name> = <version>, <type>, <bsize>,
131 <options>, <number of densities>,
132 <density> [, <density>*], <default-density>;
133
134
135
136
137 or
138
139 <data-property-name> = <version 2>, <type>, <bsize>,
140 <options>, <number of densities>,
141 <density> [, <density>*], <default-density>,
142 <non-motion time-out>, <I/O time-out>,
143 <rewind time-out>, <space time-out>,
144 <load time-out>, <unload time-out>,
145 <erase time-out>;
146
147
148
149
150
151
152
153 A semicolon (;) is used to terminate a prototype devinfo node specifi‐
154 cation. Individual elements listed within the specification should not
155 be separated by a semicolon. (Refer to driver.conf(4) for more informa‐
156 tion.)
157
158
159 <vid+pid> is the string that is returned by the tape device on a SCSI
160 inquiry command. This string may contain any character in the range
161 0x20-0x7e. Characters such as " " " (double quote) or " ' " (single
162 quote), which are not permitted in property value strings, are repre‐
163 sented by their octal equivalent (for example, 42 and 47). Trailing
164 spaces may be truncated.
165
166
167 <pretty print> is used to report the device on the console. This string
168 may have zero length, in which case the <vid+pid> will be used to
169 report the device.
170
171
172 <data-property-name> is the name of the property which contains all the
173 tape configuration values (such as <type>, <bsize>, etc.) corresponding
174 for the tape drive for the specified <vid+pid>.
175
176
177 <version> is a version number and should be 1 or 2. In the future,
178 higher version numbers may be used to allow for changes in the syntax
179 of the <data-property-name> value list.
180
181
182 <type> is a type field. Valid types are defined in
183 /usr/include/sys/mtio.h. For third party tape configuration, the fol‐
184 lowing generic types are recommended:
185
186
187
188
189 MT_ISQIC 0x32
190 MT_ISREEL 0x33
191 MT_ISDAT 0x34
192 MT_IS8MM 0x35
193 MT_ISOTHER 0x36
194 MT_ISTAND25G 0x37
195 MT_ISDLT 0x38
196 MT_ISSTK9840 0x39
197 MT_ISBMDLT1 0x3A
198
199 MT_LTO 0x3B
200
201
202
203 <bsize> is the preferred block size of the tape device. The value
204 should be 0 for variable block size devices.
205
206
207 <options> is a bit pattern representing the devices, as defined in
208 /usr/include/sys/scsi/targets/stdef.h. Valid flags for tape configura‐
209 tion are shown in the following table. Note that this table does not
210 list flags that are non-configurable in st.conf (including
211 ST_KNOWS_MEDIA which uses the media type reported from the mode select
212 data to select the correct density code).
213
214
215
216
217 ST_VARIABLE 0x0001
218 ST_QIC 0x0002
219 ST_REEL 0x0004
220 ST_BSF 0x0008
221 ST_BSR 0x0010
222 ST_LONG_ERASE 0x0020
223 ST_AUTODEN_OVERRIDE 0x0040
224 ST_NOBUF 0x0080
225 ST_KNOWS_EOD 0x0200
226 ST_UNLOADABLE 0x0400
227 ST_SOFT_ERROR_REPORTING 0x0800
228 ST_LONG_TIMEOUTS 0x1000
229 ST_NO_RECSIZE_LIMIT 0x8000
230 ST_MODE_SEL_COMP 0x10000
231 ST_NO_RESERVE_RELEASE 0x20000
232 ST_READ_IGNORE_ILI 0x40000
233 ST_READ_IGNORE_EOFS 0x80000
234 ST_SHORT_FILEMARKS 0x100000
235 ST_EJECT_TAPE_ON_CHANGER_FAILURE 0x200000
236 ST_RETRY_ON_RECOVERED_DEFERRED_ERROR 0x400000
237 ST_WORMABLE 0x1000000
238
239
240 ST_VARIABLE
241
242 The flag indicates the tape device supports variable length record
243 sizes.
244
245
246 ST_QIC
247
248 The flag indicates a Quarter Inch Cartridge (QIC) tape device.
249
250
251 ST_REEL
252
253 The flag indicates a 1/2−inch reel tape device.
254
255
256 ST_BSF
257
258 If flag is set, the device supports backspace over EOF marks (bsf -
259 see mt(1)).
260
261
262 ST_BSR
263
264 If flag is set, the tape device supports the backspace record oper‐
265 ation (bsr - see mt(1)). If the device does not support bsr, the st
266 driver emulates the action by rewinding the tape and using the for‐
267 ward space record (fsf) operation to forward the tape to the cor‐
268 rect file. The driver then uses forward space record (fsr - see
269 mt(1)) to forward the tape to the correct record.
270
271
272 ST_LONG_ERASE
273
274 The flag indicates the tape device needs a longer time than normal
275 to erase.
276
277
278 ST_AUTODEN_OVERRIDE
279
280 The auto-density override flag. The device is capable of determin‐
281 ing the tape density automatically without issuing a "mode-
282 select"/"mode-sense command."
283
284
285 ST_NOBUF
286
287 The flag disables the device's ability to perform buffered writes.
288 A buffered write occurs when the device acknowledges the completion
289 of a write request after the data has been written to the device's
290 buffer, but before all of the data has been written to the tape.
291
292
293 ST_KNOWS_EOD
294
295 If flag is set, the device can determine when EOD (End of Data) has
296 been reached. When this flag is set, the st driver uses fast file
297 skipping. Otherwise, file skipping happens one file at a time.
298
299
300 ST_UNLOADABLE
301
302 The flag indicates the device will not complain if the st driver is
303 unloaded and loaded again (see modload(1M) and modunload(1M)). That
304 is, the driver will return the correct inquiry string.
305
306
307 ST_SOFT_ERROR_REPORTING
308
309 The flag indicates the tape device will perform a "request sense"
310 or "log sense" command when the device is closed. Currently, only
311 Exabyte and DAT drives support this feature.
312
313
314 ST_LONG_TIMEOUTS
315
316 The flag indicates the tape device requires timeouts that are five
317 times longer than usual for normal operation.
318
319
320 ST_NO_RECSIZE_LIMIT
321
322 The flag applies to variable-length tape devices. If this flag is
323 set, the record size is not limited to a 64 Kbyte record size. The
324 record size is only limited by the smaller of either the record
325 size supported by the device or the maximum DMA transfer size of
326 the system. (Refer to Large Record Sizes and WARNINGS.) The maximum
327 block size that will not be broken into smaller blocks can be
328 determined from the mt_bf returned from the MTIOCGET ioctl(). This
329 number is the lesser of the upper block limit returned by the drive
330 from READ BLOCK LIMITS command and the dma-max property set by the
331 Host Bus Adapter (HBA) to which the drive is attached.
332
333
334 ST_MODE_SEL_COMP
335
336 If the ST_MODE_SEL_COMP flag is set, the driver determines which of
337 the two mode pages the device supports for selecting or deselecting
338 compression. It first tries the Data Compression mode page (0x0F);
339 if this fails, it tries the Device Configuration mode page (0x10).
340 Some devices, however, may need a specific density code for select‐
341 ing or deselecting compression. Please refer to the device specific
342 SCSI manual. When the flag is set, compression is enabled only if
343 the "c" or "u" device is used. Note that when the lower 2 densities
344 of a drive are identically configured and the upper 2 densities are
345 identically configured, but the lower and upper differ from each
346 other and ST_MODE_SEL_COMP is set, the "m" node sets compression on
347 for the lower density code (for example, 0x42) and the "c" and "u"
348 nodes set compression on for the higher density (for example,
349 0x43). For any other device densities, compression is disabled.
350
351
352 ST_NO_RESERVE_RELEASE
353
354 The ST_NO_RESERVE_RELEASE flag disables the use of reserve on open
355 and release on close. If an attempt to use a ioctl of MTRESERVE or
356 MTRELEASE on a drive with this flag set, it will return an error of
357 ENOTTY (inappropriate ioctl for device).
358
359
360 ST_READ_IGNORE_ILI
361
362 The ST_READ_IGNORE_ILI flag is applicable only to variable block
363 devices which support the SILI bit option. The ST_READ_IGNORE_ILI
364 flag indicates that SILI (supress incorrect length indicator) bit
365 will be set during reads. When this flag is set, short reads
366 (requested read size is less than the record size on the tape) will
367 be successful and the number of bytes transferred will be equal to
368 the record size on the tape. The tape will be positioned at the
369 start of the next record skipping over the extra data (the remain‐
370 ing data has been has been lost). Long reads (requested read size
371 is more than the record size on the tape) will see a large perfor‐
372 mance gain when this flag is set, due to overhead reduction. When
373 this flag is not set, short reads will return an error of ENOMEM.
374
375
376 ST_READ_IGNORE_EOFS
377
378 The ST_READ_IGNORE_EOFS flag is applicable only to 1/2" Reel Tape
379 drives and when performing consecutive reads only. It should not be
380 used for any other tape command. Usually End-of-recorded-media
381 (EOM) is indicated by two EOF marks on 1/2" tape and application
382 cannot read past EOM. When this flag is set, two EOF marks no
383 longer indicate EOM allowing applications to read past two EOF
384 marks. In this case it is the responsibility of the application to
385 detect end-of-recorded-media (EOM). When this flag is set, tape
386 operations (like MTEOM) which positions the tape at end-of-
387 recorded-media will fail since detection of end-of-recorded-media
388 (EOM) is to be handled by the application. This flag should be used
389 when backup applications have embedded double filemarks between
390 files.
391
392
393 ST_SHORT_FILEMARKS
394
395 The ST_SHORT_FILEMARKS flag is applicable only to EXABYTE 8mm tape
396 drives which supports short filemarks. When this flag is set, short
397 filemarks is used for writing filemarks. Short filemarks could lead
398 to tape incompatible with some otherwise compatible device. By
399 default long filemarks will be used for writing filemarks.
400
401
402 ST_EJECT_TAPE_ON_CHANGER_FAILURE
403
404 If ST_EJECT_TAPE_ON_CHANGER_FAILURE flag is set, the tape is
405 ejected automatically if the tape cartridge is trapped in the
406 medium due to positioning problems of the medium changer.
407
408 The following ASC/ASCQ keys are defined to the reasons for causing
409 tape ejection if ST_EJECT_TAPE_ON_CHANGER_FAILURE option is set to
410 0x200000:
411
412 Sense ASC/ASCQ Description
413
414 Key
415
416 4 15/01 Mechanical Failure
417
418 4 44/00 Internal Target Failure
419
420 2 53/00 Media Load or Eject Failed
421
422 4 53/00 Media Load or Eject Failed
423
424 4 53/01 Unload Tape Failure
425
426
427 ST_RETRY_ON_RECOVERED_DEFERRED_ERROR
428
429 If ST_RETRY_ON_RECOVERED_DEFERRED_ERROR flag is set, the st driver
430 will retry the last write if this cmd caused a check condition with
431 error code 0x71 and sense code 0x01. Some tape drives, notably the
432 IBM 3090, require this option.
433
434
435 ST_WORMABLE
436
437 When ST_WORMABLE is set, st attempts to detect the presence of WORM
438 media in the device.
439
440
441
442 <number of densities> is the number of densities specified. Each tape
443 drive can support up to four densities. The value entered should there‐
444 fore be between 1 and 4; if less than 4, the remaining densities will
445 be assigned a value of 0x0.
446
447
448 <density> is a single-byte hexadecimal number. It can either be found
449 in the device specification manual or be obtained from the device ven‐
450 dor.
451
452
453 <default-density> has a value between 0 and (<number of densities> -
454 1).
455
456
457 <non-motion time-out> Time in seconds that the drive should be able to
458 perform any SCSI command that doesn't require tape to be moved. This
459 includes mode sense, mode select, reserve, release, read block limits,
460 and test unit ready.
461
462
463 <I/O time-out> Time in seconds to perform data transfer I/O to or from
464 tape including worst case error recovery.
465
466
467 <rewind time-out> Time in seconds to rewind from anywhere on tape to
468 BOT including worst case recovery forcing buffered write data to tape.
469
470
471 <space time-out> Time in seconds to space to any file, block or end of
472 data on tape. Including worst case when any form of cataloging is
473 invalid.
474
475
476 <load time-out> Time in seconds to load tape and be ready to transfer
477 first block. This should include worst case recovery reading tape cata‐
478 log or drive specific operations done at load.
479
480
481 <unload time-out> Time in seconds to unload tape. Should include worst
482 case time to write to catalog, unthread, and tape cartridge unloading.
483 Also should include worst case time for any drive specific operations
484 that are preformed at unload. Should not include rewind time as the
485 driver rewinds tape before issuing the unload.
486
487
488 <erase time-out> Time in seconds to preform a full (BOT to EOT) erase
489 of longest medium with worst case error recovery.
490
491 Device Statistics Support
492 Each device maintains I/O statistics both for the device and for each
493 partition allocated on that device. For each device/partition, the
494 driver accumulates reads, writes, bytes read, and bytes written. The
495 driver also takes hi-resolution time stamps at queue entry and exit
496 points, which facilitates monitoring the residence time and cumulative
497 residence-length product for each queue.
498
499
500 Each device also has error statistics associated with it. These must
501 include counters for hard errors, soft errors and transport errors.
502 Other data may be implemented as required.
503
505 The behavior of SCSI tape positioning ioctls is the same across all
506 devices which support them. (Refer to mtio(7I).) However, not all
507 devices support all ioctls. The driver returns an ENOTTY error on
508 unsupported ioctls.
509
510
511 The retension ioctl only applies to 1/4" cartridge tape devices. It is
512 used to restore tape tension, thus improving the tape's soft error rate
513 after extensive start-stop operations or long-term storage.
514
515
516 In order to increase performance of variable-length tape devices (par‐
517 ticularly when they are used to read/write small record sizes), two
518 operations in the MTIOCTOP ioctl, MTSRSZ and MTGRSZ, can be used to set
519 and get fixed record lengths. The ioctl also works with fixed-length
520 tape drives which allow multiple record sizes. The min/max limits of
521 record size allowed on a driver are found by using a SCSI-2 READ BLOCK
522 LIMITS command to the device. If this command fails, the default
523 min/max record sizes allowed are 1 byte and 63k bytes. An application
524 that needs to use a different record size opens the device, sets the
525 size with the MTSRSZ ioctl, and then continues with I/O. The scope of
526 the change in record size remains until the device is closed. The next
527 open to the device resets the record size to the default record size
528 (retrieved from st.conf).
529
530
531 Note that the error status is reset by the MTIOCGET get status ioctl
532 call or by the next read, write, or other ioctl operation. If no error
533 has occurred (sense key is 0), the current file and record position is
534 returned.
535
537 EACCES The driver is opened for write access and the tape is write-
538 protected or the tape unit is reserved by another host.
539
540
541 EBUSY The tape drive is in use by another process. Only one process
542 can use the tape drive at a time. The driver will allow a
543 grace period for the other process to finish before reporting
544 this error.
545
546
547 EINVAL The number of bytes read or written is not a multiple of the
548 physical record size (fixed-length tape devices only).
549
550
551 EIO During opening, the tape device is not ready because either
552 no tape is in the drive, or the drive is not on-line. Once
553 open, this error is returned if the requested I/O transfer
554 could not be completed.
555
556
557 ENOTTY This indicates that the tape device does not support the
558 requested ioctl function.
559
560
561 ENXIO During opening, the tape device does not exist.
562
563
564 ENOMEM This indicates that the record size on the tape drive is more
565 than the requested size during read operation.
566
567
569 Example 1 Global tape-config list property
570
571
572 The following is an example of a global tape-config-list property:
573
574
575 tape-config-list =
576 "Magic DAT", "Magic 4mm Helical Scan", "magic-data",
577 "Major Appliance", "Major Appliance Tape", "major-tape";
578
579
580 magic-data = 1,0x34,1024,0x1639,4,0,0x8c,0x8c,0x8c,3;
581 major-tape = 2,0x3c,0,0x18619,4,0x0,0x0,0x0,0x0,
582 3,0,0,30,120,0,0,36000;
583
584 name="st" class="scsi"
585 target=0 lun=0;
586 name="st" class="scsi"
587 target=1 lun=0;
588 name="st" class="scsi"
589 target=2 lun=0;
590 .
591 .
592 .
593 name="st" class="scsi"
594 target=6 lun=0;
595
596
597 Example 2 Tape-config-list property applicable to target 2 only
598
599
600 The following is an example of a tape-config-list property applicable
601 to target 2 only:
602
603
604 name="st" class="scsi"
605 target=0 lun=0;
606 name="st" class="scsi"
607 target=1 lun=0;
608 name="st" class="scsi"
609 target=2 lun=0
610 tape-config-list =
611 "Magic DAT", "Magic 4mm Helical Scan", "magic-data"
612 magic-data = 1,0x34,1024,0x1639,4,0,0x8c,0x8c,0x8c,3;
613 name="st" class="scsi"
614 target=3 lun=0;
615 .
616 .
617 .
618 name="st" class="scsi"
619 target=6 lun=0;
620
621
622 Large Record Sizes
623 To support applications such as seismic programs that require large
624 record sizes, the flag ST_NO_RECSIZE_LIMIT must be set in drive option
625 in the configuration entry. A SCSI tape drive that needs to transfer
626 large records should OR this flag with other flags in the 'options'
627 field in st.conf. (Refer to Tape Configuration.) By default, this flag
628 is set for the built-in config entries of Archive DAT and Exabyte
629 drives.
630
631
632 If this flag is set, the st driver issues a SCSI-2 READ BLOCK LIMITS
633 command to the device to determine the maximum record size allowed by
634 it. If the command fails, st continues to use the maximum record sizes
635 mentioned in the mtio(7I) man page.
636
637
638 If the command succeeds, st restricts the maximum transfer size of a
639 variable-length device to the minimum of that record size and the maxi‐
640 mum DMA size that the host adapter can handle. Fixed-length devices are
641 bound by the maximum DMA size allocated by the machine. Note that tapes
642 created with a large record size may not be readable by earlier
643 releases or on other platforms.
644
645
646 (Refer to the WARNINGS section for more information.)
647
648 EOT Handling
649 The Emulex drives have only a physical end of tape (PEOT); thus it is
650 not possible to write past EOT. All other drives have a logical end of
651 tape (LEOT) before PEOT to guarantee flushing the data onto the tape.
652 The amount of storage between LEOT and PEOT varies from less than 1
653 Mbyte to about 20 Mbyte, depending on the tape drive.
654
655
656 If EOT is encountered while writing an Emulex, no error is reported but
657 the number of bytes transferred is 0 and no further writing is allowed.
658 On all other drives, the first write that encounters EOT will return a
659 short count or 0. If a short count is returned, then the next write
660 will return 0. After a zero count is returned, the next write returns a
661 full count or short count. A following write returns 0 again. It is
662 important that the number and size of trailer records be kept as small
663 as possible to prevent data loss. Therefore, writing after EOT is not
664 recommended.
665
666
667 Reading past EOT is transparent to the user. Reading is stopped only by
668 reading EOF's. For 1/2" reel devices, it is possible to read off the
669 end of the reel if one reads past the two file marks which mark the end
670 of recorded media.
671
673 /kernel/drv/st.conf
674
675 driver configuration file
676
677
678 /usr/include/sys/mtio.h
679
680 structures and definitions for mag tape io control commands
681
682
683 /usr/include/sys/scsi/targets/stdef.h
684
685 definitions for SCSI tape drives
686
687
688 /dev/rmt/[0− 127][l,m,h,u,c][b][n]
689
690 where l,m,h,u,c specifies the density (low, medium, high,
691 ultra/compressed), b the optional BSD behavior (see mtio(7I)), and
692 n the optional no rewind behavior. For example, /dev/rmt/0lbn spec‐
693 ifies unit 0, low density, BSD behavior, and no rewind.
694
695 For 1/2" reel tape devices (HP-88780), the densities are:
696
697
698
699
700 l 800 BPI density
701 m 1600 BPI density
702 h 6250 BPI density
703 c data compression
704 (not supported on all modules)
705
706 For 8mm tape devices (Exabyte 8200/8500/8505):
707
708
709
710
711 l Standard 2 Gbyte format
712 m 5 Gbyte format (8500, 8505 only)
713 h,c 5 Gbyte compressed format (8505 only)
714
715 For 4mm DAT tape devices (Archive Python):
716
717
718
719
720 l Standard format
721 m,h,c data compression
722
723 For all QIC (other than QIC-24) tape devices:
724
725
726
727
728 l,m,h,c density of the tape cartridge type
729 (not all devices can read and
730 write all formats)
731
732 For QIC-24 tape devices (Emulex MT−02):
733
734
735
736
737 l QIC-11 Format
738 m,h,c QIC-24 Format
739
740
741
743 mt(1), modload(1M), modunload(1M), open(2), read(2), write(2),
744 aioread(3C), aiowrite(3C), kstat(3KSTAT), driver.conf(4), scsi(4),
745 standards(5), esp(7D), isp(7D), mtio(7I), ioctl(9E)
746
748 The st driver diagnostics may be printed to the console or messages
749 file.
750
751
752 Each diagnostic is dependent on the value of the system variable
753 st_error_level. st_error_level may be set in the /etc/system file. The
754 default setting for st_error_level is 4 (SCSI_ERR_RETRYABLE) which is
755 suitable for most configurations since only actual fault diagnostics
756 are printed. Settings range from values 0 (SCSI_ERR_ALL) which is most
757 verbose, to 6 (SCSI_ERR_NONE) which is least verbose. See stdef.h for
758 the full list of error-levels. SCSI_ERR_ALL level the amount of diag‐
759 nostic information is likely to be excessive and unnecessary.
760
761
762 The st driver diagnostics are described below:
763
764 Error for Command: <scsi_cmd_name()> Error Level:<error_class>
765 Requested Block: <blkno> Error Block: <err_blkno>
766 Vendor: <name>: Serial Number: <inq_serial>
767 Sense Key: <es_key> ASC: 0x<es_add_code> (scsi_asc_ascq_name()>), ASCQ:
768 0x<es_qual_code>, FRU: 0x<ex_fru_code>
769
770
771
772 where <error_class> may be any one of the following: "All," "Unknown,"
773 "Informational," "Recovered," "Retryable," "Fatal"
774
775
776 The command indicated by <scsi_cmd_name> failed. Requested Block repre‐
777 sents the block where the transfer started. Error Block represents the
778 block that caused the error. Sense Key, ASC, ASCQ and FRU information
779 is returned by the target in response to a request sense command. See
780 SCSI protocol documentation for description of Sense Key, ASC, ASCQ,
781 FRU.
782
783
784 The st driver attempts to validate entries in the st.conf file. Each
785 field in the entry is checked for upper and lower limits and invalid
786 bits set. The fields are named as follows in config string order:
787
788 conf version
789 drive type
790 block size
791 options
792 number of densities
793 density code
794 default density
795 non motion timeout
796 I/O timeout
797 space timeout
798 load timeout
799 unload timeout
800 erase timeout
801
802
803
804 The st.conf diagnostics are described below:
805
806 <con-name> <field-in-err> <problem-with-field>
807
808
809
810 where <con-name> is the name of the config string. Where <field-in-err>
811 is the field containing invalid entries and where <problem-with-field>
812 describes the nature of the invalid entry.
813
814 Write/read: not modulo <n> block size
815
816
817
818
819 The request size for fixed record size devices must be a multiple of
820 the specified block size.
821
822 Recovery by resets failed
823
824
825
826
827 After a transport error, the driver attempted to recover by issuing a
828 device reset and then a bus reset if device reset failed. These recov‐
829 eries failed.
830
831 Periodic head cleaning required
832
833
834
835
836 The driver reported that periodic head cleaning is now required. This
837 diagnostic is generated either due to a threshold number of retries, or
838 due to the device communicating to the driver that head cleaning is
839 required.
840
841 Soft error rate (<n>%) during writing/reading was too high
842
843
844
845
846 The soft error rate has exceeded the threshold specified by the vendor.
847
848 SCSI transport failed: reason 'xxxx': {retrying|giving up}
849
850
851
852
853 The Host Bus Adapter (HBA) has failed to transport a command to the
854 target for the reason stated. The driver will either retry the command
855 or, ultimately, give up.
856
857 Tape not inserted in drive
858
859
860
861
862 A media access command was attempted while there was no tape inserted
863 into the specified drive. In this case, the drive returns sense key of
864 DRIVE NOT READY.
865
866 Transport rejected
867
868
869
870
871 The Host Bus Adapter (HBA) driver is not accepting commands after fail‐
872 ing to successfully transport a scsi packet to the target. The actual
873 status received by the st driver from the underlying HBA driver was
874 either TRAN_FATAL_ERROR or TRAN_BADPKT.
875
876 Retrying command
877
878
879
880
881 The st driver failed to complete a command. However the command is
882 retryable and will be retried.
883
884 Giving up
885
886
887
888
889 The st driver has exhausted retries or otherwise is unable to retry the
890 command and so is giving up.
891
892 No target struct for st%d
893
894
895
896
897 The st driver failed to obtain state information because the requested
898 state structure was not allocated. The specified device was probably
899 not attached.
900
901 File mark detected
902
903
904
905
906 The operation detected an end of file mark. (File marks signify the end
907 of a file on the tape media).
908
909 End-of-media detected
910
911
912
913
914 The operation reached the end of the tape media.
915
916 Exabyte soft error reporting failed. DAT soft error reporting failed
917
918
919
920
921 The st driver was unable to determine if the soft error threshold had
922 been exceeded because it did not successfully read the data it requires
923 or did not obtain enough data. This data is retrieved using the log
924 sense command.
925
926 Log sense parameter code does not make sense
927
928
929
930
931 The log sense command retrieves hardware statistics that are stored on
932 the drive (for example, soft error counts and retries.) If the data
933 retrieved from the drive is invalid, this message is printed and the
934 data is not used.
935
936 Restoring tape position at fileno=%x, blkno=%lx....
937
938
939
940
941 The st driver is positioning to the specified file and block. This
942 occurs on an open.
943
944 Failed to restore the last <file/block> position:
945 In this state, tape will be loaded at BOT during next open
946
947
948
949
950 The st driver could not position to the specified location and will
951 revert to the beginning of the tape when the next open is attempted.
952
953 Device does not support compression
954
955
956
957
958 The compression facility of the device was requested. However the
959 device does not have a hardware compression capability.
960
961 DAT soft error reset failed
962
963
964
965
966 After DAT soft error reporting, the counters within the device that
967 accumulate this sense data need to be re-set. This operation failed.
968
969 Errors after pkt alloc (b_flags=0x%x, b_error=0x%x)
970
971
972
973
974 Memory allocation for a scsi packet failed.
975
976 Incorrect length indicator set
977
978
979
980
981 The drive reported the length of data requested in a READ operation,
982 was incorrect. Incorrect Length Indicator (ILI) is a very commonly used
983 facility in SCSI tape protocol and should not be seen as an error per-
984 se. Applications typically probe a new tape with a read of any length,
985 using the returned length to the read system call for future reads.
986 Along with this operation, an underlying ILI error is received. ILI
987 errors are therefore informational only and are masked at the default
988 st_error_level.
989
990 Data property (%s) has no value
991 Data property (%s) incomplete
992 Version # for data property (%s) greater than 1
993
994
995
996
997 These diagnostics indicate problems in retrieving the values of the
998 various property settings. The st driver is in the process of setting
999 the property/parameter values for the tape drive using information from
1000 either the built-in table within the driver or from uncommented entries
1001 in the st.conf file. The effect on the system may be that the tape
1002 drive may be set with default or generic driver settings which may not
1003 be appropriate for the actual type of tape drive being used.
1004
1005 st_attach-RESUME: tape failure tape position will be lost
1006
1007
1008
1009
1010 On a resume after a power management suspend, the previously known tape
1011 position is no longer valid. This can occur if the tape was changed
1012 while the system was in power management suspend. The operation will
1013 not be retried.
1014
1015 Write Data Buffering has been deprecated. Your applications should
1016 continue to work normally. However, they should be ported to use
1017 Asynchronous I/O.
1018
1019
1020
1021
1022 Indicates that buffering has been removed from Solaris.
1023
1024 Cannot detach: fileno=%x, blkno=%lx
1025
1026
1027
1028
1029 The st driver cannot unload because the tape is not positioned at BOT
1030 (beginning of tape). May indicate hardware problems with the tape
1031 drive.
1032
1033 Variable record length I/O
1034 Fixed record length (%d byte blocks) I/O
1035
1036
1037
1038
1039 Tape-drives can use either Fixed or Variable record length. If the
1040 drive uses Fixed length records, then the built in property table or
1041 the st.conf file will contain a non-zero record-length property. Most
1042 DAT, Exabyte and DLT drives support Variable record lengths. Many QIC
1043 format tape drives have historically been of Fixed record length.
1044
1045 Command will be retried
1046 un_ncmds: %d can't retry cmd
1047
1048
1049
1050
1051 These diagnostics are only seen with tape drives with the
1052 ST_RETRY_ON_RECOVERED_DEFERRED_ERROR bit set. See stdef.h for explana‐
1053 tion of the specific usage of this setting.
1054
1056 Effective with Solaris 2.4, the ST_NO_RECSIZE_LIMIT flag is set for the
1057 built-in config entries of the Archive DAT and Exabyte drivers by
1058 default. (Refer to Large Record Sizes.) Tapes written with large block
1059 sizes prior to Solaris 2.4 may cause some applications to fail if the
1060 number of bytes returned by a read request is less than the requested
1061 block size (for example, asking for 128 Kbytes and receiving less than
1062 64 Kbytes).
1063
1064
1065 The ST_NO_RECSIZE_LIMIT flag can be disabled in the config entry for
1066 the device as a work-around. (Refer to Tape Configuration.) This action
1067 disables the ability to read and write with large block sizes and
1068 allows the reading of tapes written prior to Solaris 2.4 with large
1069 block sizes.
1070
1071
1072 (Refer to mtio(7I) for a description of maximum record sizes.)
1073
1075 Tape devices that do not return a BUSY status during tape loading pre‐
1076 vent user commands from being held until the device is ready. The user
1077 must delay issuing any tape operations until the tape device is ready.
1078 This is not a problem for tape devices supplied by Sun Microsystems.
1079
1080
1081 Tape devices that do not report a blank check error at the end of
1082 recorded media may cause file positioning operations to fail. Some tape
1083 drives, for example, mistakenly report media error instead of blank
1084 check error.
1085
1086
1087
1088SunOS 5.11 22 Oct 2008 st(7D)