Technical article 104978

idmkreg reports "error updating space.c for Stp" when the kernel is relinking.

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5OpenServer 5.0.6

Written · Last revised

Problem

I have configured a number of SCSI tapes using the mkdev(ADM)
command.  When I relink the kernel, this message is displayed:
idmkreg : error updating space.c for Stp
I have tried removing all of the tape devices, again using
mkdev(ADM).  When I view the current SCSI tape configuration
using this utility, it indicates that there are no longer any
SCSI tape devices configured.  However, this did not prevent
the error message from being reported when I once again tried
to relink the kernel.

Solution

The system's tape configuration has become corrupt.

The following steps detail how to correct this inconsistency by removing all additional tape devices from the kernel configuration files leaving just the necessary configuration for the Stp0 device (scsitape(HW)).

When you have one tape drive configured, check and modify these files as follows:

* /etc/conf/pack.d/Stp/device.dat

Remove all other Stp entries leaving just the Stp0 one. The Stp0 entry should look like this:

Stp0:
        INDEX=Stp0
        PATH=node0,node1
        node0=D_SUBSYS,SCSI Tape,0,D_TAPE_SUBSYS,,NULL
        node1=D_UNIT,Drive 0,0,0,D_REMOVABLE D_NODE,NULL
        D_USER_MSG=SCSI Tape Drive,8,0,,NULL
        D_REWIND_NODE = 0
        D_CTL_NODE = 128
        D_NOREWIND_NODE = 8
* /etc/conf/pack.d/Stp/space.c

The "#define Stp0 0" in this file should read "#define Stp0 68608".

* /etc/conf/pack.d/Stp/space.h

Remove the necessary elements in the Stp_tape_cfg array to leave just one gen_Stp_route element.

* /etc/conf/cf.d/mscsi

Insert an appropriate entry here for your first tape device, for example:

*ha     attach  number  ID      lun     bus
arad    Stp     0       2       0       0

Note: Specify the driver name for your SCSI host adapter in the first field. In this example, the Adaptec AIC-7770 Host Adapter driver "arad" is being used.

* /etc/conf/sdevice.d/Stp

Ensure that only one Stp line exists in this file and that it looks like:

Stp    Y    1    0    0    0    0    0    0    0

Remove any additional lines of this type, if there are any.

Also, you should remove all of the device nodes associated with tape devices in the /dev directory, for example:

/dev/rStp*
/dev/nrStp*
/dev/xStp*
/dev/rct*
/dev/erct*
/dev/nrct*
/dev/xct*

The necessary tape device nodes will then be re-created once the kernel has been relinked, and the environment re-created. (As a backup precaution, you may wish to archive these device nodes to a file by using the cpio(C) utility before you remove them.)

This should now allow the kernel to be relinked and the kernel environment re-created with just one SCSI tape configured. Subsequent kernel device configuration can now be resumed.

From the Xinuos technical article database, record 104978. Reproduced with permission. The original is at www.sco.com/ta/104978, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

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.