JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
man pages section 7: Device and Network Interfaces     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

Introduction

Device and Network Interfaces

1394(7D)

aac(7D)

adpu320(7D)

afe(7D)

agpgart_io(7I)

AH(7P)

ahci(7D)

allkmem(7D)

amd8111s(7D)

arcmsr(7D)

arn(7D)

ARP(7P)

arp(7P)

ast(7D)

asy(7D)

ata(7D)

atge(7D)

ath(7D)

atu(7D)

audio1575(7D)

audio(7D)

audio(7I)

audio810(7D)

audiocmi(7D)

audiocs(7D)

audioemu10k(7D)

audioens(7D)

audiohd(7D)

audioixp(7D)

audiols(7D)

audiop16x(7D)

audiopci(7D)

audiosolo(7D)

audiots(7D)

audiovia823x(7D)

av1394(7D)

balloon(7D)

bbc_beep(7D)

bcm_sata(7D)

bfe(7D)

bge(7D)

blkdev(7D)

bmc(7D)

bnx(7D)

bnxe(7D)

bpf(7D)

bscbus(7D)

bscv(7D)

bufmod(7M)

cdio(7I)

chxge(7D)

cmdk(7D)

connld(7M)

console(7D)

cpqary3(7D)

cpr(7)

cpuid(7D)

ctfs(7FS)

cxge(7D)

dad(7D)

daplt(7D)

dca(7D)

dcam1394(7D)

dcfs(7FS)

dev(7FS)

devchassis(7FS)

devfs(7FS)

devinfo(7D)

dkio(7I)

dlcosmk(7ipp)

dlpi(7P)

dm2s(7D)

dmfe(7D)

dnet(7D)

dr(7d)

drmach(7d)

dscpmk(7ipp)

dsp(7I)

dtrace(7D)

e1000(7D)

e1000g(7D)

ecpp(7D)

efb(7D)

ehci(7D)

eibnx(7D)

elxl(7D)

emlxs(7D)

eoib(7D)

eri(7D)

ESP(7P)

evb(7P)

fas(7D)

fasttrap(7D)

fbio(7I)

fbt(7D)

fcip(7D)

fcoe(7D)

fcoei(7D)

fcoet(7D)

fcp(7D)

fctl(7D)

fipe(7D)

firewire(7D)

flowacct(7ipp)

fp(7d)

FSS(7)

gld(7D)

glm(7D)

hci1394(7D)

hdio(7I)

heci(7D)

hermon(7D)

hid(7D)

hme(7D)

hsfs(7FS)

hubd(7D)

hwa1480_fw(7D)

hwahc(7D)

hwarc(7D)

hxge(7D)

i2bsc(7D)

i915(7d)

ib(7D)

ibcm(7D)

ibdm(7D)

ibdma(7D)

ibmf(7)

ibp(7D)

ibtl(7D)

icmp6(7P)

ICMP(7P)

icmp(7P)

iec61883(7I)

ieee1394(7D)

if(7P)

ifp(7D)

if_tcp(7P)

igb(7D)

igbvf(7D)

ii(7D)

imraid_sas(7D)

inet6(7P)

inet(7P)

ip6(7P)

IP(7P)

ip(7P)

ipgpc(7ipp)

ipmi(7D)

ipnat(7I)

ipnet(7D)

ipqos(7ipp)

iprb(7D)

ipsec(7P)

ipsecah(7P)

ipsecesp(7P)

ipw(7D)

iscsi(7D)

isdnio(7I)

iser(7D)

isp(7D)

iwh(7D)

iwi(7D)

iwk(7D)

iwp(7D)

ixgb(7d)

ixgbe(7D)

ixgbevf(7D)

kb(7M)

kdmouse(7D)

kmdb(7d)

kmem(7D)

kstat(7D)

ksyms(7D)

ldterm(7M)

llc1(7D)

llc2(7D)

lo0(7D)

lockstat(7D)

lofi(7D)

lofs(7FS)

log(7D)

lsc(7D)

marvell88sx(7D)

mc-opl(7D)

mcxe(7D)

md(7D)

mediator(7D)

mega_sas(7D)

mem(7D)

mga(7D)

mhd(7i)

mixer(7I)

mpt(7D)

mpt_sas(7D)

mr_sas(7D)

msglog(7D)

mt(7D)

mtio(7I)

mwl(7D)

mxfe(7D)

myri10ge(7D)

n2cp(7d)

n2rng(7d)

nca(7d)

ncp(7D)

ngdr(7d)

ngdrmach(7d)

nge(7D)

npe(7D)

ntwdt(7D)

ntxn(7D)

null(7D)

nulldriver(7D)

nv_sata(7D)

nxge(7D)

objfs(7FS)

oce(7D)

ohci(7D)

openprom(7D)

oplkmdrv(7D)

oplmsu(7D)

oplpanel(7D)

packet(7P)

pcan(7D)

pcata(7D)

pcfs(7FS)

pcic(7D)

pcicmu(7D)

pcie_pci(7D)

