How to troubleshoot tape devices
From Wiki-UX.info
Abstract
The following articles presents a series of HP-UX commands useful to troubleshoot tape devices problems. Output examples are present along the commands.
# ioscan -fnkC tape
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
tape 0 8/16/5.0.0 stape CLAIMED DEVICE HP C1537A
/dev/rmt/0m /dev/rmt/c1t0d0BESTn
/dev/rmt/0mb /dev/rmt/c1t0d0BESTnb
/dev/rmt/0mn /dev/rmt/c1t0d0DDS
/dev/rmt/0mnb /dev/rmt/c1t0d0DDSb
/dev/rmt/c1t0d0BEST /dev/rmt/c1t0d0DDSn
/dev/rmt/c1t0d0BESTb /dev/rmt/c1t0d0DDSnb
# mt -f /dev/rmt/0mn status
Drive: HP C1537A
Format:
Status: [0]
File: 0
Block: 0
# lssf /dev/rmt/0mn
stape card instance 1 SCSI target 0 SCSI LUN 0 at&t no rewind best density available at address 8/16/5.0.0 /dev/rmt/0mn
for tape in $(ls /dev/rmt/*)
do
lssf $tape
done
Example:
# for tape in $(ls /dev/rmt/*)
> do
> lssf $tape
done> done
stape card instance 2 SCSI target 6 SCSI LUN 0 AT&T best density available at address 0/1/1/0.6.0 /dev/rmt/0m
stape card instance 2 SCSI target 6 SCSI LUN 0 Berkeley best density available at address 0/1/1/0.6.0 /dev/rmt/0mb
stape card instance 2 SCSI target 6 SCSI LUN 0 AT&T No-Rewind best density available at address 0/1/1/0.6.0 /dev/rmt/0mn
stape card instance 2 SCSI target 6 SCSI LUN 0 Berkeley No-Rewind best density available at address 0/1/1/0.6.0 /dev/rmt/0mnb
stape card instance 2 SCSI target 6 SCSI LUN 0 AT&T best density available at address 0/1/1/0.6.0 /dev/rmt/c2t6d0BEST
stape card instance 2 SCSI target 6 SCSI LUN 0 Berkeley best density available at address 0/1/1/0.6.0 /dev/rmt/c2t6d0BESTb
stape card instance 2 SCSI target 6 SCSI LUN 0 AT&T No-Rewind best density available at address 0/1/1/0.6.0 /dev/rmt/c2t6d0BESTn
stape card instance 2 SCSI target 6 SCSI LUN 0 Berkeley No-Rewind best density available at address 0/1/1/0.6.0 /dev/rmt/c2t6d0BESTnb
# ll /dev/rmt/* | sort -k 6
crw-rw-rw- 2 bin bin 205 0x026000 Aug 5 09:55 /dev/rmt/0m
crw-rw-rw- 2 bin bin 205 0x026000 Aug 5 09:55 /dev/rmt/c2t6d0BEST
crw-rw-rw- 2 bin bin 205 0x026040 Aug 5 09:55 /dev/rmt/0mn
crw-rw-rw- 2 bin bin 205 0x026040 Aug 5 09:55 /dev/rmt/c2t6d0BESTn
crw-rw-rw- 2 bin bin 205 0x026080 Aug 5 09:55 /dev/rmt/0mb
crw-rw-rw- 2 bin bin 205 0x026080 Aug 5 09:55 /dev/rmt/c2t6d0BESTb
crw-rw-rw- 2 bin bin 205 0x0260c0 Aug 5 09:55 /dev/rmt/0mnb
crw-rw-rw- 2 bin bin 205 0x0260c0 Aug 5 09:55 /dev/rmt/c2t6d0BESTnb
for tape in $(ls /dev/rmt/*)
do
mt -f $tape status
sleep 1
done
Example:
# for tape in $(ls /dev/rmt/*)
> do
> mt -f $tape status
> sleep 1
> done
Drive: HP C7438A
Format:
Status: [41112600] BOT online compression immediate-report-mode
File: 0
Block: 0
Drive: HP C7438A
Format:
Status: [41112600] BOT online compression immediate-report-mode
File: 0
Block: 0
Drive: HP C7438A
Format:
Status: [41112600] BOT online compression immediate-report-mode
File: 0
Block: 0
Drive: HP C7438A
Format:
Status: [41112600] BOT online compression immediate-report-mode
File: 0
Block: 0
Drive: HP C7438A
Format:
Status: [41112600] BOT online compression immediate-report-mode
File: 0
Block: 0
Drive: HP C7438A
Format:
Status: [41112600] BOT online compression immediate-report-mode
File: 0
Block: 0
Drive: HP C7438A
Format:
Status: [41112600] BOT online compression immediate-report-mode
File: 0
Block: 0
Drive: HP C7438A
Format:
Status: [41112600] BOT online compression immediate-report-mode
File: 0
Block: 0