Solstice DiskSuite Tool 4.0 User's Guide
  Search only this book
Download this book in PDF

State Database Replicas

10

This chapter provides information on how to set up and administer the state database and its associated replicas with the Solstice DiskSuite Tool (metatool(1M)). Refer to Chapter 3, "Overview of DiskSuite Tool," for information on using DiskSuite Tool.
Use the following table to locate specific information.
Overview of the State Database Replicaspage 219
Planning Locations of Replicaspage 221
Creating the Initial State Database Replicaspage 222
Adding Replicaspage 225
Removing Replicaspage 228
Metadevice State Database Information Windowpage 231
Checking the Status of Replicaspage 234

Overview of the State Database Replicas

A state database replica is a dedicated portion of a disk. It is similar to a disk label. The space occupied by the replica is reserved for the exclusive use of the metadevice state database; it cannot be used for any other purpose.
State database replicas are critical to the operation of all metadevices because they provide a memory service for DiskSuite. The replicas keep track of configuration and status information for all metadevices, mirrors, trans devices, RAID devices, and hot spares. The replicas also keep track of error conditions that have occurred.
The replicated state database information keeps DiskSuite operating. Without replicas (copies) of the same information for comparison, DiskSuite does not know the current running state of metadevices. This chapter, along with Chapter 10 of the Solstice DiskSuite 4.0 Administration Guide and the metadb(1M) manual page provide a detailed discussion of how the replicas are used by the metadisk driver.
Each replica can exist on either a dedicated disk partition or on space reserved for a replica within a striped or concatenated metadevice or a logging device. You can store multiple replicas in a single disk partition. However, placing multiple replicas on a single disk reduces reliability. Each replica occupies 517 Kbytes or 1034 disk blocks of the slice.
The state database must be initialized before any metadevices are configured. See Chapter 2, "Installation and Setup'"in the Solstice DiskSuite 4.0 Administration Guide for information about setting up the initial state database.

Performing the Memory Service

After you have configured metadevices, the metadevice driver must "remember" this configuration and status information. The metadevice state database is the metadevice driver's long-term memory. The metadevice driver stores all the metadevice configuration information in the state database. This includes the configuration information about metadevices, mirrors, trans devices, RAID devices, and hot spares.
If the replicated metadevice state databases were lost, the metadevice driver would have no way of knowing any configuration information. This could result in the loss of all data stored on metadevices. To protect against losing the metadevice state database because of hardware failures, multiple replicas (copies) of the state database are kept.
These multiple replicas also protect the state database against corruption that can result from a system crash. Each replica of the state database contains a checksum. When the state database is updated, each replica is modified, one at a time. If a crash occurs while the database is being updated, only one of the
replicas will be corrupted. When the system reboots, the metadevice driver uses the checksum embedded in the replicas to determine if a replica has been corrupted. Corrupted replicas are ignored.
If a disk containing the metadevice state database is turned off, the metadevices remain fully functional because the database is retrieved from one of the replicas still in operation. Changes made to the configuration following the reboot are stored only in those replicas that are running when the system comes back up. If the disk drive that was turned off is later turned back on, the data contained in the replica stored on that disk will be ignored.

Planning Locations of Replicas

Consider the following when planning the location of replicas on a system where DiskSuite has just been loaded:
  • Database replicas can reside on any unused partition or on any partition which will also be part of a metadevice or logging device with the exception of root (/), swap, /usr, or an existing file system.
  • If multiple controllers exist, replicas should be spread as evenly as possible across the controllers.
  • If multiple disks exist on a controller, at least two of the disks on each controller should store a replica of the metadevice state database.
  • At least three replicas should be created. For instance, if you have three drives, one replica should be created on each. That way, if one drive fails, you will have the necessary two replicas to continue running. When you have less than two replicas, DiskSuite will not function.

Note - In a two-drive configuration, you should always create two replicas on each drive. For example, assume you create two replicas on one component and only one replica on the other. If the component with two replicas fails, DiskSuite will not function because the remaining component only has one replica.

  • No more than one replica should be placed on a single disk unless that is the only way to reach the minimum number (three) of replicas. If you must have more than one replica on a slice, use the Metadevice State Database Information window to attach the replicas. See page 231 for additional information.

Creating the Initial State Database Replicas

The following instructions explain the procedure for creating the initial state database and adding two replicas, creating the minimum of three.
  1. Start DiskSuite Tool.


  # metatool  

  1. Respond to the warning message.

    The first time DiskSuite Tool is started on a system, it displays a warning message. Click on the OK button.

Internal bitmap(459x247)

  1. Open the MetaDB template on the Metadevice Editor window's canvas.

    Double-click on the MetaDB object in the device list. The MetaDB object is displayed with a Critical status.

Internal bitmap(360x65)

  1. Open the Slice Browser.

    Click on Slices on the button panel.

Internal bitmap(360x138)

  1. Select a slice that will contain the state database.

    Scroll through the Slice Browser and find a slice that will contain the state database. Ideally, you should have a slice that is approximately 2 Mbytes. However, if all the slices are larger, you should select a slice that you are sure will be part of a metadevice. Unused space on the slice can only be used in a metadevice.

Imported image(360x150)

  1. Drag the initial state database slice into the MetaDB template.

    Point to the slice in the Slice Browser, press the middle button, and drag the slice to the MetaDB template. The status changes from Critical to Urgent.

Imported image(360x89)

  1. Select additional slices that will contain replicas of the state database.

    Scroll through the list of devices in the Slice Browser and locate a minimum of two additional slices that will contain replicas of the state database. Each slice should be approximately 2 Mbytes.


