Solstice DiskSuite 4.2.1 User's Guide

Chapter 1 Getting Started

This chapter introduces the DiskSuite software, and describes the steps to take to get a new configuration up and running. The high-level tasks for getting started are:

If you are merely upgrading an existing DiskSuite installation, you don`t need to read this chapter. Instead, refer to the Solstice DiskSuite 4.2.1 Product Installation and Release Notes to upgrade to Solstice DiskSuite 4.2.1.

Introduction

Solstice DiskSuite 4.2.1 is a software product that enables you to manage large numbers of disks and the data on those disks.

Although there are many ways to use DiskSuite, most tasks center around increasing:

DiskSuite uses virtual disks to manage physical disks and their associated data. In DiskSuite, a virtual disk is called a metadevice. A metadevice is functionally identical to a physical disk in the view of an application. DiskSuite converts I/O requests directed at a metadevice into I/O requests to the underlying member disks.

DiskSuite's metadevices are built from slices (disk partitions). An easy way to build metadevices is to use the graphical user interface, DiskSuite Tool, that comes with DiskSuite. DiskSuite Tool presents you with a view of all the slices available to you. By dragging slices onto metadevice objects, you can quickly assign slices to metadevices.

If, for example, you want to create more storage capacity, you could use DiskSuite to "fool" the system into thinking that a collection of many small slices is one physical disk. After you have created a metadevice from these slices, you can immediately begin using it just as any "real" disk.

DiskSuite can also increase the availability of data by using mirrors and RAID5 metadevices. Mirrors and RAID5 metadevices replicate data so that it is not destroyed if the disk on which it is stored fails.

For a more detailed discussion of metadevices, and for more information on all of DiskSuite's tools, refer to Solstice DiskSuite 4.2.1 Reference Guide.

Planning Your Configuration

Reading Solstice DiskSuite 4.2.1 Reference Guide is an essential starting point for understanding how DiskSuite works, and how you can best use its features.

The Glossary located at the end of Solstice DiskSuite 4.2.1 Reference Guide explains DiskSuite terminology, which may be unfamiliar to you.

How to Determine DiskSuite Use in Your Environment

Use the following high-level decision tree to determine the best fit for DiskSuite in your environment.

Step 1. 

Step 2. 

Step 3. 

Choose the factor most important to you. 

Choose the next most important factor. 

For your needs, the best DiskSuite feature is ... 

Graphic

Example: If your most important factor is lower hardware costs, followed by availability, your needs would be best served by using RAID5 metadevices.


Note -

For a complete discussion of how to plan for DiskSuite, refer to Solstice DiskSuite 4.2.1 Reference Guide.


Creating Initial State Database Replicas

This section describes how to create initial state database replicas based on your system configuration.

Preliminary Information for Creating State Database Replicas

How to Decide Which Method to Use for Creating Initial State Database Replicas

Use one of the following three methods to create your initial state database replicas. The methods depend on how the slices on your system are configured. If your system has no available slices, or if you cannot repartition existing slices, you will not be able to use DiskSuite software.

  1. Starting from scratch: If you have a new system, the easiest way to create state database replicas is to put them on slices that will become part of a simple metadevice (stripe/concatenation), RAID5 metadevice, or trans metadevice. A state database replica cannot be part of root (/), swap, /usr, an existing file system, or a slice containing data.

    If you have a new system, refer to "How to Create Initial State Database Replicas From Scratch (DiskSuite Tool)".


    Note -

    When you combine state database replicas and metadevices on the same slice, DiskSuite detects the state database replica and adjusts the starting address and size of the metadevice accordingly. The advantage to this method is that you don't have to do anything extra, such as repartitioning a slice, and you don't have to worry about wasting space on a slice by having to dedicate it to just the state database replica.


  2. Starting with existing unused slices: If your existing configuration has unused dedicated slices, put the state database replicas on those slices.

    You may find, however, that the state database replicas are relatively small (517 Kbytes, or 1034 sectors), so you don`t want to dedicate a large slice just to hold the small state database replica. You may have to make some slices smaller than they currently are.

    If you have existing, unused slices, refer to "How to Create Initial State Database Replicas on Existing Unused Slices (DiskSuite Tool)".

  3. Starting with no unused slices: If your existing configuration has no available slices, you need to "steal" space from another slice, such as swap, for the state database replicas. If this is the case, refer to "How to Create State Database Replicas by Allocating Space From the swap Partition".


    Caution - Caution -

    Never try to put a state database replica on a slice that is in use by a file system or database; this will destroy any existing data on that slice.


Prerequisites for Creating State Database Replicas

