• No results found

Configure lin_taped

In document Installation and User s Guide (Page 134-138)

You can customize the operation of lin_taped by modifying its configuration file, which is located at/etc/lin_taped.conf. The daemon only reads the configuration file when it starts; consequently, if you make modifications to the configuration file, then stop the daemon and restart it so that your modifications are recognized by the daemon.

Tracing: Three levels of tracing are supported for the lin_tape device driver and are defined as follows:

0 With tracing set to 0, very minimal tracing is recorded from the lin_tape device driver.

1 With tracing set to 1, lin_taped records information associated with each ioctl called. If a device error occurs and SCSI sense data is obtained from the device, a subset of that sense data is also recorded. This is the default setting for tracing.

2 With tracing set to 2, lin_taped records tracing messages for each SCSI command. If a device error occurs and SCSI sense data is obtained from the device, all sense data is also recorded. This tracing level should only be used when a specific problem is being diagnosed due to the potential for huge amounts of data being generated.

Set thelin_tapeTracevariable in the/etc/lin_taped.conf file to 0, 1, or 2, depending on what level of tracing you desire. If the lin_tapeTracevariable is set to an invalid number, the lin_taped daemon does not start.

Tracing information is written to a file named /var/log/lin_tape.trace, by default. Information is written into the file until it is 1 MB in size, by default. After 1 MB of information is written, the file is archived (using the Linuxar command) into file

lin_tape.a in the same directory. In the archive, the filename is renamed to

lin_tape.trace.timestamp, where:timestampreflects the time that the file was archived. You may change the directory to which the tracing information is written or the default maximum size of the trace file by modifying settings in the lin_taped.conf file. Refer to the instructions in thelin_taped.conffile for details.

Error Logging: lin_taped records certain error messages from the lin_tape device driver in a file named/var/log/lin_tape.errorlog, by default. Information is written into the file until it is 1 MB in size, by default. After 1 MB of trace information is written, the file is archived (using the Linux arcommand) into filelin_tape.ain the same directory. In the archive, the filename is renamed tolin_tape.errorlog.timestamp, where:timestamp reflects the time that the file was archived.

You may change the directory to which the error logging information is written or the default maximum size of the error log file by modifying settings in the

lin_taped.conffile. Refer to the instructions in thelin_taped.conffile for details. Whenever the lin_taped daemon is running, error logging is enabled if tracing is enabled. Following is an example an error log record:

IBMtape0---E0001 Tue Sep 10 14:04:57 2002 Scsi Path : 03 00 00 00 CDB Command : 01 00 00 00 00 00 Status Code : 08 00 00 01 Sense Data : 70 00 04 00 00 00 00 58 00 00 00 00 00 00 FF 0B C4 77 00 00 00 06 01 40 00 00 00 00 00 00 01 00 10 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Description : Hardware Error

The first line indicates the tape device special file name and the device serial number, and the timestamp when the error message was recorded.″Scsi Path″is the SCSI path for this logical unit. It matches the order of the scsi/Channel/Id/ Lun information in the/proc/scsi/scsi file.″CDB Command″is the command data block of the SCSI command. ″Status Code″ is the returned result from the Linux SCSI middle layer device driver (scsi_mod.o). The four bytes represent driver_byte, host_byte, msg_byte, and status_byte, respectively. ″Sense Data″is the full SCSI sense data returned from the target. ″Description″is a person-readable text string obtained by parsing the sense key field of the sense data.

The following circumstances are not logged in the lin_tape.errorlog file:

1. Sense key is 0, and the sense data indicates an overlength or an underlength read, or encountering a file mark or the end of data

2. Sense key is 2, and the ASC/ASCQ indicates the device is becoming ready

3. Sense key is 6, indicating a unit attention

4. Sense key is 8, and the ASC/ASCQ indicates the end of data

Volume Logging: The lin_tape device driver retrieves the full log sense data from the tape drive whenever the drive reaches a log threshold, or a tape is unloaded from the drive, or the drive is reset through an application. This data is stored in binary in a file named lin_tape.timestamp.log, where:lin_tapenis the device special file (for example, lin_tape1, lin_tape2, etc.) andtimestampreflects the time the file was created. Each time log sense data is obtained, it is written to a new file. Use the appropriate tape drive hardware reference manual to decode the log sense data.

The volume logging data is stored in the/var/logdirectory by default. You may specify another directory in the/etc/lin_taped.conf file.

There are two configuration parameters in the/etc/lin_taped.conffile that you can tailor to affect the number of log sense files that are kept on your system: v lin_tapeMaxLogSenseFileswhich can have a value of 0 or a positive decimal

number.

v lin_tapeAutoLogSenseFileOverWritewhich can have a value of 0 or 1.

By default, lin_tapeMaxLogSenseFilesis 0 andlin_tapeAutoLogSenseFileOverWrite is 1, which means that every time log sense data is created, it is written to a new file. Iflin_tapeMaxLogSenseFiles is 0,lin_tapeAutoLogSenseFileOverWriteis ignored, and each time log sense data is obtained, it is written to a new file.

Iflin_tapeMaxLogSenseFiles is a positive number and

lin_tapeAutoLogSenseFileOverWrite is 0, each time log sense data is created,

lin_taped writes that data to a file until lin_tapeMaxLogSenseFileshave been created; then lin_taped stops creating new files, even if new log sense data is produced. Iflin_tapeMaxLogSenseFiles is a positive number and

