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 StpI 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.datRemove 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.cThe "#define Stp0 0" in this file should read "#define Stp0 68608".
* /etc/conf/pack.d/Stp/space.hRemove the necessary elements in the Stp_tape_cfg array to leave just one gen_Stp_route element.
* /etc/conf/cf.d/mscsiInsert an appropriate entry here for your first tape device, for example:
*ha attach number ID lun bus
arad Stp 0 2 0 0Note: 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/StpEnsure that only one Stp line exists in this file and that it looks like:
Stp Y 1 0 0 0 0 0 0 0Remove 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.