Search Text         
Search Tips?
Search By   And   Or   Boolean   Exact Match   TA #
Search In   Whole Doc   Keywords Sort By  
Product   Sub Product  

View Technical Articles (sorted by Product) New/Updated in the last:    7 days      14 days      30 days             
TA # Date Created Date Updated Resolved Issue?   Printer Friendly Version of This TA   Print Article
  E-mail This TA   E-mail Article
105734 09/04/1997 08:34 AM 05/21/2001 04:12 PM
Yes No
How do I configure a MIRROR of Root using the Virtual Disk Manager?
Keywords
unix openserver openserver5 v5 enterprise 5.0.0 5.0.2 5.0.4 1.1.0 virtual disk manager vdm mirror raid 1 configure array raid1 root boot swap internet faststart ifs host desktop
Release
SCO OpenServer Enterprise System Release 5.0.0, 5.0.2, 5.0.4
SCO OpenServer Desktop System Release 5.0.0, 5.0.2, 5.0.4
SCO OpenServer Host System Release 5.0.0, 5.0.2, 5.0.4
SCO Virtual Disk Manager Release 1.1.0

Problem
          How do I mirror my root disk to another disk using SCO Virtual Disk
          Manager?

          A RAID 1 array is a "mirrored" pair of drives that contain
          identical data. It offers the fastest fault-tolerant architecture,
          especially when combined with other RAID-1 arrays via striping
          (RAID 10). With our software RAID (Virtual Disk Manager) the root
          filesystem is limited to RAID 1. Since the drives in the array
          will contain redundant data, the usable storage capacity is half
          the combined capacity of the drives. Software RAID allows the
          mirroring of disks on separate adapters. It is recommended that
          the adapters and disks are of the same make and model. The following
          example assumes two 525 megabyte SCSI disks attached to one SCSI
          host adapter. It also assumes that all the disk space is being used
          for Unix.

          
NOTE:
      As larger disks are coming on the market you may be tempted
          to use a portion of your root disk for a separate RAID array, one
          other than RAID-1. For example, you may have a 2 GB root disk and
          wish to configure 1 GB for your root filesystem and mirror that
          to your second disk. You may then decide to use the left over portion
          in a RAID-5 array. Raid-5 does not support the repositioning of
          RAID array pieces, which will become necessary should your root
          disk or mirrored disk fail. Therefore, it is recommended that any
          left over portion be used to create a RAID-1 array to be mirrored
          to your left over portion on your second disk. This will contain
          your non root filesystem, such as /u.



Solution
          Virtual Disk Manager Release 1.1.0 includes a Release Supplement
          disk.  Before proceeding, make sure it is installed. SCO OpenServer
          5.0.2 and 5.0.4 have the 1.1.0 Supplement included in the product.
          Release 5.0.0 requires that you install this separately. It can be
          downloaded from our BBS in the Supplements/vdm110 directory. Virtual
          Disk Manager must be installed via the Software Manager and will
          require a license for each of the three mentioned releases.

          Note: The 1.1.0 Release Supplement, among other things, allows
          you to mirror your system's boot division (/stand) onto a virtual
          disk. This will enable you to boot from the mirrored drive should
          your root disk fail. Again, SCO OpenServer releases 5.0.2 and 5.0.4
          already have this included in the product.

          Before proceeding it is important to know and understand the
          requirements for your system. If it is a 24X7 environment you will
          need to invest in hardware that supports this. See Technical Article 105386,
          "I am using Virtual Disk Manager but my system fails when one of
          my disk fails."

          If you are using Adaptec adapters make sure you have bios configured
          correctly. Pay particular attention to the DOS drives > 1 gigabyte
          option. Make sure it is disabled. If you have already installed the
          OS with this option enabled, you cannot simply disable it.
          A reinstall is required, as the disk geometry has already been
          laid out.

          
