Technical article 110737

Filesystems on my SCSI disk drive are no longer accessible after moving it to another OpenServer 5 system, or after making various SCSI configuration changes.

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5OpenServer 5.0.6OpenServer 5.0.7

Written · Last revised

Problem

When I move a SCSI hard disk, already configured with divvy divisions
and filesystems, to another OpenServer system, I cannot recognize
and mount the filesystems on the disk.  If I attempt to configure
this disk as a secondary disk on the new system, I can access the
divvy table of the disk with the divvy(ADM) utility. However, the
filesystems show up as NONFS.
Generally, the inability to access the filesystems on the disk
may be the result of any combination of the changes listed below,
regardless of whether the disk is moved to another system, or
maintained on the original system.  The change that most commonly
causes the problem is:

(a) changing the manufacturer or model of the existing host adapter

On a rare basis, other changes that result in the same symptoms are:

(b) changing the host adapter BIOS settings

(c) changing the revision of the existing host adapter

(d) host adapter driver update
(e) system BIOS update

The 'mkdev hd' utility has been run for the drive on the new system, and device nodes with the correct major/minor numbers exist for accessing the filesystem divisions.

Cause

It is likely that the operating system's notion of the geometry of the disk has changed.

When the partition layout of the disk, including divvy divisions and filesystems, was first created, it was done in terms of a certain disk geometry. This geometry was either calculated by the BIOS or by the host adapter driver itself, and subsequently used by the operating system to access the start of the data in the divisions. This geometry, sometimes referred to in terms of "CHS" (Cylinders, Heads, Sectors/track), provides a set of parameters through which the OS can access specific locations on the disk through the host adapter.

The operating system's notion of the disk geometry can be changed by
any combination of the factors a - e listed above.  These changes
typically occur inadvertently when making SCSI-related configuration
changes.  The most common reason for this to happen, as pointed
out above, is a change of host adapter manufacturer or model.
Simply put, different host adapters calculate geometry differently.

Note that it is common in this situation to be able to access the divvy table of the disk partition, but not the actual filesystems. This is essentially because the divvy table itself is at a fixed, small offset (from the beginning of the partition) which is independent of geometry. However, in an OpenServer partition, the beginning of the actual data in the divisions lies at the beginning of the next cylinder, which is geometry-dependent.

Note: This geometry may not have any relation to the physical
attributes of the hard disk in terms of cylinders, heads, and
sectors.  In the present context, it is simply a means by which
the OS can find the beginning of the divvy divisions.  By default,
for SCSI disks, the geometry is not obtained from a static data
location independent of the system configuration; rather, it is
calculated by an algorithm that may vary according to factors
a - e above.

Solution

There is a disk geometry override feature available in OpenServer 5 that can be used to work around this problem. This feature is implemented through the dparam(ADM) command, and essentially stamps the disk with the desired geometry, which will subsequently be used in any new SCSI configuration to which it is attached, overriding whatever steps that would have been taken by default to pass CHS parameters to the OpenServer operating system.

Two slightly different workarounds are presented below; follow the one which is the most convenient for you:

-------------------------------------------------------------------

If the disk is presently configured on the original system in which the disk was completely accessible, or it is convenient to move the disk back to that system

-------------------------------------------------------------------

1. As root, run the divvy(ADM) utility on the affected disk drive.

divvy /dev/rdsk/Ns0

where "N" is the number of the SCSI drive as configured on this system. For instance, for the first secondary SCSI disk, "N" would take the value "1", and the command would be "divvy /dev/rdsk/1s0".

Verify that the correct types are shown for the filesystems.

2. Choose any valid division, and note the correct raw device file
for it.  For instance, for the 7th (or "whole disk") division, the
appropriate device file is of the form "/dev/rdsk/Nsa" where "N"
is the number of the SCSI drive as above.  In the above example,
this device file is /dev/rdsk/1sa.
Then run the commands:
dparam -w /dev/rdsk/Nsa
dparam /dev/rdsk/Nsa `dparam /dev/rdsk/Nsa`

For the above example, these commands would be:

dparam -w /dev/rdsk/1sa
dparam /dev/rdsk/1sa `dparam /dev/rdsk/1sa`

3. Make the desired configuration changes, including moving the disk to the new system. The divvy division data should now be accessible within the divvy table with valid filesystem type information, and the filesystem(s) should be mountable.

-------------------------------------------------------

If the disk cannot be moved back to the original system

-------------------------------------------------------
1. On the original system, find out the CHS parameters for the
disk from the hardware initialization messages printed in the
/usr/adm/messages file when the system boots up.  /usr/adm/messages
may contain messages dating back to when the system was first
installed, and in this case, it is likely that many such sets
of initialization messages are contained in this file (one set
for every time the system is booted).  Find a set of messages
containing the specific information for the disk drive in question,
and record it.  The relevant information will look similar to this:
%disk - - - type=S ha=0 id=1 lun=0 bus=0 ht=alad
%Sdsk - - - cyls=262 hds=255 secs=63 fts=stdb

In this example, the disk had been attached to an Adaptec host adapter controlled by the OpenServer alad host adapter driver. The CHS parameters are 262 cylinders, 255 heads, 63 sectors/track. It had been configured as SCSI ID 1.

2. On the new system, as root, issue the following commands:

dparam -w /dev/rdsk/Ns0

dparam /dev/rdsk/Ns0 cylinders heads 0 0 0 0 0 sectors ^^^^^^^^^five 0's

where, again, "N" is the number of the configured drive and "cylinders", "heads", and "sectors" are the CHS parameters obtained from /usr/adm/messages on the root disk of the original system.

In this example, the CHS values are 262, 255, and 63, respectively. If, in addition, the disk (configured at SCSI ID 1 on the original system) is the first secondary hard disk configured on this system, the corresponding commands are:

dparam -w /dev/rdsk/1s0

dparam /dev/rdsk/1s0 262 255 0 0 0 0 0 63

Note: There is no general association of the value of 1 for the disk's SCSI target ID and the "first secondary hard disk configured". It is, however, somewhat common practice to configure the first secondary disk at SCSI ID 1.

3. Reboot the system.  The drive should now be completely accessible,
assuming it had been properly configured previously with the "mkdev
hd" utility.

See also

ta104384, "How is the badtrk scheme implemented?" for an illustrative discussion of the OpenServer partition layout.

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