pckt(7M)

pcmcia(7D)

pcn(7D)

pcser(7D)

pcwl(7D)

pf_key(7P)

pfmod(7M)

PF_PACKET(7P)

physmem(7D)

pipemod(7M)

pm(7D)

poll(7d)

prnio(7I)

profile(7D)

ptem(7M)

ptm(7D)

pts(7D)

pty(7D)

qfe(7d)

qlc(7D)

qlcnic(7D)

qlge(7D)

quotactl(7I)

radeon(7d)

ral(7D)

ramdisk(7D)

random(7D)

RARP(7P)

rarp(7P)

rge(7D)

route(7P)

routing(7P)

rtls(7D)

rtw(7D)

rum(7D)

rwd(7D)

rwn(7D)

sad(7D)

sata(7D)

scfd(7D)

scsa1394(7D)

scsa2usb(7D)

scsi_vhci(7D)

SCTP(7P)

sctp(7P)

scu(7D)

sd(7D)

sda(7D)

SDC(7)

sdcard(7D)

sdhost(7D)

sdp(7D)

sdt(7D)

se(7D)

se_hdlc(7D)

ses(7D)

sesio(7I)

sf(7D)

sfe(7D)

sgen(7D)

sharefs(7FS)

si3124(7D)

sip(7P)

slp(7P)

smbfs(7FS)

smbios(7D)

smbus(7D)

smp(7D)

snca(7d)

socal(7D)

sockio(7I)

sol_ofs(7D)

sol_ucma(7D)

sol_umad(7D)

sol_uverbs(7D)

sppptun(7M)

srpt(7D)

ssd(7D)

st(7D)

streamio(7I)

su(7D)

sv(7D)

sxge(7D)

sysmsg(7D)

systrace(7D)

TCP(7P)

tcp(7P)

termio(7I)

termiox(7I)

ticlts(7D)

ticots(7D)

ticotsord(7D)

timod(7M)

tirdwr(7M)

tmpfs(7FS)

todopl(7D)

tokenmt(7ipp)

tsalarm(7D)

tswtclmt(7ipp)

ttcompat(7M)

tty(7D)

ttymux(7D)

tzmon(7d)

uata(7D)

uath(7D)

udfs(7FS)

UDP(7P)

udp(7P)

ufs(7FS)

ugen(7D)

uhci(7D)

ural(7D)

urandom(7D)

urtw(7D)

usb(7D)

usba(7D)

usb_ac(7D)

usb_ah(7M)

usb_as(7D)

usbecm(7D)

usbftdi(7D)

usb_ia(7D)

usbkbm(7M)

usb_mid(7D)

usbms(7M)

usbprn(7D)

usbsacm(7D)

usbser_edge(7D)

usbsksp(7D)

usbsprl(7D)

usbvc(7D)

usbwcm(7M)

uscsi(7I)

usmp(7I)

uvfs(7FS)

uwb(7D)

uwba(7D)

virtualkm(7D)

visual_io(7I)

vni(7d)

vr(7D)

vt(7I)

vuid2ps2(7M)

vuid3ps2(7M)

vuidm3p(7M)

vuidm4p(7M)

vuidm5p(7M)

vuidmice(7M)

vxge(7D)

wpi(7D)

wscons(7D)

wusb_ca(7D)

wusb_df(7D)

xge(7D)

xhci(7D)

yge(7D)

zcons(7D)

zero(7D)

zfs(7FS)

zs(7D)

zsh(7D)

zyd(7D)

st

- driver for SCSI tape devices

Synopsis

st@target,lun:l,m,h,c,ubn

Description

The st device driver provides a standard interface to various SCSI tape devices. See mtio(7I) for details.

To determine if the st device driver supports your tape device, SPARC users should enter the following on a command line:

% strings /kernel/drv/sparcv9/st | grep -i <tape device name>

x86 users can do the following to determine if the st device driver supports a particular tape device:

% strings /kernel/drv/st | grep -i <tape device name>

The driver can be opened with either rewind on close or no rewind on close options. It can also be opened with the O_NDELAY (see open(2)) option when there is no tape inserted in the drive. A maximum of four tape formats per device are supported (see FILES below). The tape format is specified using the device name. (Tape format is also referred to as tape density).

Following are a list of SCSI commands that can be executed while another host reserves the tape drive. The commands are:

SCMD_TEST_UNIT_READY
SCMD_REQUEST_SENSE
SCMD_READ_BLKLIM
SCMD_INQUIRY
SCMD_RESERVE
SCMD_RELEASE
SCMD_DOORLOCK
SCMD_REPORT_DENSITIES
SCMD_LOG_SENSE_G1
SCMD_PERSISTENT_RESERVE_IN
SCMD_PERSISTENT_RESERVE_OUT
SCMD_REPORT_LUNS

In multi-initiator environments, the driver does not reserve the tape drive if above commands are issued. For other SCSI commands, the driver reserves the tape drive and releases the drive at close if it has been reserved. Refer to the MTIOCRESERVE and MTIOCRELEASE ioctls in mtio(7I) for information about how to allow a tape drive to remain reserved upon close. See the flag options below for information about disabling this feature.

