Technical article 105029

SCOadmin does not start; there are problems with Backup/Filesystem Managers.

OpenServer 5

Written · Last revised

Problem

PROBLEM 1
SCOadmin fails to start.  It does not give an error message or
write information to any of the "standard" logs about why it
failed to initialize.  This happens in both GUI and CHARM modes.
PROBLEM 2
Root cannot access the Filesystem Manager under SCOadmin.  When
the root account attempts to access the FileSystem Manager, this
error message is seen:

Failed to retrieve local host device list Cannot continue filesystem manager startup

PROBLEM 3
A user is administering system backups under a non-root account.
When they use the backup manager and attempt to specify local
devices for the backup, they expect to see a pick-and-choose
dialog box with the available devices.  Instead, they see these
error messages:

Failed to retrieve local host device list Cannot continue backup manager startup

This user account has been granted "backup" primary authorizations.

Why is the SCOadmin not returning information about my local
storage devices?  Why is SCOadmin failing to initialize?

Cause

The Device Query Interface (DQI) is a new kernel interface that allows SCO programs to ask the kernel for information about devices, such as presence, type of device, capacity, and so on. Currently, support for DQI is limited to storage devices.

Managers within SCOadmin that require knowledge of storage devices,
such as the filesystem manager and the backup manager, call the
DQI to get this knowledge.  These managers are referred to as
OSAs or Object Service Agents.
In the cited examples (above in the PROBLEM statement), the
Filesystem manager is looking for devices which can contain
filesystems, and the Backup manager is looking for devices
which can make a backup.  (That is, read-write-removable devices.)
For a particular device to show up on DQI, it has to have a probe
routine as part of its device driver, and it has to have an
information file (named device.dat) in the driver's pack.d
directory which contains additional device information.  At
kernel link time, all the device.dat files are combined and
massaged into the /etc/conf/cf.d/sysRegistry file.  Both
device.dat and sysRegistry are stanza files which are human-
readable.

If a SCOadmin Manager returns incorrect, or in this case no, information, it is probably because the device.dat file has been modified (possibly through mkdev hd) or corrupted such that the information in the device.dat file cannot be correctly interpreted by the Filesystem Manager.

There is a cache file bound to the device OSA.  If the cache
file has been updated previously, by the Superuser: root, and
a non-root user attempts to update the device OSA cache file,
the update will complete successfully, but then the OSA tries
to chmod the cache file.  This will fail because root owns
the cache file.
Another known cause of the problem involves hardware.  The
Tricord SCSI device driver currently does not support the
probe routine.  Therefore, any devices normally accessed
on this bus will not respond to the probe routine and will
not appear on the pick-and-choose list within the Filesystem
Manager.

Solution

If for some reason there is a problem with the format such that
the device doesn't show up under device OSA, relink the kernel
and reboot.  This will recreate the sysRegistry file.

If this is not a solution, one of the first things to try is to get device OSA to flush its cache. If you haven't rebooted or changed the /dev directory since the last time device OSA was called, it will save the list of devices found into a file. To flush the cache, run "touch /dev".