Note - If the replicas and the state database are on slices on the same controller, the MetaDB will have a status of Attention. Also, you run the risk of lost data due to a possible single-point hardware failure.

After you have located appropriate slices to be replicas, click on the first slice, then hold down the Control key and click on the second slice.

Imported image(360x203)

  1. Drag the two slices into the MetaDB template.

    Point to one of the two selected slices, press the middle button, and drag the slices to the top rectangle of the MetaDB object. The Status field changes from Urgent to OK.

Imported image(360x118)

  1. Commit the MetaDB object.

    Click on the top rectangle of the MetaDB object. Then click on Commit on the button panel.

Imported image(360x164)

Adding Replicas

Additional replicas, containing identical information, can be added to the MetaDB object at any time. The additional replicas ensure the integrity of the DiskSuite configuration.
The following instructions explain the procedure for adding replicas.
  1. Start DiskSuite Tool.


  # metatool  

  1. Open the MetaDB object.

    Point to the MetaDB object and double-click the left button.

Imported image(459x255)

  1. Open the Slice Browser.

    Click on Slices on the button panel.

Internal bitmap(360x138)

  1. Select a slice for the new replica.

    Scroll through the list of devices on the Slice Browser to locate a slice. The slice should be approximately 2 Mbytes.

Imported image(360x177)

  1. Drag the slice into the MetaDB object.

    Point to the slice, press the middle button, and drag it to the top rectangle of the MetaDB object.

Imported image(360x149)

  1. Commit the MetaDB object.

    Click inside the top rectangle of the MetaDB object. Then click on the Commit button on the button panel.

Imported image(360x177)

Removing Replicas

DiskSuite Tool lets you remove all but the last replica from the state database.

CAUTION Caution - Don't remove all state database replicas if metadevices are still configured. If all replicas are removed, all metadevices will become inoperable.

To remove a replica from the state database, use the following instructions.
  1. Start DiskSuite Tool.


  # metatool  

  1. Open the MetaDB object.

    Point to the MetaDB object in the device list region of the Metadevice Editor window and double-click the left button.

Imported image(459x246)

  1. Drag the replica from the MetaDB object.

    Point to the replica that you want to remove, press the middle button, and drag the slice to the Metadevice Editor's canvas.

Internal bitmap(360x122)

  1. Put the slice away.

    Click on the c1t1d0s7 slice. Then click on Put Away on the button panel. The slice is returned to the Slice Browser and has a use of unassigned.

Imported image(360x163)

  1. Commit the MetaDB object.

    Click on the top rectangle of the MetaDB object. Then click on Commit on the button panel.

Imported image(360x163)


Note - The following dialog box is displayed if you attempt to remove the state database and all the replicas.

Internal bitmap(360x141)

Metadevice State Database Information Window

The Metadevice State Database Information window enables you to view and modify the attributes and components of metadevice state database replicas. Figure 10-1 shows the Metadevice State Database Information window. There are three ways to display this window:
  • Point to the MetaDB in the Metadevice Browser and double-click the left button. The MetaDB object is opened on the Metadevice Editor's canvas and the Metadevice State Database Information window is displayed.
  • If the MetaDB object is on the Metadevice Editor's canvas, point inside the top of the rectangle and bring up the MetaDB menu. Select the Info choice.
  • Double-click on a MetaDB object on the Metadevice Editor's canvas.

Graphic

Figure 10-1

Once changes are made, the MetaDB object must be committed before the changes take effect.
Table 10-1 lists the functionality associated with the regions of the Metadevice State Database Information window.
Table 10-1
FieldFunctions
StatusDescription of the metadevice state database's status. See "Checking the Status of Replicas" on page 234" for a description of the values that appear in this region.
Replica manipulation regionThis region shows the following information and allows for manipulation.

Replicas - Shows the number of replicas. Scrolling List - A scrolling list of the slices that contain replicas. The information in this field includes the name of the slice, the amount of space used, space available, number of replicas on the slice and the replica status.

Remove - Removes the selected slices. Restore - Restores the selected slices if they are in error. Info - Displays the Slice Information window for the selected (highlighted) slice.

Slice - This field is used to specify a new slice to attach to the MetaDB or replace the selected slice. Replicas - Shows the number of replicas that will be created on the slice. This value is set to one by default. Attach - Adds the slice entered in the slice field to the Replica list. This button is available only when a slice name is entered. Replace - Replaces the selected slice with the slice entered in the Slice field.

Checking the Status of Replicas

There are three ways to check the status of the state database and the replicas using DiskSuite Tool. The methods are:
  • Double-click on the MetaDB object in the device list and view the status on the Metadevice State Database Information window.
  • Move the MetaDB object from the device list and view the Status field on the object.
  • Bring up the Problem List, which is available using the Browse menu on the menu bar of the Metadevice Editor window. If a problem exists, a detailed description of the problem is given.

Note - The metadb(1M) command, which is documented in the Solstice DiskSuite 4.0 Administration Guide, displays additional information about the state database replicas.

The Status fields of the MetaDB object use the status keywords explained in Table 10-2.
Table 10-2
KeywordMeaning
OKThe MetaDB has no errors and is functioning correctly.
AttentionThere is only one replica present in the configuration. This status will also be displayed if you have the metadevice state database replicas on fewer than three different controllers.
UrgentThere is a state database present, but there are no replicas in the configuration.
CriticalThere is no state database present in the configuration.