If a SCSI-3 persistent reservation is done through the driver, the driver disables all existing SCSI-2 reservations.

If the tape drive is opened in O_NDELAY mode, no reservation occurs during the open, as per the POSIX standard (see standards(5)). However, if a command not found in the above list is used, a reservation occurs to provide reserve/release functionality before the command is issued.

Persistent Errors and Asynchronous Tape Operation

The st driver now supports persistent errors (see mtio(7I) and asynchronous tape operations (see mtio(7I), aioread(3C), and aiowrite(3C)).

Read Operation

If the driver is opened for reading in a different format than the tape is written in, the driver overrides the user-selected format. For example, if a 1/4” cartridge tape is written in QIC-24 format and opened for reading in QIC-150, the driver detects a read failure on the first read and automatically switches to QIC-24 to read the data.

If the low density format is used, no indication is given that the driver has overridden the format you selected. Other formats issue a warning message to inform you of an overridden format selection. Some devices automatically perform this function and do not require driver support (1/2” reel tape drive, for example).

Write Operation

Writing from the beginning of tape is performed in the user-specified format. The original tape format is used for appending onto previously written tapes.

Data Protection

Drives that support SCSI T10 standard Logical Block Protection has a minor node that have the letter d after the device number. If these nodes are opened this enables this protection. This sets the drive to check per block CRCs that are added to each block as they are writen and again when those blocks are read back. The host also checks and compare the CRCs before returning them to the reading application to insure there has been no data curruption.

Tape Configuration

The st driver has a built-in configuration table for most Sun-supported tape drives. For those tape drives that are not in the table, the st driver tries to read the configuration from the tape drive through optional SCSI-3 commands. To support the addition of third party tape devices which are not in the built-in configuration table or not able to report their configuration, device information can be supplied in st.conf as global properties that apply to each node, or as properties that are applicable to one node only. By supplying the information in st.conf, the built-in configuration is overridden and the st driver does not query the configuration from tape drives. The st driver looks for the property called tape-config-list. The value of this property is a list of triplets, where each triplet consists of three strings.

The formal syntax is:

tape-config-list = <triplet> [, <triplet> *];

where

<triplet> := <vid+pid>, <pretty print>, <data-property-name> 

and

<data-property-name> = <version>, <type>, <bsize>,
        <options>, <number of densities>,
        <density> [, <density>*], <default-density>;

or

<data-property-name> = <version 2>, <type>, <bsize>,
        <options>, <number of densities>,
        <density> [, <density>*], <default-density>,
        <non-motion time-out>, <I/O time-out>,
        <rewind time-out>, <space time-out>,
        <load time-out>, <unload time-out>,
        <erase time-out>;   

A semicolon (;) is used to terminate a prototype devinfo node specification. Individual elements listed within the specification should not be separated by a semicolon. (Refer to driver.conf(4) for more information.)

<vid+pid> is the string that is returned by the tape device on a SCSI inquiry command. This string can contain any character in the range 0x20-0x7e. Characters such as " (double quote) or ' (single quote), which are not permitted in property value strings, are represented by their octal equivalent (for example, \042 and \047). Trailing spaces can be truncated.

<pretty print> is used to report the device on the console. This string can have zero length, in which case the <vid+pid> is used to report the device.

<data-property-name> is the name of the property which contains all the tape configuration values (such as <type>, <bsize>, etc.) corresponding for the tape drive for the specified <vid+pid>.

<version> is a version number and should be 1 or 2. In the future, higher version numbers can be used to allow for changes in the syntax of the <data-property-name> value list.

<type> is a type field. Valid types are defined in /usr/include/sys/mtio.h. For third party tape configuration, the following generic types are recommended:

MT_ISQIC
0x32
MT_ISREEL
0x33
MT_ISDAT
0x34
MT_IS8MM
0x35
MT_ISOTHER
0x36
MT_ISTAND25G
0x37
MT_ISDLT
0x38
MT_ISSTK9840
0x39
MT_ISBMDLT1
0x3A
MT_LTO
0x3B

<bsize> is the preferred block size of the tape device. The value should be 0 for variable block size devices.

<options> is a bit pattern representing the devices, as defined in /usr/include/sys/scsi/targets/stdef.h. Valid flags for tape configuration are shown in the following table. This table does not list flags that are non-configurable in st.conf (including ST_KNOWS_MEDIA which uses the media type reported from the mode select data to select the correct density code).

ST_VARIABLE
0x0001
ST_QIC
0x0002
ST_REEL
0x0004
ST_BSF
0x0008
ST_BSR
0x0010
ST_LONG_ERASE
0x0020
ST_AUTODEN_OVERRIDE
0x0040
ST_NOBUF
0x0080
ST_KNOWS_EOD
0x0200
ST_UNLOADABLE
0x0400
ST_SOFT_ERROR_REPORTING
0x0800
ST_LONG_TIMEOUTS
0x1000
ST_NO_RECSIZE_LIMIT
0x8000
ST_MODE_SEL_COMP
0x10000
ST_NO_RESERVE_RELEASE
0x20000
ST_READ_IGNORE_ILI
0x40000
ST_READ_IGNORE_EOFS
0x80000
ST_SHORT_FILEMARKS
0x100000
ST_EJECT_TAPE_ON_CHANGER_FAILURE
0x200000
ST_RETRY_ON_RECOVERED_DEFERRED_ERROR
0x400000
ST_WORMABLE
0x1000000
ST_VARIABLE

The flag indicates the tape device supports variable length record sizes.

ST_QIC

The flag indicates a Quarter Inch Cartridge (QIC) tape device.

ST_REEL

The flag indicates a 1/2-inch reel tape device.

ST_BSF

If flag is set, the device supports backspace over EOF marks (bsf - see mt(1)).

ST_BSR

If flag is set, the tape device supports the backspace record operation (bsr - see mt(1)). If the device does not support bsr, the st driver emulates the action by rewinding the tape and using the forward space record (fsf) operation to forward the tape to the correct file. The driver then uses forward space record (fsr - see mt(1)) to forward the tape to the correct record.

ST_LONG_ERASE

The flag indicates the tape device needs a longer time than normal to erase.

ST_AUTODEN_OVERRIDE

The auto-density override flag. The device is capable of determining the tape density automatically without issuing a “mode-select”/“mode-sense command.”

ST_NOBUF

The flag disables the device's ability to perform buffered writes. A buffered write occurs when the device acknowledges the completion of a write request after the data has been written to the device's buffer, but before all of the data has been written to the tape.

ST_KNOWS_EOD

If flag is set, the device can determine when EOD (End of Data) has been reached. When this flag is set, the st driver uses fast file skipping. Otherwise, file skipping happens one file at a time.

ST_UNLOADABLE

The flag indicates the device does not complain if the st driver is unloaded and loaded again (see modload(1M) and modunload(1M)). That is, the driver returns the correct inquiry string.

ST_SOFT_ERROR_REPORTING

The flag indicates the tape device performs a “request sense” or “log sense” command when the device is closed. Currently, only Exabyte and DAT drives support this feature.

ST_LONG_TIMEOUTS

The flag indicates the tape device requires timeouts that are five times longer than usual for normal operation.

ST_NO_RECSIZE_LIMIT

The flag applies to variable-length tape devices. If this flag is set, the record size is not limited to a 64 Kbyte record size. The record size is only limited by the smaller of either the record size supported by the device or the maximum DMA transfer size of the system. (Refer to Large Record Sizes and WARNINGS.) The maximum block size that is not be broken into smaller blocks can be determined from the mt_bf returned from the MTIOCGET ioctl(). This number is the lesser of the upper block limit returned by the drive from READ BLOCK LIMITS command and the dma-max property set by the Host Bus Adapter (HBA) to which the drive is attached.

ST_MODE_SEL_COMP

If the ST_MODE_SEL_COMP flag is set, the driver determines which of the two mode pages the device supports for selecting or deselecting compression. It first tries the Data Compression mode page (0x0F); if this fails, it tries the Device Configuration mode page (0x10). Some devices, however, can need a specific density code for selecting or deselecting compression. Please refer to the device specific SCSI manual. When the flag is set, compression is enabled only if the c or u device is used. When the lower 2 densities of a drive are identically configured and the upper 2 densities are identically configured, but the lower and upper differ from each other and ST_MODE_SEL_COMP is set, the “m” node sets compression on for the lower density code (for example, 0x42) and the c and unodes set compression on for the higher density (for example, 0x43). For any other device densities, compression is disabled.

ST_NO_RESERVE_RELEASE

The ST_NO_RESERVE_RELEASE flag disables the use of reserve on open and release on close. If an attempt to use a ioctl of MTRESERVE or MTRELEASE on a drive with this flag set, it returns an error of ENOTTY (inappropriate ioctl for device).

ST_READ_IGNORE_ILI

The ST_READ_IGNORE_ILI flag is applicable only to variable block devices which support the SILI bit option. The ST_READ_IGNORE_ILI flag indicates that SILI (suppress incorrect length indicator) bit sets during reads. When this flag is set, short reads (requested read size is less than the record size on the tape) is successful and the number of bytes transferred is equal to the record size on the tape. The tape is positioned at the start of the next record skipping over the extra data (the remaining data has been has been lost). Long reads (requested read size is more than the record size on the tape) sees a large performance gain when this flag is set, due to overhead reduction. When this flag is not set, short reads returns an error of ENOMEM.

ST_READ_IGNORE_EOFS

The ST_READ_IGNORE_EOFS flag is applicable only to 1/2" Reel Tape drives and when performing consecutive reads only. It should not be used for any other tape command. Usually End-of-recorded-media (EOM) is indicated by two EOF marks on 1/2" tape and application cannot read past EOM. When this flag is set, two EOF marks no longer indicate EOM allowing applications to read past two EOF marks. In this case it is the responsibility of the application to detect end-of-recorded-media (EOM). When this flag is set, tape operations (like MTEOM) which positions the tape at end-of-recorded-media fails since detection of end-of-recorded-media (EOM) is to be handled by the application. This flag should be used when backup applications have embedded double filemarks between files.

ST_SHORT_FILEMARKS

The ST_SHORT_FILEMARKS flag is applicable only to EXABYTE 8mm tape drives which supports short filemarks. When this flag is set, short filemarks is used for writing filemarks. Short filemarks could lead to tape incompatible with some otherwise compatible device. By default long filemarks is used for writing filemarks.

ST_EJECT_TAPE_ON_CHANGER_FAILURE

If ST_EJECT_TAPE_ON_CHANGER_FAILURE flag is set, the tape is ejected automatically if the tape cartridge is trapped in the medium due to positioning problems of the medium changer.

The following ASC/ASCQ keys are defined to the reasons for causing tape ejection if ST_EJECT_TAPE_ON_CHANGER_FAILURE option is set to 0x200000:

Sense ASC/ASCQ Description

Key

4 15/01 Mechanical Failure

4 44/00 Internal Target Failure

2 53/00 Media Load or Eject Failed

4 53/00 Media Load or Eject Failed

4 53/01 Unload Tape Failure

ST_RETRY_ON_RECOVERED_DEFERRED_ERROR

If ST_RETRY_ON_RECOVERED_DEFERRED_ERROR flag is set, the st driver retries the last write if this cmd caused a check condition with error code 0x71 and sense code 0x01. Some tape drives, notably the IBM 3090, require this option.

ST_WORMABLE

When ST_WORMABLE is set, st attempts to detect the presence of WORM media in the device.

<number of densities> is the number of densities specified. Each tape drive can support up to four densities. The value entered should therefore be between 1 and 4; if less than 4, the remaining densities are be assigned a value of 0x0.

<density> is a single-byte hexadecimal number. It can either be found in the device specification manual or be obtained from the device vendor.

<default-density> has a value between 0 and (<number of densities> - 1).

<non-motion time-out> Time in seconds that the drive should be able to perform any SCSI command that does not require tape to be moved. This includes mode sense, mode select, reserve, release, read block limits, and test unit ready.

<I/O time-out> Time in seconds to perform data transfer I/O to or from tape including worst case error recovery.

<rewind time-out> Time in seconds to rewind from anywhere on tape to BOT including worst case recovery forcing buffered write data to tape.

<space time-out> Time in seconds to space to any file, block or end of data on tape. Including worst case when any form of cataloging is invalid.

<load time-out> Time in seconds to load tape and be ready to transfer first block. This should include worst case recovery reading tape catalog or drive specific operations done at load.

<unload time-out> Time in seconds to unload tape. Should include worst case time to write to catalog, unthread, and tape cartridge unloading. Also should include worst case time for any drive specific operations that are preformed at unload. Should not include rewind time as the driver rewinds tape before issuing the unload.

<erase time-out> Time in seconds to preform a full (BOT to EOT) erase of longest medium with worst case error recovery.

Devices that support Data Protection requires a conf file entry to configure this feature. After the st_dadp_settings= entry is a list of drives and their configurations. Each list member has the Vendor and Product in double quotes, a comma, then an CRC algorithm name in double quotes, a comma, a configuration name to be associated with that type of drive, which is also double quoted. Each entry is delimited from the next entry by a comma, and the last entry is terminated with a semicolon.

The currently supported CRC algorithms are sb-2, crc32c, and reed-solomom.

If you wish to explicitly disable data protection for type of drive you can use the name DISABLED to prevent Data protection.

If a match is found between an entry in the st_dadp_settings and the Inquiry information returned from a drive being configured, it looks for and used the configuration name specified.

Each named configuration has a unique name followed by an equal sign and four values.

<method>

The values that are mode selected to the drive to put it into Data Protection mode. This entry is followed by a comma.

<crc-size>

The number of bytes required to contain the CRC. This entry is followed by a comma.

<data_mod>

If the drive requires data to be evenly divisible by specific value, usually the power of 2, that power of 2 is used here. If data size must be evenly divisible by 4, you would use 2, since 2 to the second power is 4. This entry is followed by a comma.

<crc_seed>

The initial value used to start the CRC calculation.

Each named configuration is completed with a semicolon.

Device Statistics Support

Each device maintains I/O statistics both for the device and for each partition allocated on that device. For each device/partition, the driver accumulates reads, writes, bytes read, and bytes written. The driver also takes hi-resolution time stamps at queue entry and exit points, which facilitates monitoring the residence time and cumulative residence-length product for each queue.

Each device also has error statistics associated with it. These must include counters for hard errors, soft errors and transport errors. Other data can be implemented as required.

ioctls

The behavior of SCSI tape positioning ioctls is the same across all devices which support them. (Refer to mtio(7I).) However, not all devices support all ioctls. The driver returns an ENOTTY error on unsupported ioctls.

The retension ioctl only applies to 1/4” cartridge tape devices. It is used to restore tape tension, thus improving the tape's soft error rate after extensive start-stop operations or long-term storage.

In order to increase performance of variable-length tape devices (particularly when they are used to read/write small record sizes), two operations in the MTIOCTOP ioctl, MTSRSZ and MTGRSZ, can be used to set and get fixed record lengths. The ioctl also works with fixed-length tape drives which allow multiple record sizes. The min/max limits of record size allowed on a driver are found by using a SCSI-2 READ BLOCK LIMITS command to the device. If this command fails, the default min/max record sizes allowed are 1 byte and 63k bytes. An application that needs to use a different record size opens the device, sets the size with the MTSRSZ ioctl, and then continues with I/O. The scope of the change in record size remains until the device is closed. The next open to the device resets the record size to the default record size (retrieved from st.conf).

The error status is reset by the MTIOCGET get status ioctl call or by the next read, write, or other ioctl operation. If no error has occurred (sense key is 0), the current file and record position is returned.

Errors

EACCES

The driver is opened for write access and the tape is write-protected or the tape unit is reserved by another host.

EBUSY

The tape drive is in use by another process. Only one process can use the tape drive at a time. The driver allows a grace period for the other process to finish before reporting this error.

EINVAL

The number of bytes read or written is not a multiple of the physical record size (fixed-length tape devices only).

EIO

During opening, the tape device is not ready because either no tape is in the drive, or the drive is not on-line. Once open, this error is returned if the requested I/O transfer could not be completed.

ENOTTY

This indicates that the tape device does not support the requested ioctl function.

ENXIO

During opening, the tape device does not exist.

ENOMEM

This indicates that the record size on the tape drive is more than the requested size during read operation.

Examples

Example 1 Using a Global tape-config-list Property

The following is an example of a global tape-config-list property:

tape-config-list =
"Magic DAT", "Magic 4mm Helical Scan", "magic-data",
"Major Appliance", "Major Appliance Tape", "major-tape";


magic-data  = 1,0x34,1024,0x1639,4,0,0x8c,0x8c,0x8c,3;
major-tape = 2,0x3c,0,0x18619,4,0x0,0x0,0x0,0x0,
             3,0,0,30,120,0,0,36000;

name="st" class="scsi"
          target=0 lun=0;
name="st" class="scsi"
          target=1 lun=0;
name="st" class="scsi"
          target=2 lun=0;
          .
          .
          .
name="st" class="scsi"
          target=6 lun=0;

Example 2 Using a tape-config-list Property

The following is an example of a tape-config-list property applicable to target 2 only:

name="st" class="scsi"
        target=0 lun=0;
name="st" class="scsi"
        target=1 lun=0;
name="st" class="scsi"
        target=2 lun=0
        tape-config-list =
        "Magic   DAT", "Magic 4mm Helical Scan", "magic-data"
        magic-data = 1,0x34,1024,0x1639,4,0,0x8c,0x8c,0x8c,3;
name="st" class="scsi"
        target=3 lun=0;
          .
          .
          .
name="st" class="scsi"
        target=6 lun=0;

Example 3 Using st_dadp_settings

Where d is data Protection enabled, l,m,h,u,c specify the density (low, medium, high, ultra/compressed), b is the optional BSD behavior (see mtio(7I)), and n is the optional no rewind behavior, the following example uses st_dadp_settings:

st_dadp_settings=
"aVENDOR aDRIVETYPE", "sb-2", "vendor-drive-sb-2";

vendor-drive-sb-2= 0x02,4,0,-1;
/dev/rmt/[0- 127][d][l,m,h,u,c][b][n]

Large Record Sizes

To support applications such as seismic programs that require large record sizes, the flag ST_NO_RECSIZE_LIMIT must be set in drive option in the configuration entry. A SCSI tape drive that needs to transfer large records should OR this flag with other flags in the options field in st.conf. (Refer to Tape Configuration.) By default, this flag is set for the built-in config entries of Archive DAT and Exabyte drives.

If this flag is set, the st driver issues a SCSI-2 READ BLOCK LIMITS command to the device to determine the maximum record size allowed by it. If the command fails, st continues to use the maximum record sizes mentioned in the mtio(7I) manual page.

If the command succeeds, st restricts the maximum transfer size of a variable-length device to the minimum of that record size and the maximum DMA size that the host adapter can handle. Fixed-length devices are bound by the maximum DMA size allocated by the machine. Tapes created with a large record size can not be readable by earlier releases or on other platforms.

(Refer to the WARNINGS section for more information.)

EOT Handling

The Emulex drives have only a physical end of tape (PEOT); thus it is not possible to write past EOT. All other drives have a logical end of tape (LEOT) before PEOT to guarantee flushing the data onto the tape. The amount of storage between LEOT and PEOT varies from less than 1 Mbyte to about 20 Mbyte, depending on the tape drive.

If EOT is encountered while writing an Emulex, no error is reported but the number of bytes transferred is 0 and no further writing is allowed. On all other drives, the first write that encounters EOT returns a short count or 0. If a short count is returned, then the next write returns 0. After a zero count is returned, the next write returns a full count or short count. A following write returns 0 again. It is important that the number and size of trailer records be kept as small as possible to prevent data loss. Therefore, writing after EOT is not recommended.

Reading past EOT is transparent to the user. Reading is stopped only by reading EOFs. For 1/2” reel devices, it is possible to read off the end of the reel if one reads past the two file marks which mark the end of recorded media.

Files

/kernel/drv/st.conf

driver configuration file

/usr/include/sys/mtio.h

structures and definitions for mag tape io control commands

/usr/include/sys/scsi/targets/stdef.h

definitions for SCSI tape drives

/dev/rmt/[0- 127][d][l,m,h,u,c][b][n]

where d is data Protection enabled, l,m,h,u,c specifies the density (low, medium, high, ultra/compressed), b the optional BSD behavior (see mtio(7I)), and n the optional no rewind behavior.

where l,m,h,u,c specifies the density (low, medium, high, ultra/compressed), b the optional BSD behavior (see mtio(7I)), and n the optional no rewind behavior. For example, /dev/rmt/0lbn specifies unit 0, low density, BSD behavior, and no rewind.

For 1/2” reel tape devices (HP-88780), the densities are:

l
800 BPI density
m
1600 BPI density
h
6250 BPI density
c
data compression
(not supported on all modules)

For 8mm tape devices (Exabyte 8200/8500/8505):

l
Standard 2 Gbyte format
m
5 Gbyte format (8500, 8505 only)
h,c
5 Gbyte compressed format (8505 only)

For 4mm DAT tape devices (Archive Python):

l
Standard format
m,h,c
data compression

For all QIC (other than QIC-24) tape devices:

l,m,h,c
density of the tape cartridge type
(not all devices can read and
write all formats)

For QIC-24 tape devices (Emulex MT-02):

l
QIC-11 Format
m,h,c
QIC-24 Format

See Also

mt(1), modload(1M), modunload(1M), open(2), read(2), write(2), aioread(3C), aiowrite(3C), kstat(3KSTAT), driver.conf(4), scsi(4), standards(5), isp(7D), mtio(7I), ioctl(9E)

Diagnostics

The st driver diagnostics can be printed to the console or messages file.

Each diagnostic is dependent on the value of the system variable st_error_level. st_error_level can be set in the /etc/system file. The default setting for st_error_level is 4 (SCSI_ERR_RETRYABLE) which is suitable for most configurations since only actual fault diagnostics are printed. Settings range from values 0 (SCSI_ERR_ALL) which is most verbose, to 6 (SCSI_ERR_NONE) which is least verbose. See stdef.h for the full list of error-levels. SCSI_ERR_ALL level the amount of diagnostic information is likely to be excessive and unnecessary.

The st driver diagnostics are described below:

Error for Command: <scsi_cmd_name()> Error Level:<error_class>
Requested Block: <blkno>  Error Block: <err_blkno>
Vendor: <name>: Serial Number: <inq_serial>
Sense Key: <es_key> ASC: 0x<es_add_code> (scsi_asc_ascq_name()>), ASCQ: 
0x<es_qual_code>, FRU: 0x<ex_fru_code>

where <error_class> can be any one of the following: All, Unknown, Informational, Recovered, Retryable, Fatal

The command indicated by <scsi_cmd_name> failed. Requested Block represents the block where the transfer started. Error Block represents the block that caused the error. Sense Key, ASC, ASCQ and FRU information is returned by the target in response to a request sense command. See SCSI protocol documentation for description of Sense Key, ASC, ASCQ, FRU.

The st driver attempts to validate entries in the st.conf file. Each field in the entry is checked for upper and lower limits and invalid bits set. The fields are named as follows in config string order:

        conf version
        drive type
        block size
        options
        number of densities
        density code
        default density
        non motion timeout
        I/O timeout
        space timeout
        load timeout
        unload timeout
        erase timeout

The st.conf diagnostics are described below:

<con-name> <field-in-err> <problem-with-field>  

where <con-name> is the name of the config string. Where <field-in-err> is the field containing invalid entries and where <problem-with-field> describes the nature of the invalid entry.

Write/read: not modulo <n> block size

The request size for fixed record size devices must be a multiple of the specified block size.

Recovery by resets failed

After a transport error, the driver attempted to recover by issuing a device reset and then a bus reset if device reset failed. These recoveries failed.

Periodic head cleaning required

The driver reported that periodic head cleaning is now required. This diagnostic is generated either due to a threshold number of retries, or due to the device communicating to the driver that head cleaning is required.

Soft error rate (<n>%) during writing/reading was too high

The soft error rate has exceeded the threshold specified by the vendor.

SCSI transport failed: reason 'xxxx': {retrying|giving up}

The Host Bus Adapter (HBA) has failed to transport a command to the target for the reason stated. The driver either retries the command or, ultimately, gives up.

Tape not inserted in drive

A media access command was attempted while there was no tape inserted into the specified drive. In this case, the drive returns sense key of DRIVE NOT READY.

Transport rejected

The Host Bus Adapter (HBA) driver is not accepting commands after failing to successfully transport a scsi packet to the target. The actual status received by the st driver from the underlying HBA driver was either TRAN_FATAL_ERROR or TRAN_BADPKT.

Retrying command

The st driver failed to complete a command. However the command is retryable and is retried.

Giving up

The st driver has exhausted retries or otherwise is unable to retry the command and so is giving up.

No target struct for st%d

The st driver failed to obtain state information because the requested state structure was not allocated. The specified device was probably not attached.

File mark detected

The operation detected an end of file mark. (File marks signify the end of a file on the tape media).

End-of-media detected

The operation reached the end of the tape media.

Exabyte soft error reporting failed. DAT soft error reporting failed

The st driver was unable to determine if the soft error threshold had been exceeded because it did not successfully read the data it requires or did not obtain enough data. This data is retrieved using the log sense command.

Log sense parameter code does not make sense

The log sense command retrieves hardware statistics that are stored on the drive (for example, soft error counts and retries.) If the data retrieved from the drive is invalid, this message is printed and the data is not used.

Restoring tape position at fileno=%x, blkno=%lx....

The st driver is positioning to the specified file and block. This occurs on an open.

Failed to restore the last <file/block> position: 
In this state, tape is loaded at BOT during next open

The st driver could not position to the specified location and reverts to the beginning of the tape when the next open is attempted.

Device does not support compression

The compression facility of the device was requested. However the device does not have a hardware compression capability.

DAT soft error reset failed

After DAT soft error reporting, the counters within the device that accumulate this sense data need to be re-set. This operation failed.

Errors after pkt alloc (b_flags=0x%x, b_error=0x%x)

Memory allocation for a scsi packet failed.

Incorrect length indicator set

The drive reported the length of data requested in a READ operation, was incorrect. Incorrect Length Indicator (ILI) is a very commonly used facility in SCSI tape protocol and should not be seen as an error per-se. Applications typically probe a new tape with a read of any length, using the returned length to the read system call for future reads. Along with this operation, an underlying ILI error is received. ILI errors are therefore informational only and are masked at the default st_error_level.

Data property (%s) has no value
Data property (%s) incomplete
Version # for data property (%s) greater than 1

These diagnostics indicate problems in retrieving the values of the various property settings. The st driver is in the process of setting the property/parameter values for the tape drive using information from either the built-in table within the driver or from uncommented entries in the st.conf file. The effect on the system can be that the tape drive can be set with default or generic driver settings which can not be appropriate for the actual type of tape drive being used.

st_attach-RESUME: tape failure tape position is lost

On a resume after a power management suspend, the previously known tape position is no longer valid. This can occur if the tape was changed while the system was in power management suspend. The operation is not be retried.

Write Data Buffering has been deprecated. Your applications should 
continue to work normally. However, they should be ported to use 
Asynchronous I/O.

Indicates that buffering has been removed from Solaris.

Cannot detach: fileno=%x, blkno=%lx

The st driver cannot unload because the tape is not positioned at BOT (beginning of tape). May indicate hardware problems with the tape drive.

Variable record length I/O
Fixed record length (%d byte blocks) I/O

Tape-drives can use either Fixed or Variable record length. If the drive uses Fixed length records, then the built in property table or the st.conf file contains a non-zero record-length property. Most DAT, Exabyte and DLT drives support Variable record lengths. Many QIC format tape drives have historically been of Fixed record length.

Command is retried
 un_ncmds: %d can't retry cmd

These diagnostics are only seen with tape drives with the ST_RETRY_ON_RECOVERED_DEFERRED_ERROR bit set. See stdef.h for explanation of the specific usage of this setting.

Warnings

Effective with Solaris 2.4, the ST_NO_RECSIZE_LIMIT flag is set for the built-in config entries of the Archive DAT and Exabyte drivers by default. (Refer to Large Record Sizes.) Tapes written with large block sizes prior to Solaris 2.4 can cause some applications to fail if the number of bytes returned by a read request is less than the requested block size (for example, asking for 128 Kbytes and receiving less than 64 Kbytes).

The ST_NO_RECSIZE_LIMIT flag can be disabled in the config entry for the device as a work-around. (Refer to Tape Configuration.) This action disables the ability to read and write with large block sizes and allows the reading of tapes written prior to Solaris 2.4 with large block sizes.

(Refer to mtio(7I) for a description of maximum record sizes.)

Bugs

Tape devices that do not return a BUSY status during tape loading prevent user commands from being held until the device is ready. The user must delay issuing any tape operations until the tape device is ready. This is not a problem for tape devices supplied by Sun Microsystems.

Tape devices that do not report a blank check error at the end of recorded media can cause file positioning operations to fail. Some tape drives, for example, mistakenly report media error instead of blank check error.