Problem
I am attempting to mirror the boot, root and swap divisions of
my SCO OpenServer Release 5.0.2 partition using the Virtual Disk
Manager (VDM). However, it reports the errors:cannot create vdisk1 cannot add vdisk 'vdisk1' dkconfig:/dev/dsk/vdisk1: /dev/dsk/0sa is the active partition and cannot be used
The root disk drive has multiple partitions. Using a variety of partition configurations on the second drive does not affect this problem.
Cause
VDM will fail in this way if the active partition is not the first partition as shown by the command "fdisk -p".
In the file /opt/K/SCO/Unix/5.0.2Dp/sa/vdisk/vdiskAPI.tlib, the function GetActivePartition() should return the active partition number, for example:
proc GetActivePartition {disk} {
...
...
foreach partition $fdisk1 {
set active...
if {$active == "Active...
return...
} else {
ErrorPush...
}
}
}However, this function will fail if the active partition is not the first partition.
This failure is due to invalid error reporting. The format of the ErrorPush is incorrect, causing the foreach loop to break if the active partition is not the first partition.
Solution
To work around this, install the SCO partition to ensure that it will be the first partition listed by fdisk(ADM).
Another workaround would be to remove the ErrorPush call from the vdiskAPI.tlib file, for example:
proc GetActivePartition {disk} {
...
...
foreach partition $fdisk1 {
set active...
if {$active == "Active...
return...
}
}
}NOTE: The vdiskAPI.tlib file is found in the path:/opt/K/SCO/VDISK/1.1.1Eb/sa/vdisk/vdiskAPI.tlibin SCO OpenServer 5.0.5. To enable mirroring, it should be
edited in the same manner as described above, for the earlier
releases. The "else" loop containing ErrorPush must be removed.