Technical article 125339

After an Openserver 5.0.7 inplace upgrade, I can no longer access my tape drive.

OpenServer 5.0.5OpenServer 5.0.6OpenServer 5.0.7

Written · Last revised

Problem

The tape drive on the system worked properly prior to an inplace upgrade to OpenServer 5.0.7. After the upgrade, I get the following errors from the system when trying to access it:

# tape status
tape: can't open '/dev/xct0': No such file or directory
# tar tv8
tar: cannot open: /dev/rct0
# cpio -vict -I /dev/rct0
cpio: cannot open </dev> for input.
# dd if=/dev/rct0 of=foo
dd: cannot open /dev/rct0: No such file or directory
(error 2)

However, I can properly access the tape drive using the SCSI device nodes for the tape (/dev/*Stp*). For example,

tape status /dev/xStp0
tar tvf /dev/rStp0
cpio -vict -I /dev/rStp0
dd if=/dev/rStp0 of=foo

Cause

During the upgrade, the default device nodes are reset to point to a cartridge tape device. This can be evidenced by viewing the appropriate device nodes.

Prior to the upgrade, the device nodes for both *ct0 and *Stp0 pointed to the same place:

crw-rw-rw-   5 root     root      46,  8 May  2  2001    /dev/nrct0
crw-rw-rw-   5 root     root      46,  0 May  2  2001    /dev/rct0
crw-rw-rw-   3 root     root      46,128 May  2  2001    /dev/xct0
crw-rw-rw-   5 root     root      46,  8 May  2  2001    /dev/nrStp0
crw-rw-rw-   5 root     root      46,  0 May  2  2001    /dev/rStp0
crw-rw-rw-   3 root     root      46,128 May  2  2001    /dev/xStp0

After the upgrade, the *ct0 devices were reset to use major number 10:

crw-rw-rw-   5 root     root      46,  8 May  2  2001    /dev/nrStp0
crw-rw-rw-   5 root     root      46,  0 May  2  2001    /dev/rStp0
crw-rw-rw-   3 root     root      46,128 May  2  2001    /dev/xStp0
crw-rw-rw-   4 root     root      10,  8 Aug 13  2002    /dev/nrct0
crw-rw-rw-   4 root     root      10,  0 Aug 13  2002    /dev/rct0
crw-rw-rw-   1 root     root      10,128 Aug 13  2002    /dev/xct0

Additionally, a portion of the tape configuration in the link kit may have been inadvertently removed. There may be missing/incorrect data the following Stp driver configuration files:

/etc/conf/node.d/Stp
/etc/conf/pack.d/Stp/space.h
/etc/conf/pack.d/Stp/device.dat

Solution

This has been reported to SCO Engineering.

To work around the problem, you will need to remove your tape drive configuration and re-add it.

Run the following (as root)
# mkdev tape

- Select #1 "Configure a SCSI or Enhanced IDE tape drive" - Select #3 "Remove a SCSI Tape Drive" - Enter "0" to remove tape Unit 0.

NOTE: you may not see any tape drives configured, but enter "0" anyway.

- Type "y" to "Update SCSI configuration?" - Type "q" to "leave current string as is"

This will bring you back to the "SCSI or Enhanced IDE  Tape Drive
Configuration Program" where you can quit out of the mkdev tape
routine.

At this point, there may still be a spurious entry for this tape drive in your scsi configuration. To confirm, run

# mkdev .scsi

and select "3. Display current SCSI configuration". If you do still see an "Stp" entry, make note of the "Host Adapter Type", "Adapter Number", "ID", "LUN", and "Bus". Then, select "2. Remove a SCSI device" and enter the information just gathered when prompted for it.

You should now be ready to re-run `mkdev tape` to add your tape
drive back into the system. If you are not sure of the correct
answers to provide when prompted for "Host Adapter Type",
"Adapter Number", "ID", "LUN", and "Bus", refer to the
/usr/adm/messages file and find your "tape" line from before
the system was upgraded. Once this is completed and the kernel is
relinked (as you exit mkdev tape), reboot the system to run with the
new kernel.

Note: If you had multiple tape drives configured on the system, you may need to repeat the above procedure for additional drives.

If problems arise with linking your kernel due to any of the tape configuration files getting corrupted, please refer to the following technical article to manually fix your tape configuration: Technical Article 110973, "What files get out of sync after trying to unsuccessfully add a tape drive?"

See also

Manual pages: tape(C) tar(C) mkdev(ADM)

TA110973, "What files get out of sync after trying to unsuccessfully add a tape drive?"

From the Xinuos technical article database, record 125339. Reproduced with permission. The original is at www.sco.com/ta/125339, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.