Knowledge Base

How to add a SCSI or IDE disk on SCO Unix OpenServer that has data to preserve

Use this procedure to add a hard drive disk to SCO Unix OpenServer and preserve data on the drive.

  1. Make a backup of the data if possible.
  2. Obtain the following information about the SCSI hard disk and controller:
    a. host adapter type and its prefix (such as lsil, eiad, arad, alad)
    b. host adapter number (number of Disk controller cards installed)
    c. target id of the SCSI disk

Note:
For IDE disk, if you are attaching the second Data IDE disk to the Primary IDE controller, then you need to jumper the main IDE disk as “Master” and the Data IDE disk as “Slave”.

If attaching the second Data IDE disk to the Secondary IDE controller and if there is a ATAPI IDE CD-ROM, then you need to jumper the ATAPI CD-ROM as Slave and the Data IDE disk as “Master” or vice versa.

Check to see if OpenServer detected the IDE drive and you will see device nodes for it in /dev/rhd1*

IDE will check the ‘wd’ driver to ensure it’s been detected, ie:
Error: Attempting to configure drive 1 (wd unit 0), but only 0 drives are installed.

Note: On Open Desktop 3.0, Open Server 3.0, and SCO UNIX System V/386 Version 4.2, when using dual channel host adapters, Channel A will be host adapter number 0 and Channel B will be 1.

Note: On SCO OpenServer Release 5.0.X, you will be asked for the bus id. For a dual channel host adapter Channel A will be bus id =0 and Channel B will be bus id=1. The host adapter number will be the same for either channel. For example, when trying to add a SCSI disk that is attached to a host adapter, and the host adapter is the first of its type in the system, the host adapter number is 0, regardless of the channel to which the device is attached.

  1. Boot The Server into Single User Mode (Maintenance Mode) by enter thr root password at the CTRL+D prompts

Adding a SCSI Hard Drive

Enter

# mkdev hd

  1. Add a hard disk to IDE controller
  2. Add a hard disk to SCSI controller
  3. Add a hard disk to IDA controller Choose 2

Enter the prefix of SCSI host adapter that supports this device or press for the default

Enter the prefix.

Which xxxx SCSI host adapter supports this device?

(where xxxx is the prefix you entered previously.)
        Enter the host adapter number.

The following parameters will be used to configure xxxx SCSI host adapter z. Change these parameters y/n

(where xxxx is the prefix and z is the host adapter #.)

You are now being shown the setup parameters. If they are correct choose n. If you need to change them choose y,
Enter the hardware details about the host adapter card and confirm that you want to save these values.

What SCSI bus is this device attached to?

Enter bus id.

What is the target id for this device?
Enter target id.

What is the LUN?
Enter 0.

You are about to add the following SCSI device:
Host Adapter Type Device Adapter Id Lun Bus


     xxxx   Sdsk     0         1     0      0

(where xxxx is the prefix added previously)

(It is assumed the host adapter is 0, target id of scsi disk is 1, lun is always 0 and in this case the bus id was 0.)

Relink kernel?
If the configuration is correct, choose y for yes.

Do you want the kernel to boot by default?
Choose yes.
Do you want the kernel environment rebuilt?
Choose yes.

Note: This adds the entry into /etc/conf/cf.d/mscsi. If you wanted to repeat the exercise or remove the disk then this file can be manually edited and the line removed. The kernel would then to be relinked and the server rebooted.

You must now reboot the system and enter System Maintenance mode again. You must run ‘mkdev hd’ again and enter the same parameters as you did previously. You will then see this message:

During installation you may choose to overwrite all or part of the present contents of your hard disk. Continue y/n

Choose y.

  1. Display Partition Table
  2. Use Entire Disk for Unix
  3. Use Rest of Disk for Unix
  4. Create Unix Partition
  5. Activate Partition
  6. Delete Partition
  7. Create Partition Enter choice or q to quit

IMPORTANT NOTICE: Do not choose anything other than option 1 or Q or you will overwrite the data on the disk.


Choose q to quit.

  1. Scan entire Unix partition
  2. Scan a specified range of blocks
  3. Scan a specified filesystem
  4. List current bad block table
  5. Add entries to bad block table
  6. Delete entries from bad block table
  7. Clear bad block table
  8. Re-allocate bad blocks
    Enter choice or q to quit

Choose q to quit
IMPORTANT NOTICE: Choosing any other option but Q may overwrite disk.

Enter the number of bad blocks to allocate space for or press Return to use the default existing value of (nnn)

Name Filesystems in the Partition

Enter

# fdisk -f /dev/rhd00

to Show the partition table for the disks

IMPORTANT NOTICE: Do not choose anything other than Name or you will loose data. You now have the divvy table of the active partition. You must choose “q” to quit and “e” to exit. You must now run the divvy command for each individual partition on the disk. Use the following guidelines to determine which partition.

Choose the “n” option to name the filesystems.

Note: divvy -i /dev/hdxx – Will Install new device nodes on the target partition. This process can be aborted.

Let’s assume this is the first disk on the system:

divvy /dev/hd0a – This is the ACTIVE partition in Fdisk.

divvy /dev/hd01 – This command will bring up the divvy table for the first partition on the disk. You can then choose “n” for each filesystem to name all the filesystems on this partition. When you have finished type “q” to quit and “i” to install.

IMPORTANT NOTICE: Do not choose anything other than Name or you will loose data

divvy /dev/hd02 – This command will bring up the divvy table for the second partition on the disk. You can now name the filesystems on this partition.

divvy /dev/hd03 – for the third partition….

For a second disk the procedure is the same except for the device node.

divvy /dev/hd1a – for the ACTIVE partition on the second disk.

divvy /dev/hd11 – for the first partition on the second disk.

divvy /dev/hd12 – for the second partition on the second disk and so on.

You have now added the disk to your system with the data intact.

Automounting Filesystems

Follow this procedure if you want your filesystems to be automatically mounted when entering multiuser mode.

If you don’t want to always auto-mount and just need to access the data on the disk then proceed to Manually Mounting Fiflesystems below.

Run #mkdev fs

  1. Add a new filesystem to system
  2. Remove a filesystem Choose 1.

Enter a device name and press or q to quit

Enter the name of the filesystem you named in divvy.

For example, "u1".

Device name modified to /dev/u1

Do you wish to continue? y/n

Choose y.

Enter a directory name and press or q to quit:

Enter u1.

Directory was modified to /u1

Do you wish to continue y/n

Choose y.

When entering multiuser mode:

  1. Always mount /dev/u1
  2. Never mount /dev/u1
  3. Prompt before mounting /dev/u1 Enter your choice.

Do you want users to mount this filesystem? y/n

Enter your choice.

If you chose “y” to always mount and “y” to allow users to mount the filesystem, it will be automatically mounted upon entering multiuser mode. At this point you must either manually mount the filesystem for this session or reboot and enter multiuser mode.

Manually Mounting the Filesystems
To mount the filesystem, either:

a) If you’ve configured the filesystems as Auto-mounting above then simply reboot.

b) If you just want to access the filesystems then use:

# mount /dev/ /mountpoint

eg. mount /dev/u /u
This assumes you’ve created a mount point (empty directory called
/u with ‘mkdir /u’.
If the mount is only temporary then mount to /mnt, a pre-existing mount point.

If you are unable to mount the filesystem then the filesystem may a filesystem check ‘fsck’:
# fsck -ofull -y /dev/u

1347 reads
How did you like this article?0000