This section describes how to create disksets, and populate them with hosts and disk drives.
Currently, disksets are only supported on SPARCstorage Array disks.
A diskset is a set of shared disk drives containing DiskSuite objects that can be shared exclusively (but not concurrently) by one or two hosts. Disksets are enablers for host fail-over scenarios.
DiskSuite must be installed on each host that will be connected to the diskset.
There is one metadevice state database per shared diskset and one on the "local" diskset. Each host must have its local metadevice state database set up before you can create disksets.
Unlike local metadevice administration, it is not necessary to create or delete state database replicas manually on the diskset. DiskSuite tries to balance a reasonable number of replicas across all drives in a diskset.
Each host in a diskset must have a local diskset that is separate from the shared diskset. The local diskset for a host consists of all drives that are not part of a shared diskset.
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. Configuring the hardware for use in diskset configuration can be problematic. The disk drives must be symmetric; that is, the shared drives must have the same device number, which implies the same device name/number (controller/target/drive). See "How to Configure Disk Drive Device Names for a Diskset (Command Line)".
You can create a diskset with one host and add the second host later.
You cannot add a drive that is in use to a diskset. Before adding a drive, make sure it is not currently being used for a file system, database, or any other application.
Do not add a drive with existing data that you want to preserve to a diskset; the process of adding it to the diskset repartitions the disk, destroying any data.
When a drive is accepted into a diskset, DiskSuite repartitions it so that the metadevice state database replica for the diskset can be placed on the drive. 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 is lost by the repartitioning. After adding a drive to a diskset, it may be repartitioned as necessary, with the exception that Slice 7 is not altered in any way. If Slice 7 starts at cylinder 0, and is large enough to contain a state database replica, the disk is not repartitioned.
When drives are added to a diskset, DiskSuite re-balances the state database replicas across the remaining drives. Later, if necessary, you can change the replica layout with the metadb(1M) command.
To create a diskset, root must be a member of Group 14, or the ./rhosts file must contain an entry for the other hostname (on each host).
Disksets must be created and configured using the DiskSuite command line interface. After you have created a diskset, you can administer state database replicas, metadevices, and hot spare pools within a diskset using either DiskSuite Tool or the command line utilities.
The high-level steps in creating a diskset are:
Adding hosts to a diskset (this creates the diskset)
Adding drives to the diskset
Before creating a diskset:
Configure disk drive device names so they have the same name on each host in the diskset.
Connect drives to be shared to both hosts.
Configure local metadevice state database replicas on each host.
If you are not familiar with how to configure the same device names for the shared drives in the diskset, refer to "How to Configure Disk Drive Device Names for a Diskset (Command Line)".
Make sure you have met the prerequisites ("Prerequisites for Creating DiskSuite Objects") and have read the preliminary information ("Preliminary Information for Creating Disksets").
Create the diskset by defining the host(s) that have access to the devices.
# metaset -s setname -a -h host... |
-s setname |
Specifies the name of a diskset on which metaset(1M) will work. |
-a |
Adds hosts to the named diskset. DiskSuite supports a maximum of two hosts per diskset. |
-h host... |
Specifies one or more hosts to be added to a diskset. Adding the first host creates the set. The second host can be added later, but it is not accepted if all the drives within the set cannot be found on the specified host. host is the same name found in /etc/nodename. |
Check the status of the new diskset with the metaset(1M) command.
# metaset |
red# metaset -s relo-red -a -h red blue red# metaset -s relo-blue -a -h red blue red# metaset Set name = relo-red, Set number = 1 Host Owner red blue Set name = relo-blue, Set number = 2 Host Owner red blue |
In this example, you create two shared disksets, relo-red and relo-blue, from the host red. The host names are red and blue, each with their own local disksets. The metaset command shows the status. At this point, neither set has an owner. The host that adds disks to the set will become the owner by default.
The following conditions must be satisfied for a drive to be accepted into a diskset:
It must not be in use within a metadevice, or contain a state database replica.
It must not be currently mounted, swapped on, or otherwise opened for use by an application.
Make sure you have met the prerequisites ("Prerequisites for Creating DiskSuite Objects") and have read the preliminary information ("Preliminary Information for Creating Disksets").
Add drives to the diskset.
# metaset -s setname -a drivename... |
In this command,
-s setname |
Specifies the name of a diskset on which metaset(1M) will work. |
-a |
Adds drives to the named diskset. |
drivename... |
Specifies the drives to add to the diskset. Drive names are in the form cxtxdx; no "sx" slice identifiers are at the end of the name. They need to be the same on all hosts in the diskset. |
The first host to add a drive to a diskset becomes the implicit owner of the diskset.
Do not add a disk with data; the process of adding it to the diskset repartitions the disk, destroying any data.
Use the metaset(1M) command to verify the status of the diskset and drives.
# metaset |
red# metaset -s relo-red -a c1t2d0 c1t3d0 c2t2d0 c2t3d0 c2t4d0 c2t5d0 red# metaset Set name = relo-red, Set number = 1 Host Owner red Yes blue Drive Dbase c1t2d0 Yes c1t3d0 Yes c2t2d0 Yes c2t3d0 Yes c2t4d0 Yes c2t5d0 Yes Set name = relo-blue, Set number = 2 Host Owner red blue |
In this example, the host names are red and blue, each with their own local disksets. The two shared disksets are relo-red and relo-blue. The disks in the set relo-red are normally accessed by host red, but may be accessed by host blue if red fails. At this point, no disks have been added to the diskset relo-blue.