Configuring and running the lin_taped daemon
- Error logging and tracing
- When drive dumps, log sense data, or SIM/MIM error information is created by the tape drive, the daemon automatically retrieves that data and saves it to the hard disk drive on your Linux® system.
- Failover and load balancing
- Encryption
Installing lin_taped
lin_taped is automatically installed at/usr/bin/lin_taped when you install the lin_tape device driver with the rpm or tar package. Refer toInstallation and Configuration instructions for instructions on installing the lin_tape device driver.
Configuring lin_taped
You can customize the operation of lin_taped by modifying its configuration file, which is at /etc/lin_taped.conf. The daemon reads only the configuration file when it starts; so if you modify the configuration file, stop the daemon, and restart it so that your modifications are recognized by the daemon.
Tracing:
0 | With tracing set to 0, lin_taped records minimal tracing. |
1 | With tracing set to 1, lin_taped records information that is 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. 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 form the device, all sense data is also recorded. This tracing level is used only when a specific problem is being diagnosed due to the potential for huge amounts of data that is generated. |
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 Linux ar command) into file lin_tape.a in the same directory. In the archive, the file name is renamed to lin_tape.trace.timestamp, where timestamp reflects the time that the file was archived.
You can 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 the lin_taped.conf file 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 (with the Linux ar command) into file lin_tape.a in the same directory. In the archive, the file name is renamed to lin_tape.errorlog.timestamp, where timestamp reflects the time that the file was archived.
You can 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.conf file. Refer to the instructions in the lin_taped.conf file for details.
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
4 bytes represent driver_byte, host_byte, msg_byte, and status_byte.
"Sense Data" is the full SCSI sense data that is returned from the
target. "Description" is a person-readable text string that is obtained
by parsing the sense key field of the sense data.- 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
- Sense key is 2, and the ASC/ASCQ indicates that the device is becoming ready
- Sense key is 6, indicating a unit attention
- 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_tapen is the device special file (for example, lin_tape1, lin_tape2) and timestamp reflects the time that 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/log directory by default. You can specify another directory in the /etc/lin_taped.conf file.
- lin_tapeMaxLogSenseFiles, which has a value of 0 or a positive decimal number.
- lin_tapeAutoLogSenseFileOverWrite, which has a value of 0 or 1.
By default, lin_tapeMaxLogSenseFiles is 0 and lin_tapeAutoLogSenseFileOverWrite is 1, which means that every time log sense data is created, it is written to a new file.
If lin_tapeMaxLogSenseFiles is 0, lin_tapeAutoLogSenseFileOverWrite is ignored, and each time log sense data is obtained, it is written to a new file.
If lin_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_tapeMaxLogSenseFiles is created. Then, lin_taped stops creating new files, even if new log sense data is produced.
If lin_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_tapeMaxLogSenseFiles is 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 retrieving 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 named lin_tapex.timestamp.dmp, wherelin_tapen is the device special file (for example, lin_tape1, lin_tape2) and timestamp reflects the time that the file was created. Each time a drive dump is obtained, it is written to a new file. The IBM service organization might request that you forward drive dumps to them for analysis.
The drive dumps are stored in the /var/log directory by default. You can specify another directory in the /etc/lin_taped.conf file.
- lin_tapeMaxDumpFiles, which can have a value of 0 or a positive decimal number.
- lin_tapeAutoDriveDumpFileOverWrite, which can have a value of 0 or 1.
By default, lin_tapeMaxDumpFiles is 0 and lin_tapeAutoDriveDumpFileOverWrite is 1, which means that every time a drive dump is obtained, it is written to a new file.
If lin_tapeMaxDumpFiles is 0, lin_tapeAutoDriveDumpFileOverWrite is ignored, and each time a drive dump is obtained, it is written to a new file.
If lin_tapeMaxDumpFiles is a positive number and lin_tapeAutoDriveDumpFileOverWrite is 0, each time a dump is obtained, lin_taped writes that data to a file until lin_tapeMaxDumpFiles is created. Then, lin_taped stops creating new files, even if new drive dumps are produced.
If lin_tapeMaxDumpFiles is a positive number and lin_tapeAutoDriveDumpFileOverWrite is 1, each time a dump is obtained, lin_taped writes that data to a file until lin_tapeMaxDumpFiles is 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 retrieving 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 named lin_tapex.timestamp.simmim, where lin_tapen is the device special file (for example, lin_tape1, lin_tape2) and timestamp reflects the time that the file was created. Each time SIM/MIM data is obtained, it is written to a new file. The IBM service organization might request that you forward SIM/MIM data to them for analysis.
The SIM/MIM data is stored in the /var/log directory by default. You can specify another directory in the /etc/lin_taped.conf file.
- lin_tapeMaxSimMimDataFiles, which can have a value of 0 or a positive decimal number.
- lin_tapeAutoSimMimDataOverWrite, which can have a value of 0 or 1.
By default, lin_tapeMaxSimMimDataFiles is 0 and lin_tapeAutoSimMimDataOverWrite is 1, which means that every time SIM/MIM data is obtained, it is written to a new file.
If lin_tapeMaxSimMimDataFiles is 0, lin_tapeAutoSimMimDataOverWrite is ignored, and each time SIM/MIM data is obtained, it is written to a new file.
If lin_tapeMaxSimMimDataFiles is 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_tapeMaxSimMimDataFiles is created. Then, lin_taped stops creating new files, even if new SIM/MIM data is created.
If lin_tapeMaxSimMimDataFiles is 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_tapeMaxSimMimDataFiles is 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 can selectively enable or disable them through an application program, which uses the STIOC_SETP ioctl. These settings persist until the device driver is restarted, or the host system is rebooted.
- 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.
Running lin_taped:
If you are running the lin_tape device driver, version 1.4.1 or higher, after installing lin_tape lin_taped starts running even if your system does not have a tape device attached. If you add a new tape device into your Linux system, lin_taped automatically creates a special file under the /dev directory. If you are running the lin_tape device driver, version 1.3.x or less, lin_taped does not automatically start if there is no tape device attached. After you attach a new tape device, you must start the lin_taped daemon.
lin_taped [start stop restart status]
- lin_taped or lin_taped start
- Starts the daemon. If there is already a lin_taped running, the new one is aborted. (Use lin_taped restart if lin_taped is already running.)
- lin_taped stop
- Terminates the daemon and frees all the resources that are associated with the daemon. When the daemon is stopped, no information is saved.
- lin_taped restart
- Terminates the currently running daemon and starts a new one. The new daemon reads the /etc/lin_taped.conf file. This command is used after the /etc/lin_taped.conf file is modified while lin_taped is running.
- lin_taped status
- Prints a message on stdout to indicate whether the daemon is running or not.