NOTE:
      This no longer is an issue with SCO OpenServer 5.0.4.

          It is also recommended that a low level format be performed to
          your second SCSI disk prior to configuring it in the SCO operating
          system.

          This article also assumes that you have already installed the
          operating system and the Virtual Disk Manager product. We will
          take up where we are now adding our second disk to the system.
          This will become our mirrored disk. The Virtual Disk Manager
          refers to it as the "parity" disk.

          Before proceeding, obtain the following information about the
          SCSI hard disk:

          * host adapter type and its prefix (spad, eiad, arad, alad,
            and so on)

          * host adapter number

          * bus id

          Note: 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 the
          device is attached to.

          * target id of the SCSI disk

          After obtaining the above information you are ready to proceed.
          You must be in System Maintenance mode to continue.  Type:

              # mkdev hd

          You will see:

                 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 1, 2 or 3.

                 Enter the prefix of the SCSI host adapter that supports
                 this device or press  <Return> for the default of ad.

          Note: This may not always read 'ad' as the default.

          Enter the prefix.  You will see:

                 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 you entered previously and 'z' is the
          host adapter number.

          You will see the setup parameters.  If they are correct, choose 'n'.
          If you need to change them, choose 'y' and enter the hardware
          details about the host adapter card; confirm that you want to
          save these values.

                 What SCSI bus is this device attached to? Press <Return>
                 to use the default:0

          Enter bus id.  You will see:

                 What is the target id for this device?

          Note: This is the target id of the hard drive, not the host
          adapter.

          Enter target id.  You will see:

                 What is the LUN?

          Enter 0.  You will see:

                 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.

          The assumed host adapter is 0, target id of scsi disk is 1,
          lun is always 0, and, in this case, the bus id was 0.  You
          will see:

                 Update SCSI configuration? (y/n)

          Choose 'y' if all is as it should be.  You will see:

                 The SCSI configuration file has been updated.

                 A new kernel must be built and rebooted before disk
                 configuration can continue.
                 Would you like to relink at this time (y/n)

          Choose 'y' to add the disk.

          
NOTE:
      SCO OpenServer 5.0.4 has added some SCSI scanning features.
                If you had your second disk added to the bus during
                installation you may not have the option to relink. You
                may be just brought into fdisk.

                You will be given the option to relink if the second disk has
                been low-level formatted.

          You will then see:

                Do you want the kernel to boot by default?

          Choose 'y'.  You will see:

                Do you want the kernel environment rebuilt?

          Choose 'y'.

          Reboot the system and enter System Maintenance mode.

          You must run 'mkdev hd' again and enter the same parameters as you
          did previously in order to finish configuring the hard drive.
          After adding the same parameters for the second drive you will see:

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

          Choose 'y'.  You will see:

                The hard disk installation program will now invoke /etc/fdisk.
                Entering 'q' at the following menu will exit /etc/fdisk,
                and the hard disk installation will continue.

                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

          Note: For this example, the entire disk for Unix will be used for
          the disk.

          Choose "2. Use Entire Disk for Unix".

          Note: If you previously had data on the disk, you will see this
          message:

                Warning! All data on your disk will be lost!
                Do you wish to continue (y/n)

          Choose 'y'.  You will see:

                Total disk size .....
                Press <return> to continue

                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

          
NOTE:
      If you performed a low level format of your scsi disk you
          can bypass this step and choose 'q' to quit.

          Choose "1. Scan entire Unix partition".  After scan completes you
          should see:

          0 bad blocks have been found.
          Enter the number of bad blocks to allocate space for
          or press <Return> to use the existing value of 511.
          WARNING: Changing the value will remove all the filesystems in this
	  partition.

          After accepting the default you will see :

                The virtual disk driver is installed.
                Do not create a division table on partitions
                which will be used for virtual disk pieces.

                Choose one of the following options below or quit.

                `y' to create a division table on the active partition

                `n' to avoid creating a division table

                Enter `y', `n', or enter `q' to quit

          Choose 'q' to quit.

          IMPORTANT 
NOTE:
      YOU MUST CHOOSE Q TO QUIT HERE AS PREVIOUS
                          NOTICE WARNS YOU! CREATING DIVISION TABLES
                          ON PARTITIONS BEING USED FOR MIRROR WILL
                          PREVENT THEM FROM BEING CONFIGURED IN THE ARRAY.

          When you have completed this for your second drive, enter
          multiuser mode and bring up the Virtual Disk Manager.  To do
          this, click on the System Administration ==>Filesystems ==>
          Virtual Disk Manager.

          You will see:

+----------------------------------------------------------------+
|       Disk   Piece   Database   Boot   View   Options          |
|                                                                |
+----------------------------------------------------------------+

          Click on 'Boot'.  A list will appear.  Click on 'Mirror'.
          This will bring up the following window:

+----------------------------------------------------------------+
|                        Warning                                 |
|                                                                |
|   Mirror the root, swap or boot divisions. This operation will |
|   relink the kernel. After this operation has completed, the   |
|   system must be rebooted immediately so that the new mirrors  |
|   are enabled                                                  |
|                                                                |
|             OK                             Cancel              |
+----------------------------------------------------------------+

          Choose OK.


+----------------------------------------------------------------+
|                                                                |
|                      Mirror Root/Swap/Boot                     |
|                                                                |
|   +---Select Divisions------------------------------------+    |
|   |                                                       |    |
|   |   Vdisk1 to mirror root:   Yes   No                   |    |
|   |                                                       |    |
|   |   Vdisk2 to mirror swap:   Yes   No                   |    |
|   |                                                       |    |
|   |   Vdisk3 to mirror boot:   Yes   No                   |    |
|   +-------------------------------------------------------+    |
|                                                                |
|   Continue                 Cancel                  Help        |
+----------------------------------------------------------------+

          Click on 'Continue'.

          
NOTE:
      If you DO NOT choose Continue and choose NO on Vdisk1, 2 or 3,
                you will not be able to boot from the mirrored drive. Thus,
                DO choose Continue if you expect to be able to boot from the
                mirrored drive.

          You will see:

+------------------------------------------------------------------+
|                       Mirror Root/Swap/Boot                      |
|   +---Piece Allocation---------------------------------------+   |
|   |                                                          |   |
|   |                                                          |   |
|   |                                                          |   |
|   |   Automatic Piece Allocation     Yes      No             |   |
|   +----------------------------------------------------------+   |
|                                                                  |
|                                                                  |
|   +--------------+          +--------------+      +--------+     |
|   | Continue     |          | Cancel       |      | Help   |     |
|   +--------------+          +--------------+      +--------+     |
+------------------------------------------------------------------+

          Click Continue.

+------------------------------------------------------------------+
|                 Mirror Root/Swap/Boot                            |
|                                                                  |
|   +---Vdisk parameters-------------------------------------+     |
|   |                                                        |     |
|   | Size of disk cluster         32                        |     |
|   |                                                        |     |
|   +--------------------------------------------------------+     |
|                                                                  |
|   CONTINUE                  CANCEL               HELP            |
+------------------------------------------------------------------+


          Note: "Size of disk cluster" - A cluster consists of a set of
          contiguous blocks of data written to a physical hard disk
          within a disk array.  In other words, it is the size of the
          data chunks written to the pieces in an array. The cluster
          size is the parameter that has the most impact on performance
          of array systems.  Improperly matched I/O and cluster sizes can
          adversely affect performance.  By default, you will see 32. This
          figure is an approximation based on test results, but may not be
          ideal for all applications.  Modifying cluster size will require
          reconfiguration. That will mean backing up the data, reconfiguring
          the array with the new cluster size and restoring from backups.

          Click on 'CONTINUE'.

