(C) Copyright International Business Machines Corp., 2007 - 2015 lin_taped.ReadMe ---------------------------------------------------------------------- Contents ---------------------------------------------------------------------- 1. Overview 2. Selective tracing 3. Configuring and Running the lin_taped daemon 4. Turning off lin_tape trace ---------------------------------------------------------------------- 1. Overview ---------------------------------------------------------------------- The lin_taped daemon program can automatically create/delete special files under the /dev directory that are corresponding to the attached/detached tape devices. You do not need to run IBMtapeconfig script to create special files for attached tape devices. The lin_taped daemon provides the control path failover and data path failover capabilities for the lin_tape device driver. The lin_tape device driver provides facilities for device driver tracing, obtaining SIM/MIM data (for IBM TotalStorage tape devices), automatically storing drive dumps, and saving log sense information when log threshold values are exceeded. The device driver also supports full tracing, error logging, and saving log sense information when tape is unloaded or the drive is reset. A daemon (lin_taped) is provided with the device driver to process this information. By default, these facilities are enabled, but the customer may use the STIOC_SETP ioctl from an application program or the ITDT, Query/Set Tape Parameters, command to tailor these settings. After being set, they become immediately active and persist until the driver is unloaded, or they are reset by the customer (via the ITDT program or an application program issuing the STIOC_SETP ioctl). lin_taped does not need to be restarted when these settings are tailored. If you add tape devices to your system after the lin_tape driver has been loaded, you need to reinstall the lin_tape device driver, then restart the lin_taped daemon. If there is no tape device is attached to your system, lin_taped will not run. IBM recommends that the customer leaves these facilities enabled because they require very little overhead, and they capture important error information that IBM service will need in order to quickly diagnose hardware and software problems in the installation. ---------------------------------------------------------------------- 2. Failover Support ---------------------------------------------------------------------- The lin_taped daemon provides control path failover and data path failover capabilities for the lin_tape device driver. If the lin_taped daemon is not running, the lin_tape device driver will not fail over. In addition, the /proc/scsi/IBMtape and /proc/scsi/IBMchanger files will not provide correct path information if the lin_taped daemon is not running. Path Failover is not supported when running devices connected to a single host server with HBAs that use different HBA drivers and an event occurs that a) causes one of the HBA drivers to be uninstalled, or b) causes all of the devices operated by one of the HBA drivers to be uninstalled. There is a limit of sixteen paths per device in a multi-pathing environment. In certain SAS environments, the sixteen-path limit may be reached if a device path goes offline and comes back online repeatedly. This is because certain SAS cards place each instance of a device at a new SCSI address and therefore lin_tape and lin_taped will view each of these instances as a new device. ---------------------------------------------------------------------- 3. Selective tracing ---------------------------------------------------------------------- There are four flags that the customer may set (from ITDT, or from an application program using the struct stchg_s in the /usr/include/sys/IBM_tape.h file). They are defined as follows: 1. trace. Whenever the driver is loaded, this flag is set to ON. It causes device driver trace messages to be saved for each tape drive and medium changer that lin_tape configures. Setting this flag to OFF suppresses the logging of device driver trace messages and error logging. 2. disable_sim_logging. Whenever the driver is loaded, this flag is set to OFF, which causes SIM/MIM records to be logged. SIM/MIM records are issued by TotalStorage drives under some error conditions, and are useful for diagnosing hardware problems. Setting this flag to ON suppresses the logging of SIM/MIM records. With an lin_taped configuration file setting, the customer may limit the the amount of information stored per device. 3. disable_auto_drive_dump. Whenever the driver is loaded, this flag is set to OFF, which causes drive dumps to be automatically saved when the device driver detects that a dump is available on a drive. A drive dump becomes available under certain error conditions, and are often needed to properly diagnose hardware problems. Setting this flag to ON suppresses the saving of drive dumps. With an lin_taped configuration file setting, the customer may limit the number of dumps stored per device. 4. logging. Whenever the driver is loaded, this flag is set to ON, which causes log sense data to be retrieved and stored when lin_tape detects that a tape drive log counter threshold value has been exceeded, or when a tape is unloaded, or a reset drive command is issued. Setting this flag to OFF suppresses the logging of this information. ---------------------------------------------------------------------- 4. Configuring and Running the lin_taped daemon ---------------------------------------------------------------------- The lin_taped daemon, which is configured to automatically start by the device driver installation procedure, must be active for the information to be stored. There are two files installed with the lin_tape driver that are associated with the lin_taped daemon. They are defined as follows: 1. /etc/lin_taped.conf This is the configuration file for the lin_taped daemon and is only read when lin_taped is started. If changes are made to this file, the daemon must be restarted for the changes to take effect. In this file are configuration parameters which pertain to each type of tracing and logging. When the driver is installed, a version of this file is also installed which allows the daemon to start without modification by the customer, and causes all collected information to be stored in the /var/log directory. The trace messages will be stored in the file lin_tape.trace. If lin_tape.trace reaches the size specified in lin_taped.conf, the file will be archived (using the ar command) with a time stamp into lin_tape.a file under the same directory. The error logging will be stored in the file lin_tape.errorlog. If lin_tape.errorlog reaches the size specified in lin_taped.conf, the file will be archived into lin_tape.a in the same way as lin_tape.trace. The drive dump, SIM/MIM data, or log sense will be stored in the files with a time stamp and ".dmp", ".simmim", or ".log" suffix, respectively. See this file for definitions of the individual fields. Any record in the file that has a '#' as the first non-blank character on the line is considered a comment, and is ignored. No comment information is allowed on records that have parameter settings. The archive file lin_tape.a will be large after a certain time of tape device activities. It is recommanded that you periodically delete this file to free your file system usage. The length of period can be daily, weekly, or monthly, etc, decided by the amount of activities on tape and the size of your file system. 2. /usr/bin/lin_taped This is the binary file of the lin_tape daemon, which needs to be run under an id with root authority. When the daemon is running, it retrieves data and stores it under the directories specified in /etc/lin_taped.conf. By default, if there is one or more IBM tape devices attached to your system, the daemon will start running every time the system is booted. Check /var/log/messages to verify that lin_taped started successfully. You may also invoke the daemon from the command line. lin_taped takes none or one of the parameters as listed below: lin_taped [start stop restart status] --"lin_taped" or "lin_taped start" will start the daemon. If there is already an lin_taped running, the new one will be aborted. (Use "lin_taped restart" if lin_taped is already running.) --"lin_taped stop" will terminate the daemon and free all the resources associated with the daemon. When the daemon is stopped, no information can be saved. --"lin_taped restart" will terminate the currently running daemon and start a new one. The new daemon will reread the /etc/lin_taped.conf file. This command should be used after modifying the /etc/lin_taped.conf file while lin_taped is running. --"lin_taped status" prints a message on stdout indicating whether the daemon is running or not. ---------------------------------------------------------------------- 5. Turning off lin_tape trace and Removing lin_tape driver module ---------------------------------------------------------------------- If you do not need any trace data from lin_tape, use the STIOC_SETP ioctl or lin_tapeutil, Query/Set Tape Parameters, to set the flags appropriately. Then use "lin_taped stop" to stop the daemon. If you need to remove the lin_tape device driver module using the "rmmod" command, you need to make sure to stop lin_taped first if the daemon is running.