Technical article 110725

I cannot access my SCSI tape drive with the device nodes /dev/rct0, /dev/xct0, or /dev/nrct0.

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5

Written · Last revised

Problem

Any commands attempting to access a SCSI tape device using the device nodes /dev/rct0, /dev/xct0, or /dev/nrct0 fail. Some examples may include:

# tape status
tape: can't open '/dev/xct0': No such device
# tar cvf /dev/rct0 /etc/hosts
tar: cannot open: /dev/rct0

However, if you use the SCSI device nodes (/dev/rStp0, /dev/nrStp0, or /dev/xStp0), the commands execute properly.

You may have also noticed the following message while running mkdev(ADM) tape to configure your SCSI tape drive:

The presence of a Cartridge Tape Drive has been detected. The Cartridge Tape Drive must use the default devices to function properly. Therefore, SCSI devices will be created without default device links.

Cause

As the above message indicates, the cause of this type of problem is that the ct driver is linked into the kernel which reserves the /dev/*ct0 device nodes to be used for that device.

Solution

You can confirm this by checking whether the ct driver is turned on in the file /etc/conf/sdevice.d/ct. If the second field is a Y, this is the case.

# cat /etc/conf/sdevice.d/ct
ct      Y       1       5       0       0       0       0       0      0

You can also see this via the following listings:

# ls -la /dev/*ct0
crw-rw-rw-   2 root     root      10, 32 Dec 26 04:58 /dev/erct0
crw-rw-rw-   4 root     root      10,  8 Dec 26 04:58 /dev/nrct0
crw-rw-rw-   4 root     root      10,  0 Dec 26 04:58 /dev/rct0
crw-rw-rw-   1 root     root      10,128 Dec 26 04:58 /dev/xct0
# ls -la /dev/*Stp0
crw-rw-rw-   2 root     root      46,  8 Dec 26 14:21 /dev/nrStp0
crw-rw-rw-   2 root     root      46,  0 Dec 26 14:21 /dev/rStp0
crw-rw-rw-   2 root     root      46,128 Dec 26 14:21 /dev/xStp0

You can see that the *ct0 devices are using a major device number of 10 while the *Stp0 devices are using 46.

If there is no ct device on your system, you need to remove the ct driver from the kernel. The recommended way to do this is by using mkdev(ADM) tape as shown below:

# mkdev tape
Tape Drive Configuration Program

1. Configure a SCSI or Enhanced IDE tape drive 2. Configure a different type of tape drive

Select an option or enter q to quit:

Select 2.
Tape Drive Configuration Program

1. Install a Tape Drive 2. Remove a Tape Drive 3. Change default Tape Drive

Select an option or enter q to quit:

Select 2.
Tape Drive Removal Menu

1. Remove Cartridge Tape Drive 2. Remove Mini-Cartridge Tape Drive 3. Remove Qic-40 or Qic-80 Tape Drive 4. Remove Compaq CPQS Tape Drive

Select an option or enter q to return to the main menu:

Select 1.

Updating system files to effect removal of driver ...

System files have been updated.
Removing default tape devices.

Cartridge Tape Driver and associated devices have been removed.

In /etc/default/boot:
No current boot string.

Enter new string, "rm" to remove string, or enter q to leave current string as is:

Enter q.
Tape Drive Configuration Program

1. Install a Tape Drive 2. Remove a Tape Drive 3. Change default Tape Drive

Select an option or enter q to quit:

Enter q.
Tape Drive Configuration Program

1. Configure a SCSI or Enhanced IDE tape drive 2. Configure a different type of tape drive

Select an option or enter q to quit:

Enter q.

You must create a new kernel to effect the driver change you specified.

Do you wish to create a new kernel now? (y/n)

Enter y.

Now that the ct driver is removed from the kernel, you need to run mkdev tape again to remove and re-add your SCSI tape drive.

If you are trying to remove a SCSI tape on OpenServer 5.0.4, you may have trouble with relinking the kernel if you try to relink prior to re-adding the tape drive. See ta105776, "Kernel relink fails after all SCSI tapes are removed from the link kit."

IMPORTANT NOTE: Failure to remove and re-add the SCSI tape drive will prevent the correct device nodes from being created.

NOTES:    When the ct driver is configured, the "r" flag (required device)
          is added to the third field of its entry in /etc/conf/cf.d/mdevice.
          This prevents disabling the ct driver by means of changing the "Y"
          to an "N" in the file /etc/conf/sdevice.d/ct. If for some reason
          mkdev tape cannot be used to remove the ct driver, you can edit
          /etc/conf/cf.d/mdevice and remove the "r" from the third field of
          the ct line. This will allow the driver to be disabled in
          /etc/conf/sdevice.d/ct.

See also

ta105776, "Kernel relink fails after all SCSI tapes are removed from the link kit."

Manual pages: cartridge(HW), mkdev(ADM), tape(HW), mdevice(F)

From the Xinuos technical article database, record 110725. Reproduced with permission. The original is at www.sco.com/ta/110725, 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.