Next | Prev | Up | Top | Contents | Index

Checking the Software

If you are reasonably sure the tape drive is correctly installed on the computer, but your software does not seem to be able to use it, a possible cause for the problem is that the tape device's SCSI address changed when other SCSI devices were added to your system.

The system assumes that if /dev/nrtape exists and appears to be a tape drive of some kind, then it doesn't need to remake the default tape drive links of /dev/tape, /dev/nrtape, and so on. It also assumes that the first tape drive that it finds is the main tape drive. It searches for devices starting at the highest SCSI ID numbers, so the tape device on SCSI ID 7 gets the default links before a tape device on SCSI ID 3.

The default tape drive for most commands is /dev/tape. If the tape drive installation proceeded correctly, you should have at least /dev/tape and /dev/nrtape special device files. You may have several others, depending on the type of tape drive.

The mt command can be used to confirm that /dev/tape exists and that the tape drive is responding. Output similar to the following from the mt status command confirms that:

Controller: SCSI
Device: ARCHIVE: Python 25601-XXX2.63
Status: 0x20262
Drive type: DAT
Media : READY, writable, at BOT
The following output means that you have another process accessing the drive right now:

/dev/nrtape: Device or resource busy
The following output appears when a special device file does not exist:

/dev/nrtape: No such file or directory
The output when a device file exists, but no hardware is responding at that address, is:

/dev/nrtape: No such device
If the hardware appears to be present, but /dev/tape does not appear to be valid, confirm the file links. Take the device unit number from hinv output:

Tape drive: unit 3 on SCSI controller 0: DAT
In this example the device unit number is 3 (this is likely to be different on your system). Use the following ls command to confirm that /dev/tape is linked to the correct device (change the numeral 3 to the correct numeral for your drive):

ls -l /dev/tape /dev/mt/tps0d3* 
crw-rw-rw- 2 root sys 23, 96 Sep 21 11:11 /dev/mt/tps0d3
crw-rw-rw- 2 root sys 23, 97 Jun 20 05:55 /dev/mt/tps0d3nr
crw-rw-rw- 2 root sys 23, 99 Jul 8 09:57 /dev/mt/tps0d3nrns 
crw-rw-rw- 2 root sys 23,103 Jun 20 05:55 /dev/mt/tps0d3nrnsv 
crw-rw-rw- 2 root sys 23,101 Jun 20 05:55 /dev/mt/tps0d3nrv 
crw-rw-rw- 2 root sys 23, 98 Jun 20 05:55 /dev/mt/tps0d3ns
crw-rw-rw- 2 root sys 23,102 Jun 20 05:55 /dev/mt/tps0d3nsv 
crw-rw-rw- 2 root sys 23,100 Jun 20 05:55 /dev/mt/tps0d3v 
crw-rw-rw- 1 root sys 23,102 Jun 23 09:19 /dev/tape
The major and minor device numbers are the key here. They are the two numbers separated by a comma (23 and 102):

crw-rw-rw- 1 root sys 23,102 Jun 23 09:19 /dev/tape
Match these numbers with one of the lines from /dev/mt. In this example, it should match to:

crw-rw-rw- 2 root sys 23,102 Jun 20 05:55 /dev/mt/tps0d3nsv
Compare the major and minor device numbers that are reported with /dev/tape and the ones reported for /dev/mt/tps0dX*. Is there a match? If not, remove /dev/tape and /dev/nrtape and run MAKEDEV as root from the /dev directory. Give the command:

./MAKEDEV tapelinks 
The MAKEDEV command can be verbose in describing what it is doing. Your output may differ in the number of devices made and the unit number. Once the MAKEDEV program has completed, go through these same checks again to be sure of success.

The MAKEDEV command does not let you choose which tape device to link to. You must make the links by hand if the MAKEDEV program does not default to the drive that you wish to use.

This covers the basic problems that administrators experience regarding missing tape drives. See the following reference pages for more information on the commands used in this section: mt(1), ls(1), hinv(1M). For more technical information about tapes, see mtio(7), tps(7M), or xmt(7).


Next | Prev | Up | Top | Contents | Index