Solstice DiskSuite 4.0 Administration Guide
  Search only this book
Download this book in PDF

Disksets

8

Solstice DiskSuite's diskset feature lets you set up groups of host machines and disk drives in which all of the hosts in the set are connected to all the drives in the set. These facilities are intended for use in a high-availabilty, fail-over environment, such as the one offered by SunSoft.

Note - While DiskSuite's diskset feature enables a high-availability configuration, DiskSuite itself does not actually provide a high-availability environment.

This chapter provides general information about DiskSuite's diskset feature. Specific information for using this feature within a high-availability environment would be contained in the documentation for the particular high-availability product you are using.
Use the following table to locate specific information in this chapter.
Overview of Disksetspage 138
Database Replicas and Disksetspage 139
Naming Conventionspage 139
DiskSuite Commands and Disksetspage 140
Defining Disksetspage 141
Administering Disksetspage 144
Reserving a Disksetpage 144
Releasing a Disksetpage 145
Removing Hosts and Drives From a Disksetpage 146
Adding Drives or Hosts to an Existing Disksetpage 148

Overview of Disksets

A shared diskset is a grouping of two hosts and disk drives in which all the drives are accessible by both hosts. DiskSuite requires that the device name be identical on each host in the diskset. There is one metadevice state database per shared diskset and one on the local diskset of each host.
Each host in a diskset must have a local diskset that is seperate from the shared diskset. A local diskset for a host consists of all drives which are not part of a shared diskset. The host's local metadevice configuration is contained within this local diskset in the local metadevice state database replicas. Refer to Chapter 10, "State Database Replicas," for more information. Only the host knows about its local diskset.
Drives in a shared diskset must not be in any other diskset. None of the partitions on any of the drives in a diskset can be mounted on, swapped on, or part of a local metadevice. Also, all of the drives in a shared diskset must be accessible by both hosts in the diskset.
Figure 8-1 illustrates an example of a diskset shared between two host machines, named red and blue. The shared diskset is named relo-red. Each host's local diskset is shown. Note that this example configuration will be used to describe the procedures in this chapter.

Graphic

Figure 8-1

Metadevices and hot spare pools in any diskset must consist of drives within that diskset. Likewise, metadevices and hot spare pools in the local diskset must be made up of drives from within the local diskset.

Database Replicas and Disksets

In past releases, DiskSuite has been set up to allow only one metadevice state database per host. The diskset feature actually extends DiskSuite to allow more than one metadevice state database per host. This means that each host in a diskset has a state database for each shared diskset and a seperate state database for its local diskset. This way, if the shared diskset is in use by one host in the set, the other host still can access data from its local diskset.

Naming Conventions

Metadevices within the local diskset use the standard DiskSuite naming conventions. Metadevices within a shared diskset use the following naming conventions:
/dev/md/setname/{dsk|rdsk}/dnumber

where setname is the name of the diskset, and number is the number of the metadevice (usually 0-127).
Hot spare pools within the local diskset use the standard DiskSuite naming conventions. Hot spare pools within a shared diskset use the following naming conventions:
setname/hspnumber
where setname is the name of the diskset, and number is the number of the hot spare pool (0 - 999).

DiskSuite Commands and Disksets

The -s option is used with the standard DiskSuite commands to create, remove, and administer metadevices and hot spare pools within a specific shared diskset. The -s option is available with the following commands:
  • metaclear
  • metadb
  • metdetach
  • metahs
  • metainit
  • metaoffline
  • metaonline
  • metaparam
  • metareplace
  • metastat
  • metasync
  • metattach
Using the -s option specifies the diskset that the command will administer. If the -s option is not used, the command affects only the local diskset.

Defining Disksets

Before you can begin to create or administer disksets, the DiskSuite 4.0 software must be installed on each host in the diskset and each host must have local database replicas set up. In addition, all disks that you plan to share between hosts in the diskset must be connected to each host and must have the same name on each host.
This section describes how to define disksets from the command line using the metaset command with the -a option. Additional step-by-step procedures for administering disksets are provided later in this chapter.
There are two basic operations involved in defining disksets:
  1. Adding hosts (adding the first host defines the diskset)

  2. Adding drives

The host names and diskset name used in the following procedures are from the example illustrated in Figure 8-1.
To define a diskset, you begin by naming the two hosts connected to the shared disks:
  1. Enter the following on the command line:


  # metaset -s relo-red -a -h red blue  