lin_tapeAutoLogSenseFileOverWrite is 1, each time log sense data is created,

lin_taped writes that data to a file until lin_tapeMaxLogSenseFileshave been created; then when new log sense data is detected, lin_taped deletes the oldest log sense file and creates a new file with the newest log sense data; thus, only the newest data is kept.

Automatically Retrieve a Drive Dump: If a condition occurs in the drive such that a drive dump is created, lin_taped retrieves the drive dump and saves it in a file namedlin_tapex.timestamp.dmp, wherelin_tapenis the device special file (for example, lin_tape1, lin_tape2, etc.) andtimestampreflects the time the file was created. Each time a drive dump is obtained, it is written to a new file. The IBM service organization may request that you forward drive dumps to them for analysis.

The drive dumps are stored in the /var/logdirectory by default. You may specify another directory in the /etc/lin_taped.conffile.

There are two configuration parameters in the/etc/lin_taped.conffile that you can tailor to affect the number of drive dumps that are kept on your system:

v lin_tapeMaxDumpFileswhich can have a value of 0 or a positive decimal number. v lin_tapeAutoDriveDumpFileOverWritewhich can have a value of 0 or 1.

By default, lin_tapeMaxDumpFilesis 0 and lin_tapeAutoDriveDumpFileOverWriteis 1, which means that every time a drive dump is obtained, it is written to a new file. Iflin_tapeMaxDumpFilesis 0,lin_tapeAutoDriveDumpFileOverWriteis ignored, and each time a drive dump is obtained, it is written to a new file.

Iflin_tapeMaxDumpFilesis a positive number and

lin_tapeAutoDriveDumpFileOverWriteis 0, each time a dump is obtained, lin_taped writes that data to a file untillin_tapeMaxDumpFileshave been created; then lin_taped stops creating new files, even if new drive dumps are produced.

Iflin_tapeMaxDumpFilesis a positive number and

lin_tapeAutoDriveDumpFileOverWriteis 1, each time a dump is obtained, lin_taped writes that data to a file untillin_tapeMaxDumpFileshave been created; then when a new drive dump is detected, lin_taped deletes the oldest drive dump file and creates a new file with the newest drive dump data; thus, only the newest data is kept.

Automatically Retrieved SIM/MIM Data: If a condition occurs in the drive such that a drive SIM/MIM data is created, lin_taped retrieves the data and save it in a file namedlin_tapex.timestamp.simmim, wherelin_tapenis the device special file (for example, lin_tape1, lin_tape2, etc.) andtimestampreflects the time the file was created. Each time SIM/MIM data is obtained, it is written to a new file. The IBM service organization may request that you forward SIM/MIM data to them for analysis.

The SIM/MIM data is stored in the /var/logdirectory by default. You may specify another directory in the/etc/lin_taped.conf file.

There are two configuration parameters in the/etc/lin_taped.conffile that you can tailor to affect the number of SIM/MIM files that are kept on your system: v lin_tapeMaxSimMimDataFileswhich can have a value of 0 or a positive decimal

number.

v lin_tapeAutoSimMimDataOverWritewhich can have a value of 0 or 1.

By default, lin_tapeMaxSimMimDataFilesis 0 and lin_tapeAutoSimMimDataOverWrite is 1, which means that every time SIM/MIM data is obtained, it is written to a new file.

Iflin_tapeMaxSimMimDataFilesis 0,lin_tapeAutoSimMimDataOverWriteis ignored, and each time SIM/MIM data is obtained, it is written to a new file.

Iflin_tapeMaxSimMimDataFilesis a positive number and

lin_tapeAutoSimMimDataOverWrite is 0, each time SIM/MIM data is obtained, lin_taped writes that data to a file until lin_tapeMaxSimMimDataFileshave been created; then lin_taped stops creating new files, even if new SIM/MIM data are created.

Iflin_tapeMaxSimMimDataFilesis a positive number and

lin_tapeAutoSimMimDataOverWrite is 1, each time SIM/MIM data is obtained, lin_taped writes that data to a file until lin_tapeMaxSimMimDataFileshave been created; then when new SIM/MIM data is detected, lin_taped deletes the oldest SIM/MIM file and creates a new file with the newest SIM/MIM data; thus, only the newest data is kept.

Selective Tracing: lin_tape provides facilities by which you can disable and enable tracing, error logging, auto-retrieving drive dumps, and auto-retrieving SIM/MIM data. You may selectively enable/disable them through the IBMtapeutil Query/Set Tape Parameters operation or through an application program which uses the STIOC_SETPioctl. These settings persist until the device driver is restarted, or the host system is rebooted.

Note: See “Linux System - Tape Utility Program (IBMtapeutil)” on page 385 for information on theIBMtapeutilapplication.

trace This parameter is set to On by default, which enables lin_tape tracing of activities and error logging on a particular tape drive. Set this parameter to off to stop tracing and error logging.

logging

This parameter is set to On by default and enables logging of log sense data. Setting this flag to Off suppresses volume logging for this device.

disable_sim_logging

This parameter controls the logging of SIM/MIM data for a device. By default it is set to Off which causes SIM/MIM data to be logged. Set this flag to On to suppress the logging of SIM/MIM records.

disable_auto_drive_dump

This parameter controls the saving of drive dumps for a device. By default it is set to Off which causes drive dumps to be saved. Set this flag to On to suppress the saving of drive dumps.

In document Installation and User s Guide (Page 134-138)