If you have a non-root user who has updated the cache file,
after the root user has previously updated the cache file, then
re-running the program will be successful until the cache file
needs updating again.  To make this solution a permanent one, edit
the file:
/opt/K/SCO/Unix/*/sa/devosa/devosa.tcl

and comment out the line which reads:

chmod 666 $objectCacheFile

Now, when a non-root user updates the cache file, they will no longer need to invoke the application twice to successfully complete their task.

Another possible solution is to look at the device.dat files and
the sysRegistry.  The Sdsk/device.dat file should look like this:
FILE_FORMAT:
     version=1
Sdsk0:
     INDEX=Sdsk0
     PATH=node0,node1
     node0=D_SUBSYS,SCSI Disk,0,D_HARDDSK_SUBSYS,,NULL
     node1=D_UNIT,SCSI Drive 0,0,0,D_RANDOM_ACCESS D_NODE,NULL
     D_USER_MSG=SCSI Disk Drive,0,0,,NULL
     D_BLOCK_NODE = 0
     D_CHAR_NODE = 0
Sdsk1:
     INDEX=Sdsk1
     PATH=node0,node1
     node0=D_SUBSYS,SCSI Disk,0,D_HARDDSK_SUBSYS,,NULL
     node1=D_UNIT,SCSI Drive 1,0,1,D_RANDOM_ACCESS D_NODE,NULL
     D_USER_MSG=SCSI Disk Drive,0,0,,NULL
     D_BLOCK_NODE = 64
     D_CHAR_NODE = 64
Sdsk2:
     INDEX=Sdsk2
     PATH=node0,node1
     node0=D_SUBSYS,SCSI Disk,0,D_HARDDSK_SUBSYS,,NULL
     node1=D_UNIT,SCSI Drive 2,0,2,D_RANDOM_ACCESS D_NODE,NULL
     D_USER_MSG=SCSI Disk Drive,0,0,,NULL
     D_BLOCK_NODE = 128
     D_CHAR_NODE = 128

It gets updated whenever you add a hard disk using "mkdev hd". For every device, there should be a section in the corresponding device.dat file, and also in the /etc/conf/cf.d/sysRegistry file, which is slightly different:

Sdsk0:
     INDEX=66560
     PATH=node0,node1
     node0=15,SCSI Disk,0,4,0,NULL
     node1=16,SCSI Drive 0,0,0,34,NULL
     D_USER_MSG=17,SCSI Disk Drive,0,0,0,NULL
     D_BLOCK_NODE=3,dsk/0s0,0,0,0,NULL
     D_CHAR_NODE=5,rdsk/0s0,0,0,0,NULL
Sdsk1:
     INDEX=66561
     PATH=node0,node1
     node0=15,SCSI Disk,0,4,0,NULL
     node1=16,SCSI Drive 1,0,1,34,NULL
     D_USER_MSG=17,SCSI Disk Drive,0,0,0,NULL
     D_BLOCK_NODE=3,dsk/1s0,0,0,0,NULL
     D_CHAR_NODE=5,rdsk/1s0,0,0,0,NULL
Sdsk2:
     INDEX=66562
     PATH=node0,node1
     node0=15,SCSI Disk,0,4,0,NULL
     node1=16,SCSI Drive 2,0,2,34,NULL
     D_USER_MSG=17,SCSI Disk Drive,0,0,0,NULL
     D_BLOCK_NODE=3,dsk/2s0,0,0,0,NULL
     D_CHAR_NODE=5,rdsk/2s0,0,0,0,NULL

The link process (in particular /etc/conf/bin/idmkreg) creates the sysRegistry file from the device.dat files and changes some of the fields, such as INDEX, D_BLOCK_NODE, and D_CHAR_NODE.

If there is a problem with the format where the device doesn't
show up under device OSA, relink the kernel and reboot.  This will
recreate the sysRegistry file.

Relinking will "uncorrupt" the sysRegistry file and allow you to view pick-and-choose boxes populated with local objects.

One good way to start debugging problems with DQI is to call the device OSA directly.

The SCOadmin framework allows access to objects which have been
registered with it.  These objects are known as "managed objects"
within SCOadmin because they are the entities that SCOadmin
managers act upon in order to get work done.
For example, the SCOadmin printer manager can enable a printer
object.  The same functions, known as the object API, are used to
manipulate the object, although the operations that can be performed
on an object are determined by what class it belongs to.

The class of the object also determines what attributes it has. The available object operations are:

ObjectCreate  (object)
ObjectDelete  (object)
ObjectGet     (object/attribute)
ObjectReplace (object/attribute)
ObjectReplaceWithDefault  (object/attribute)
ObjectAdd     (attribute)
ObjectRemove  (attribute)
ObjectAction  (object)

As noted above, some of these act on the object itself, some act on the attributes, and some can do both.

Objects can also contain other objects.  For example, a hard disk
can contain partitions, and a partition can contain divisions.
Often, there is a "super object" defined which contains all objects
of a certain class that live on a system.  This can be convenient if
you don't know the names of the objects that are available.
In order to look at all the storage devices that the device OSA
knows about, run osavtcl as root.  Osavtcl is the version of tcl
that contains the SCOadmin extensions, including the object API.
At the "osavtcl>" prompt, type:
ObjectGet -scope 1 {sco StorageDevices} x
"-scope 1" means to get all objects contained by the specified
object.  "{sco StorageDevices}" is the class for the "super
object" containing all storage device objects.  "x" is a dummy
name for the super object.  (There is only one on the system so it
doesn't matter what you call it.)
You should get something like this:  (reformatted to fit document)
{get {sco StorageDevice} SCSIDisk0 {{Name SCSIDisk0}
{Type SCSIDisk} {CanSupport Partition true}
{CanSupportFS true} {IsStreaming false} {IsRemovable false}}
{} {} {}} {get {sco StorageDevice} FloppyDisk0 {{Name
FloppyDisk0} {Type FloppyDisk} {CanSupportPartition false}
{CanSupportFS true} {IsStreaming false} {IsRemovable true}}
{} {} {}} {get {sco StorageDevice} SCSIDisk1 {{Name
SCSIDisk1} {Type SCSIDisk} {CanSupportPartition true}
{CanSupportFS true} {IsStreaming false} {IsRemovable false}}
{} {} {}} {get {sco StorageDevice} SCSIDisk2 {{Name
SCSIDisk2} {Type SCSIDisk} {CanSupportPartition true}
{CanSupportFS true} {IsStreaming false} {IsRemovable
false}} {} {} {}}

You can print the objects out, one per line, by running:

foreach x [ObjectGet -scope 1 {sco StorageDevices} x] {echo $x}

which should return something similar to:

get {sco StorageDevice} SCSIDisk0 {{Name SCSIDisk0} {Type SCSIDisk} {CanSupportPartition true} {CanSupportFS true} {IsStreaming false} {IsRemovable false}} {} {} {}

get {sco StorageDevice} FloppyDisk0 {{Name FloppyDisk0}
{Type FloppyDisk} {CanSupportPartition false}
{CanSupportFS true} {IsStreaming false} {IsRemovable true}
} {} {} {}

get {sco StorageDevice} SCSIDisk1 {{Name SCSIDisk1} {Type SCSIDisk} {CanSupportPartition true} {CanSupportFS true} {IsStreaming false} {IsRemovable false}} {} {} {}

get {sco StorageDevice} SCSIDisk2 {{Name SCSIDisk2} {Type SCSIDisk} {CanSupportPartition true} {CanSupportFS true} {IsStreaming false} {IsRemovable false}} {} {} {}

The fields in these responses are as follows: 1. the operation just attempted 2. the class of the object 3. the name of the object 4. all of the attributes of the object 5. not used 6. not used

In this example, there are three hard disks and one floppy disk
on the system.  Other devices that can show up are tape drives
and CD-ROM devices.

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