Skip Navigation Links | |
Exit Print View | |
![]() |
Sun Storage Archive Manager 5.3 Configuration and Administration Guide Sun QFS and Sun Storage Archive Manager 5.3 Information Library |
2. Configuring Storage Devices for Archiving
3. Performing Additional SAM-QFS Configuration
4. Creating Parameters Files for Network-Attached Automated Libraries
5. Checking the Drive Order in Libraries
7. Managing Automated Libraries and Manually Loaded Drives
8. Managing Vendor-Specific Libraries
11. Archive Directives (archiver.cmd)
12. Archive Set Directives (archiver.cmd)
13. Data Integrity Validation in SAM-QFS
How to Enable the Device Log by Using the samset Command
How to Enable the Device Log by Editing the defaults.conf File
The system error facility (SEF) reporting system captures log sense data from tape devices in an automated library, writes it to a log file, and translates it into human-readable form. This utility consists of the following:
A log file containing data from tape device log sense pages.
A command, sefreport, for writing the log file to stdout in a human-readable format. This log file can be used as input to a user-supplied analysis script.
The log sense pages are different from vendor to vendor. For the meanings of the parameter codes, control bits, and parameter values, see the vendor documentation for each specific device.
SEF is not supported for stand-alone tape drives. SEF reporting is most useful for older SCSI-2 devices that do not support the tapealert functionality. For more information, see tapealert(1M) in Sun QFS and Sun Storage Archive Manager Reference Manual.
For example:
# mkdir /var/opt/SUNWsamfs/sef
You can enable SEF reporting any time after installation by creating the sefdata log file. Initially, the SEF log file must be empty. The following command shows the SEF log file being created in the default location.
# touch /var/opt/SUNWsamfs/sef/sefdata
# samd stop # samd config # samd start
For eq, specify the Equipment Number of the drive.
# samd unload eq
SEF data is appended to the log file as it is generated.
Note - SEF reporting is enabled as long as the sefdata log file exists. To disable SEF reporting, rename or remove this file.
You can configure SEF reporting to log and read log sense data from an alternate location. For more information about reading log sense data from an alternate location, see sefreport(1M) in Sun QFS and Sun Storage Archive Manager Reference Manual.
The SEF report output consists of header lines and log sense data.
The following are the most commonly used options with the sefreport command:
The -d option. The -d option generates additional device information. It writes an additional header line that contains the equipment ordinal and path name to the device for each record. This process makes searching for and locating SEF records that pertain to a specific device easier.
The -v option or the -t option. Do not specify the -t and -v options on the same command line. They are mutually exclusive.
The -v option generates information in verbose mode. It appends information regarding the equipment ordinal, page code, and VSN to each line of a record. This method enables selecting only those lines that pertain to a specific device or a specific volume.
The -t option generates log sense output with text descriptions. For each line of log sense data output, the report includes an additional string containing the equipment ordinal, page code, VSN, and parameter code description.
For example, the following SEF command reads the SEF log file from the default location, writes the device number and path name for each device, and generates output:
# sefreport -d /var/opt/SUNWsamfs/sef/sefdata > sef.output
Example 17-3 Content of sef.output File
Record no. 1 Mon Mar 26 11:17:48 2001 STK 9840 1.25 VSN 002981 Eq no. 32 Dev name /dev/rmt/1cbn PAGE CODE 2 param code control param value 00h 74h 0x0 01h 74h 0x0 02h 74h 0x0 03h 74h 0x0 04h 74h 0x0 05h 74h 0x40050 06h 74h 0x0 PAGE CODE 3 param code control param value 00h 74h 0x0 01h 74h 0x0 02h 74h 0x0 03h 74h 0x0 04h 74h 0x0 05h 74h 0x140 06h 74h 0x0 PAGE CODE 6 param code control param value 00h 74h 0x0 Record no. 2 Mon Mar 26 11:30:06 2001 STK 9840 1.25 VSN 002999 Eq no. 31 Dev name /dev/rmt/0cbn PAGE CODE 2 param code control param value 00h 74h 0x0 01h 74h 0x0 02h 74h 0x0 03h 74h 0x0 04h 74h 0x0 05h 74h 0x1400a0 06h 74h 0x0 PAGE CODE 3 param code control param value 00h 74h 0x0 01h 74h 0x0 02h 74h 0x0 03h 74h 0x0 04h 74h 0x0 05h 74h 0x190 06h 74h 0x0 PAGE CODE 6 param code control param value 00h 74h 0x0 Record no. 3 Mon Mar 26 11:30:23 2001 STK 9840 1.25 VSN 002981 Eq no. 32 Dev name /dev/rmt/1cbn PAGE CODE 2 param code control param value 00h 74h 0x0 01h 74h 0x0 02h 74h 0x0 03h 74h 0x0 04h 74h 0x0 05h 74h 0x18400f0 06h 74h 0x0 PAGE CODE 3 param code control param value 00h 74h 0x0 01h 74h 0x0 02h 74h 0x0 03h 74h 0x0 04h 74h 0x0 05h 74h 0x1e0 06h 74h 0x0 PAGE CODE 6 param code control param value 00h 74h 0x0 . . .
For more information about the SEF log file, including its content and format, see sefdata(4) in Sun QFS and Sun Storage Archive Manager Reference Manual. For more information about optional SEF report formats, see sefreport(1M) in Sun QFS and Sun Storage Archive Manager Reference Manual.
You manage the SEF log file just as you manage any other SAM-QFS log file. You can run a cron job periodically to save the current log file to another location, to delete old SEF files, to create new (empty) SEF files, or to perform other file management tasks.
You can also use the log_rotate.sh utility to rotate this log file.
For more information about tools for managing the SEF log file, see the cron(1M) or log_rotate.sh(1M) man pages.
In addition to using the SEF log file, you can use the Oracle Solaris sysevent feature to obtain tape drive SCSI log sense error counter pages 2 and 3 for media analysis. By default, the SEF sysevent feature is enabled and set to poll once before unload. The SEF sysevent behavior is controlled by defaults.conf and samset.
In the defaults.conf file, the sef parameter can be used to enable SEF sysevent feature by equipment ordinal, or to specify the log sense polling frequency. For more information, see defaults.conf(4) in Sun QFS and Sun Storage Archive Manager Reference Manual.
For example:
# !/bin/ksh echo "$@" >> /var/tmp/xx.dat exit 0
# chmod a+rwx /var/tmp/xx
Add the SEF sysevent handler to the syseventd file by adding the following information.
# syseventadm add -vSUNW -pSUNWsamfs -cDevice -sSEF /var/tmp/xx "$VENDOR" "$PRODUCT" "$USN" "$REV" $TOD $EQ_ORD "$NAME" $INQ_TYPE "$MEDIA_TYPE" "$VSN" $LABEL_TIME $LP2_PC0 $LP2_PC1 $LP2_PC2 $LP2_PC3 $LP2_PC4 $LP2_PC5 $LP2_PC6 $LP3_PC0 $LP3_PC1 $LP3_PC2 $LP3_PC3 $LP3_PC4 $LP3_PC5 $LP3_PC6 $WHERE $sequence # syseventadm restart
This command creates the /etc/sysevent/config/SUNW,SUNWsamfs,Device,sysevent.conf file containing the SEF sysevent handler /var/tmp/xx and loads the event handler into the syseventd daemon.
# pkill -HUP syseventd
For more information, see sefsysevent(4) in Sun QFS and Sun Storage Archive Manager Reference Manual.