+------------------------------------------------------------------+
|                  New   Root/Swap/Boot Mirrors                    |
|------------------------------------------------------------------|
|   Virtual Device: /dev/dsk/vdisk1                                |
|   +----------------------------------------------------------+   |
|   |Piece1: /dev/dsk/0s1   Offset:13016   Length:663084       |   |
|   |Piece2: Not Allocated                            parity   |   |
|   +----------------------------------------------------------+   |
|                                                                  |
|   Virtual Device: /dev/dsk/vdisk2                                |
|   +----------------------------------------------------------+   |
|   |Piece1: /dev/dsk/0s1   Offset:32016   Length:98000        |   |
|   |Piece2: Not Allocated                            parity   |   |
|   +----------------------------------------------------------+   |
|                                                                  |
|   Virtual Device: /dev/dsk/vdisk3                                |
|   +----------------------------------------------------------+   |
|   |Piece1: /dev/dsk/0s1   Offset:2016    Length:30000        |   |
|   |Piece2: Not allocated                            parity   |   |
|   +----------------------------------------------------------+   |
|                                                                  |
|   Allocate pieces...                                             |
|                                                                  |
|   Create                      Cancel                Help         |
+------------------------------------------------------------------+


          As you can see, Piece 1 for each of the Virtual Devices has been
          allocated. That is, the root, swap, and boot on the root disk has
          been allocated. We must now allocate Piece 2 for our mirrored
          drive. So select Allocate pieces. In fact, Create is shaded out
          at this point as we are not yet ready to Create the mirror.

          Should you see the error:

          Error. There is not enough free space available on the system to
          complete this configuration, it is all being used for
          division and/or vdisk pieces.

          As a check that everything is OK at this point then you can run divvy
          against the additional disk , with the command "divvy /dev/hd1a" and
	  this should indicate that no divvy table is present on this disk.
          If not then you can run "divvy -D x " where x is 0 through to 6 to
          remove any divisions.

          Additionally, you can run Disk -> Examine Disk Map under VDM and
          ensure that VDM sees the second disk.

          If this all looks fine then you could compare the output of:

                fdisk -f /dev/rdsk/0s0
                fdisk -f /dev/rdsk/1s0
                          (assuming you are mirroring to the second disk)

           The sizes of the two active Unix partitions should be the same (or
           the second should be no smaller than the first).

          The next window will allow you to select the device for the pieces
          for the mirror to reside. If you only have the second disk added
          to the system and no others you will see /dev/dsk/1s1. Follow the
          default settings and choose OK. You will get back to the screen
          as shown above but this time Allocate pieces will be shaded out.
          Now click Create.

+--------------------------------------------------------+
|                    Information                         |
+--------------------------------------------------------+
|Successfully mirrored root on vdisk1                    |
|                                                        |
|Successfully mirrored swap on vdisk2                    |
|                                                        |
|Successfully mirrored boot on vdisk3                    |
|                                                        |
|The system has been successfully relinked with the new  |
|configuration. It must be rebooted for the new          |
|configuration to take affect.                           |
+--------------------------------------------------------+


          To be sure you have configured your Virtual disks correctly, have
          a look at the resulting /etc/dktab file. This file depicts the
          configuration you just created. An example follows:

/dev/dsk/vdisk1     mirror     2     32

        /dev/dsk/0s1     130016     663084
        /dev/dsk/1s1     130016     663084

/dev/dsk/vdisk2     mirror     2     32

        /dev/dsk/0s1     32016     98000
        /dev/dsk/1s1     32016     98000

/dev/dsk/vdisk3     mirror     2     32

        /dev/dsk/0s1     2016     30000
        /dev/dsk/1s1              2016     30000

          Let's analyze the entries for vdisk1 so that we might understand
          the contents of this file. The first line shows the device name
          /dev/dsk/vdisk1. This is the device used to mirror root. It consists
          of 2 pieces with a cluster size of 32 (16K).

          The second and third lines show the offset (where the data begins)
          and the length of the piece. Notice the offsets and lengths match.
          As long as the lengths are the same the Virtual Disk Manager will
          allow you to configure the mirror with different offsets but YOU
          WILL NOT BE ABLE TO BOOT FROM THE MIRRORED DISK. So, make sure
          your OFFSETS ARE THE SAME for each respective mirrored set.

          You are now ready to relink the kernel and shut down. Upon reboot
          you will see activity on the disks as the data is being mirrored
          to the mirrored disk. The following command will show the process:

          ps -ef | grep dkconfig

          Upon completion all data written to your root disk will
          simultaneously be written to your mirrored disk.

          
NOTE:
      It is highly recommended that the /etc/dktab file be backed
          up to floppy or a log book. Should this file become corrupted, a
          backup might then be accessible, or the file can be recreated.  Be
          sure to keep current backups of this file should any changes be
          made.

SEE ALSO:
          SCO OpenServer 5.0 System Administration Guide, Chapter 8, Virtual
          Disk Manager 1.1.0 Release Notes and other related articles in this
          database.

Back to Search ResultsBack to Search Results