where relo-red is the name of the diskset and red and blue are the names of the first and second hosts you are adding to the set. (The hostname is the same name found in /etc/nodename.)
Adding the first host creates the diskset. It is okay if you create a diskset with just one host to start with, and then add the second host at a later time. The last host cannot be deleted until all of the drives within the set have been deleted.

Note - A host name is not accepted if all drives within the diskset cannot be found on each specified host. In addition, a drive is not accepted if it cannot be found on all the hosts in the diskset.

You can look at the status of the new diskset using the metaset command with no arguments:

  # metaset  
  
  Set name = relo-red, Set number = 1  
  
  Host                  Owner  
    red  
    blue  

  1. Next, you add drives to the diskset by entering the following:


  # metaset -s relo-red -a c2t0d0 c2t1d0 c2t2d0 c2t3d0 c2t4d0 c2t5d0  

where relo-red is the name of the previously named diskset and c2t0d0, c2t1d0, c2t2d0, c2t3d0, c2t4d0, and c2t5d0 are the names of the drives you are adding to the set.

Note - These are drives names. There is no slice indentifier ("sx") at the end of the names.

For a drive to be accepted into a diskset, the drive must not be in use within another metadevice. It must not be currently mounted or swapped on. When a drive is accepted into the diskset, it is repartitioned and the metadevice state database replica for the diskset can be placed on the drive.

Note - A drive name is not accepted if it cannot be found on all hosts specified as part of the diskset.

Once again, you can check the status of the diskset as follows:

  # metaset  
  
  Set name = relo-red, Set number = 1  
  
  Host              Owner  
    red              Yes  
    blue  
  
  Drive             Dbase  
    c2t0d0           Yes  
    c2t1d0           Yes  
    c2t2d0           Yes  
    c2t3d0           Yes  
    c2t4d0           Yes  
    c2t5d0           Yes  

The metaset command shows that the 6 drives have been added to the diskset. In addition, the current host red is shown as the owner of the diskset. This means the drives in the diskset have been "reserved" for host red's exclusive use.

Note - The first host to add a drive to a diskset becomes the implicit owner of the diskset.

Drives are repartitioned when they are added to a diskset only if Slice 7 is not set up correctly. A small portion of each drive is reserved in Slice 7 for use by DiskSuite. The remainder of the space on each drive is placed into Slice 0. Any existing data on the disks will be lost by the repartitioning. After adding a drive to a diskset, your system administrator can repartition the drive using fmthard(1M) as necessary, with the exception that Slice 7 is not altered (moved, resized, etc.) in any way.
If a database has been placed automatically on a drive (in Slice 7), metaset indicates this with a "Yes" in the Dbase column.
Unlike local metadevice administration, it is not necessary to create or delete state database replicas manually. The DiskSuite software tries to balance a reasonable number of replicas across all drives in a diskset.

Administering Disksets

After drives are added to a diskset, the diskset can be reserved (or taken) and released by hosts in the diskset. When a diskset is reserved by a host, the other host in the diskset cannot access the data on the drives in the diskset. In order to perform maintenance on a diskset, a host must be the owner of the diskset or have reserved the diskset. In the example shown previously, host red took implicit ownership of the diskset by putting the first drives into the set.
The SCSI reserve command is issued to each drive in the diskset to reserve it for exclusive use by the current host. Each drive in the diskset is probed once every second to determine that it is still reserved.

Note - If a drive has been determined unexpectedly not to be reserved, the host will panic. This behavior helps to minimize data loss which would occur if two hosts were to simultaneously access the same drive.

Reserving a Diskset

Before a host can use drives in a diskset, the host must reserve the diskset. There are two methods of reserving a diskset:
  • Safely - When you safely reserve a diskset, metaset checks to see if another host currently has the set reserved. If another host has the diskset reserved, your host will not be allowed to reserve the set.
  • Forcibly - When you forcibly reserve a diskset, metaset reserves the diskset whether or not another host currently has the set reserved. This method is generally used when a host in the diskset is down or not communicating. All disks within the set are taken over and FailFast is enabled. The metadevice state database is read in and the shared metadevices configured in the set become accessible. If the other host had the diskset reserved at this point, it would panic due to reservation loss.
