ts(7)
ts - tape support
As shipped in IRIX 6.5.19. Added in IRIX 6.5.15.
NAME ts - tape support SYNOPSIS ts DESCRIPTION The tape support (TS) system consists of a tape support driver, personality daemons, and a daemon to manage the personality daemons. For information on how to configure tape support, see the ts.config(4) man page. The tape support driver passes all device-dependent tasks, except for I/O processing, to a personality daemon. For optimal performance, I/O requests are processed in the driver. There is a personality daemon for each device type supported by the tape support driver. Each personality daemon processes requests from the driver, performs all device-dependent tape operations, and uses a SCSI pass-through interface to communicate with the device. A daemon, tsdaemon, manages the personality daemons. It invokes the appropriate personality daemon on the first open of a tape device and restarts personality daemons after abnormal terminations. The existing IRIX tape driver, tpsc, continues to provide support for all devices currently supported and coexists with the tape support system. You can choose which driver interface to use for a particular device type. Hardware Configuration If a tape device detected during system startup is listed in the ts.config table, identified by product and vendor identifiers, the device is assigned to the tape support system. Devices supported by the tape support system are defined by the ts_types table in the master.d/scsi file. Only the number of characters specified for the vendor or product identifier is used on the comparison with the identifying information returned by a device. The ts_types table also defines the modes supported by the device and the hardware inventory type of the device. o The modes include variable block, compression, the speed, and a list of density values supported and their corresponding alias and hardware graph canonical names. The density values are used in a device command to set the density. o The hardware inventory type identifies the type of the device as defined in the invent.h file. A ts_types entry is defined as follows: typedef struct ts_types { u_char ts_hinv; u_char ts_vendor[TS_MAX_VENDOR]; u_char ts_product[TS_MAX_PRODUCT]; uint ts_compress : 1; uint ts_speed : 1; uint ts_variable : 1; uint_t ts_numdens; char **ts_dens_hwg; char **ts_dens_alias; u_char ts_dens_code[TS_MAX_DENSITY]; } ts_types_t; In the following example, the tape support driver supports all DLT 7000 and all STK TimberLine 9490 devices. #define ts_dennum_dlt7000 2 char *ts_denhwg_dlt7000[] = { "7000", "4000"}; char *ts_densuf_dlt7000[] = { "7000", "4000"}; ts_types_t ts_types[] ={ {TPDLT,"","DLT7000",1,0,1, ts_dennum_dtl7000, ts_denhwg_dlt7000, ts_densuf_dlt7000, (0x1B/*7000*/0x1A/*4000*/,{0},{0},{0},{0},{0},{0}}}, (TPSTK9490,"STK","9490",1,0,1, 0,0,0,{0}}; }; In this example, compression, variable block I/O, and 2 density values are supported on the DLT 7000s. A density code of 0x1B is used to set the density when a device file with the .7000 suffix or a canonical name including 7000 is opened or if no density is indicated on the device file, since the first entry is also the default density. A density code of 0x1A is used to set the density when a device file with the .4000 suffix or a canonical name including 4000 is opened. Compression and variable block I/O is supported on the STK TimberLine 9490 devices. Multiple density values are not supported. Neither device supports multiple speeds. To add support for a new device, you must add device information to the ts_types table, run an autoconfig to generate a new kernel, execute chkconfig -f ts on, and restart the system to execute this kernel. Personality Daemons The following personality daemons are available for the specified devices: o /usr/etc/ts/tsdlt7000 for DLT7000 and DLT8000 o /usr/etc/ts/ts3590 for IBM 3590 o /usr/etc/ts/ts9490 for STK TimberLine 9490 o /usr/etc/ts/tssd3 for STK RedWood SD-3 o /usr/etc/ts/ts9840 for STK 9840 and STK 9940 Personality-Daemon Error Logging The personality daemons use the embedded support partner (ESP) event facility to record events related to tape errors and tape unloads. These events are recorded with the event class "Tape". Messages are written to the system log with unique sequence numbers (special ESP identifiers also called TypeIds). The system administrator may configure special actions that ESP may take when these events occur. For more information about ESP usage, see the esp(5) man page. Use the following espconfig command to see the events recorded in the "Tape" class: espconfig -list evtype -cd "Tape" The personality daemons also record information about some device events in an ASCII log file. The path to the log file is /var/spool/ts/pd/log/tspd.log. The records contain a number of fields, which are separated by the back quote character. The fields are specified in a log record in the following order: (Double back quotes indicate the field has no value.) date Date of the event, the year, month, and day, as yyyy/mm/dd. time Time of the event, the hour, minute, and second, as hh:mm:ss. version The version number of the log record. Version 1 is the only valid version. event Event type. The following event types may be supported: Adaptor error A command ended in an adaptor error. Check error A command ended in a check condition. Clear Persistent reservation is cleared by another host. Log/Mode changed Log or mode parameter value changed by another host. Lost prsv Lost persistent reservation because it is preempted or cleared by another host. Preempt A persistent reservation is preempted by another host. SCSI error A command ended in a SCSI error. Reserve A reserve command is successfully executed. Release A release command is successfully executed. Unload An unload command is successfully executed. device name Device name without the /hw/tape prefix. device type Device type. volume id Volume identifier specified by the MTSETVID ioctl command. Applications use this command to set the volume identifier of a mounted volume in the personality daemon. Applications may set the volume identifier just before mounting a tape. The following code sets a volume identifier: #include <mtio.h> { struct mtvid vid; strncpy(vid.vid, "MYVID", MT_MAX_VID); if (ioctl(fd, MTSETVID, &vid)) { printf("MTSETVID error: %s.0, strerror(errno)); } } The volume identifier is cleared when a tape is unloaded. process id The process identifier of the process that made the request. last SCSI command The SCSI command that caused the log record to be recorded. sensekey The sensekey if the event is check error. message A message generated by the personality daemon. data type The type of data in the next field. The following data types are recorded: sense Sense bytes log page A log sense page command The command that has an error data The data that has an error data The data in groups of four bytes, recorded in 8 bytes of hexadecimal digits, separated by a blank. If a log record contains additional data type and data pairs, these follow the initial pair, starting in field 14. For additional information about the log file, see the tsarchive(1M) and tserrpt(1M) man pages. Personality-Daemon Configuration File When a personality daemon starts, it reads the configuration file for the personality daemons if the file exists. This optional file, /etc/config/tspd.config, contains values for the personality daemons. The following options are supported: TRACE Enables debug tracing. The trace entries are entered in the /usr/adm/SYSLOG file. Each TRACE line in the personality-daemon configuration file applies to a specific device. Any text between the # character and the end of line, inclusive, is ignored. A blank or tab character must precede a # character if the # character is within a line and not at the beginning of the line. Each line is composed of three fields: TRACE pathname value The option, TRACE, is in the first field. The other fields are as follows: pathname Specifies the name of the device file. pathname is one of the following: name Specifies any legal device name: /dev/mt/tps* /dev/rmt/tps* /hw/tape/tps* /dev/mt/*/lun*/c*p* /dev/rmt/*/lun*/c*p* /hw/tape/*/lun*/c*p* all Specifies that TRACE applies to all devices. A personality daemon only processes an option if pathname matches the name of its own device file. value Specifies whether TRACE is enabled. value is one of the following: on Turns tracing on. off Turns tracing off. PREVENT_REMOVAL Prevents removal of mounted tapes while the tape device is opened. Each PREVENT_REMOVAL line in the personality-daemon configuration file applies to a specific device. Any text between the # character and the end of line, inclusive, is ignored. A blank or tab character must precede a # character if the # character is within a line and not at the beginning of the line. Each line is composed of three fields: PREVENT_REMOVAL pathname value The option, PREVENT_REMOVAL, is in the first field. The other fields are as follows: pathname Specifies the name of the device file. pathname is one of the following: name Specifies any legal device name: /dev/mt/tps* /dev/rmt/tps* /hw/tape/tps* /dev/mt/*/lun*/c*p* /dev/rmt/*/lun*/c*p* /hw/tape/*/lun*/c*p* all Specifies that PREVENT_REMOVAL applies to all devices. A personality daemon only processes an option if pathname matches the name of its own device file. value Specifies whether PREVENT_REMOVAL is enabled. value is one of the following: on Prevents tape removal while the tape device is opened. off Allows tape removal while the tape device is opened. The following example shows a configuration file with 2 lines. When these lines are read by personality daemons supporting the /hw/tape/tps12d3 and /hw/tape/tps5d6 devices, tracing is turned off for the /hw/tape/tps12d3 device and on for the /hw/tape/tps5d6 device. TRACE /hw/tape/tps12d3 off TRACE /hw/tape/tps5d6 on For information on changing option settings after the system has been started, see the tsset(1M) man page. FILES /dev/mt/lun*stat device file /dev/mt/*/lun*stat/c*p* device file /dev/rmt/lun*stat device file /dev/rmt/*/lun*stat/c*p* device file /etc/config/ts.config tape support configuration file /etc/config/tspd.config optional personality-daemon configuration file /hw/tape/lun*stat device file /hw/tape/*/lun*stat/c*p* device file invent.h hardware inventory file master.d/scsi file that contains the ts_types table /var/spool/ts/pd/log/tspd.log tape support log file SEE ALSO tsarchive(1M), tsdaemon(1M), tserrpt(1M), tsset(1M), tsstop(1M), ts.config(4).