The prerequisites for the tasks in this section are:

How to Create Initial State Database Replicas From Scratch (DiskSuite Tool)

This procedure directs you to use three windows in DiskSuite Tool to identify and view your configuration, and then put state database replicas on slices.

  1. Make sure you have met the prerequisites ("Prerequisites for Creating State Database Replicas"), and have read the preliminary information ("Preliminary Information for Creating State Database Replicas").

  2. Decide how many state database replicas you need, based on Table 1-1.

  3. As root, start DiskSuite Tool to identify and view your configuration.


    # metatool &
    
  4. The first time you run DiskSuite, you see the following message. Click OK to continue.

    Graphic
  5. From the Objects list, drag the MetaDB object onto the canvas.

    Use the ADJUST mouse button (by default, the middle button) to drag the object.


    Note -

    The MetaDB object represents or "contains" all the state database replicas in your configuration. Because you are starting from scratch, the MetaDB object has a "Critical" label on it to show you that you need to add state database replicas to it.


  6. Click Disk View to display the Disk View window.

  7. Select View All Controllers from the View menu in the Disk View window.

    This shows your storage configuration: controllers, disks, and slices. You may want to use the View menu on the Disk View window to set the view to 50, 100, or 200 percent viewing. The default is 100 percent.

  8. Click Slices to display the Slice Browser window.

    This window shows the status and current use of slices. (The Disk View window's status line also displays this information when you position the cursor over the slice.)

  9. Build a MetaDB object (create the state database replicas) by dragging available slices from the disks shown in the Disk View window, or from the Slice Browser window, over the MetaDB object in the canvas.

    As long as the MetaDB object was selected when you opened the Disk View window, when a slice is put into the MetaDB object, the Disk View window colors the slice (blue on color screens, black on monochrome screens) that contains the state database replica. This helps you see where state replicas are located, for example, across controllers.

    Try to balance state database replicas across controllers to achieve redundancy. For configurations with many disks, put a state database replica on each disk. (You can also click the Set Filters button in the Disk View window to filter for slices that are not in use.)

  10. [Optional] To add multiple state database replicas to the same slice, display the MetaDB object's Info window, type the slice in the Slice field, type the number of replicas to add in the Replicas field, click Attach, then click Close.

    This method does not enable you to "change" the number of state database replicas on a slice, only to initially specify them.

  11. Select the MetaDB object, then click Commit.

  12. To verify that the MetaDB object was committed, display the Configuration Log.

    Select Configuration Log from the Browse menu.

Example -- Committed MetaDB Object Consisting of Six State Database Replicas

This example shows a committed MetaDB object consisting of six slices, each containing one state database replica. The status of the MetaDB object is "OK," indicating that the state database replicas are spread across at least three controllers.

Graphic

How to Create Initial State Database Replicas From Scratch (Command Line)

This task is the equivalent of the previous one. It demonstrates the use of the command line utilities to create state database replicas.

After checking the prerequisites ("Prerequisites for Creating State Database Replicas"), and the preliminary information ("Preliminary Information for Creating State Database Replicas"), use the metadb(1M) command to create state database replicas. Refer to the metadb(1M) man page for more information.


Note -

When you run the metadb(1M) command for the first time, the system displays a warning message that no state database replicas exist for this host. Ignore this message. It appears only when you create the state database replicas for the first time.


Example -- Creating Initial State Database Replicas on a System With Five Disks


# metadb -a -f c0t1d0s3 c1t1d0s3 c2t1d0s3 c3t1d0s3 c4t1d0s3
# metadb
 
        flags         first blk      block count
     a        u         16              1034            /dev/dsk/c0t1d0s3
     a        u         16              1034            /dev/dsk/c1t1d0s3
     a        u         16              1034            /dev/dsk/c2t1d0s3
     a        u         16              1034            /dev/dsk/c3t1d0s3
     a        u         16              1034            /dev/dsk/c4t1d0s3

The -a and -f options are used together to create the initial state database replicas. Five initial state database replicas, one on each of five slices, are created. By spreading the state database replicas across controllers, you can increase metadevice performance and reliability. The metadb command checks that the replicas are active, as indicated by the -a flag.

Example -- Creating Initial State Database Replicas on a System With Three Disks


# metadb -a -f -c 2 c0t1d0s3 c1t1d0s3 c2t1d0s3
# metadb
 
        flags         first blk      block count
     a        u         16              1034            /dev/dsk/c0t1d0s3
     a        u         1050            1034            /dev/dsk/c0t1d0s3
     a        u         16              1034            /dev/dsk/c1t1d0s3
     a        u         1050            1034            /dev/dsk/c1t1d0s3
     a        u         16              1034            /dev/dsk/c2t1d0s3
     a        u         1050            1034            /dev/dsk/c2t1d0s3

The -a and -f options are used together to create the initial state database replicas. The -c 2 option puts two state database replicas on each specified slice, creating a total of six replicas. By spreading the state database replicas across controllers, you can increase metadevice performance and reliability. The metadb command checks that the replicas are active, as indicated by the -a flag.

Example -- Creating Initial State Database Replicas on a System With Only One Disk


# metadb -a -f -c 3 c0t0d0s3
# metadb
        flags         first blk      block count
     a        u         16              1034            /dev/dsk/c0t0d0s3
     a        u         1050            1034            /dev/dsk/c0t0d0s3
     a        u         2084            1034            /dev/dsk/c0t0d0s3

The system in this example consists of only one disk. (DiskSuite is being installed for its UFS logging feature.) The -a and -f options are used together to create the initial state database replicas. The -c 3 option creates three state database replicas on the same slice on the system's only disk. The metadb command checks that the replicas are active, as indicated by the -a flag.


Caution - Caution -

Use a one-disk configuration for state database replicas as a last resort, as it creates a single point-of-failure.


How to Create Initial State Database Replicas on Existing Unused Slices (DiskSuite Tool)

In this procedure, you will resize slices to hold state database replicas. Most slices are likely to be much larger than what is required for a state database replica. To prevent the waste of large amounts of disk space, you can take space from one slice and allocate it to an unused slice name or a new slice.

  1. Make sure you have met the prerequisites ("Prerequisites for Creating State Database Replicas"), and have read the preliminary information ("Preliminary Information for Creating State Database Replicas"). Also be sure that you know what slices are in your configuration and the names of the slices that are not currently in use.

  2. Decide how many state database replicas you need, based on Table 1-1.

  3. Create at least one new "small" slice. You can use the format(1M) command, the fmthard(1M) command, or Storage Manager. See System Administration Guide, Volume I for information on managing disks and slices.


    Note -

    Make sure that the disk space assigned to the slice you are creating for the metadevice state database is not shared with another slice.


  4. Reboot.

  5. Follow Step 3 through Step 12 of "How to Create Initial State Database Replicas From Scratch (DiskSuite Tool)".

How to Create State Database Replicas by Allocating Space From the swap Partition

Use this procedure if you have no unused slices on which to put state database replicas. Even if you have no unused slices, you can create a new slice by taking space from the end of the swap partition and assigning it to an unused slice name.


Caution - Caution -

Re-allocating space for a new slice can be done only on the swap partition. Attempting this process on a file system will cause the loss of data on that file system.


  1. As root, halt the system and boot into single-user mode.


    # halt
    ...
    ok boot -s
    ...
    INIT: SINGLE USER MODE
     
    Type Ctrl-d to proceed with normal startup,
    (or give root password for system maintenance):<root-password>
    Entering System Maintenance Mode
     
    Mar 12 16:52:38 su: 'su root' succeeded for root on /dev/syscon
    Sun Microsystems Inc.   SunOS 5.5       Generic November 1995
  2. Use the swap -l command to identify a system's swap areas. Activated swap devices or files are listed under the swapfile column.


    # swap -l
    swapfile           dev  swaplo blocks   free
    /dev/dsk/c0t2d0s1 32,17      8 205624 192704
  3. Turn off swapping and verify that no slices are being used for swap.


    # swap -d /dev/dsk/slice
    # swap -l
    
  4. Repartition the disk with the format(1M) command, the fmthard(1M) command, or Storage Manager, and reboot your system.

    You will delete cylinders from the swap slice, then add the cylinders to a new slice name that is not being used.

  5. Verify that the new slice exists by logging back into your system and using the prtvtoc(1M) command.


    # prtvtoc /dev/rdsk/slice
    
  6. Follow Step 3 through Step 12 of "How to Create Initial State Database Replicas From Scratch (DiskSuite Tool)".

    Using the Metadevice State Database Info window, create three state database replicas on the slice that you created by repartitioning swap.

Example -- Committed MetaDB Object Consisting of Three State Database Replicas

This example shows a committed MetaDB object with three state database replicas on the same slice. Notice that the object indicates three state database replicas even though it contains only one slice. The status of the MetaDB object is "Attention," because the replicas are not spread across at least three controllers.

Graphic

Where to Go From Here

Now you are ready to use DiskSuite to manage your configuration. Use the procedures in Chapter 2, Creating DiskSuite Objects to create DiskSuite objects, such as metadevices and hot spare pools.