Normally, two hosts in a diskset cooperate with each other to ensure that drives in a diskset are reserved by only one host at a time. A normal situation is defined as both hosts up and communicating with each other.
* To safely reserve a diskset, enter the following:

  # metaset -s relo-red -t  

where relo-red is the name of the diskset.
In this case, host red communicates with host blue and ensures that host blue has released any reservation of the diskset before host red attempts to reserve the set.
In some cases, a host in the diskset may be down or not communicating. In order to reserve a diskset under these circumstances, the diskset must be forcibly reserved.
* To forcibly reserve a diskset, enter the following:

  # metaset -s relo-red -t -f  

where relo-red is the name of the diskset.
In this case, host red does not communicate with host blue. Instead, the drives in the diskset are reserved without warning. If host blue had the diskset reserved, it would now panic due to reservation loss.

Note - If you are fairly certain that the hosts in the diskset are communicating, it is normally a good idea to perform a safe reservation.

Releasing a Diskset

Sometimes it may be desirable to release a diskset. Releasing a diskset can be useful when performing maintenance on the drives in the set. When a diskset is released, it cannot be accessed by the host. If both hosts in a diskset release the set, neither host in the diskset can access the drives in the set.
You can release a diskset by entering the following:

  # metaset -s relo-red -r  

where relo-red is the name of the diskset you are releasing.
You can verify that the diskset has been released on this host by using the metaset command with no arguments as follows:

  # metaset  
  
  Set name = relo-red, Set number = 1  
  
  Host              Owner  
    red  
    blue  
  
  Drive             Dbase  
    c2t0d0           Yes  
    c2t1d0           Yes  
    c2t2d0           Yes  
    c2t3d0           Yes  
    c2t4d0           Yes  
    c2t5d0           Yes  

Note that there is no owner of the diskset. Viewing status from host red could be misleading. A host can only determine if it does or does not own a diskset. For example, if host blue were to reserve the diskset, it would not appear so from host red; though it would from host blue.

Removing Hosts and Drives From a Diskset

After a drive is added to a diskset, it can be removed using the metaset command with the -d option. For example, to remove c2t5d0 from diskset relo-red, you would type the following:

  # metaset -s relo-red -d c2t5d0  

When drives are removed from a diskset, DiskSuite re-balances the metadevice state database replicas across the remaining drives.

Note - The -f option must be specified when you are deleting the last drive in a set, since this drive would implicitly contain the last state database replica.

You can also remove hosts from a diskset. The last host can be removed from a diskset only after all drives in the diskset have been removed. Removing the last host from a diskset destroys the diskset.
For example, to remove host blue from the diskset relo-red, you would type the following:

  # metaset -s relo-red -d -h blue  

You can verify that host blue has been removed from the diskset using the metaset command as follows:

  # metaset  
  
  Set name = relo-red, Set number = 1  
  
  Host              Owner  
    red              Yes  
  
  Drive             Dbase  
    c2t0d0           Yes  
    c2t1d0           Yes  
    c2t2d0           Yes  
    c2t3d0           Yes  
    c2t4d0           Yes  
    c2t5d0           Yes  

As you can see, host blue is no longer part of the diskset.

Adding Drives or Hosts to an Existing Diskset

Drives can be added to a diskset after the diskset has been defined. To add a drive to an existing diskset, enter the following:

  # metaset -s relo-red -a c2t5d0  

where relo-red is the name of the diskset and c2t5d0 is the drive being added.
When drives are added to a diskset, DiskSuite re-balances the metadevice state database replicas across the remaining drives.

Note - When drives are added to a diskset, they are repartitioned as described in "Defining Disksets" on page 141.

You can also add a host to an existing diskset. With DiskSuite, a maximum of two hosts per diskset are supported. For example, to add host blue back to the diskset relo-red, you would enter the following:

  # metaset -s relo-red -a -h blue  

You can verify that host blue has been added to the diskset using the metaset command as follows:

  # metaset  
  
  Set name = relo-red, Set number = 1  
  
  Host              Owner  
    red              Yes  
    blue  
  
  Drive             Dbase  
    c2t0d0           Yes  
    c2t1d0           Yes  
    c2t2d0           Yes  
    c2t3d0           Yes  
    c2t4d0           Yes  
    c2t5d0           Yes