This chapter provides information about performing tasks that are associated with disk sets. For information about the concepts involved in these tasks, see Chapter 20, Disk Sets (Overview).
The following task map identifies the procedures needed to manage Solaris Volume Manager disk sets and Solaris Volume Manager for Sun Cluster multi-owner disk sets. All commands work for both types of disk sets except where noted. The Solaris Volume Manager GUI is not available for tasks associated with multi-owner disk sets.
Task |
Description |
Instructions |
---|---|---|
Create a disk set |
Use the Solaris Volume Manager GUI or the metaset command to create a disk set. Use the metaset -M command to create a multi-owner disk set. | |
Add disks to a disk set |
Use the Solaris Volume Manager GUI or the metaset command to add disks to a disk set. | |
Add a host to a disk set |
Use the Solaris Volume Manager GUI or the metaset command to add a host to a disk set. | |
Create Solaris Volume Manager volumes in a disk set |
Use the Solaris Volume Manager GUI or the metainit command to create volumes in a disk set. |
How to Create Solaris Volume Manager Components in a Disk Set |
Check the status of a disk set |
Use the Solaris Volume Manager GUI or the metaset and metastat commands to check the status of a disk set. | |
Remove disks from a disk set |
Use the Solaris Volume Manager GUI or the metaset command to remove disks from a disk set. | |
Take a disk set |
Use the Solaris Volume Manager GUI or the metaset command to take a disk set. | |
Release a disk set |
Use the Solaris Volume Manager GUI or the metaset command to release a disk set. | |
Delete a host from a disk set |
Use the Solaris Volume Manager GUI or the metaset command to delete hosts from a disk set.
| |
Delete a disk set |
Use the Solaris Volume Manager GUI or the metaset command to delete the last host from a disk set, thus deleting the disk set. | |
Import a disk set |
Use the metaimport command to run reports on disk sets to determine which disk sets can be imported and to import disk sets from one system to another. |
To create a disk set, use one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Disk Sets node. Choose Action->Create Disk Set, then follow the instructions in the wizard. For more information, see the online help.
To create a disk set from scratch from the command line, use the following form of the metaset command:
metaset -s diskset-name -a -h -M hostname |
Specifies the name of a disk set on which the metaset command will work.
Adds hosts to the named disk set. Solaris Volume Manager supports up to eight hosts per shared disk set. Multi-owner disk sets are limited by the number of hosts supported by the application.
Specifies that the disk set being created is a multi-owner disk set.
Multi-owner disk sets work with Sun Cluster and Oracle9i Real Application Clusters. For information about compatible releases of Sun Cluster, see http://wwws.sun.com/software/cluster.
Specifies one or more hosts to be added to a disk set. Adding the first host creates the set. The second host can be added later, but it is not accepted if all the disks within the set cannot be found on the specified hostname. hostname is the same name found in the /etc/nodename file.
See metaset(1M) for more information.
Check the status of the new disk set by using the metaset command.
# metaset |
# metaset -s blue -a -h lexicon # metaset Set name = blue, Set number = 1 Host Owner lexicon |
In this example, you create a shared disk set called blue, from the host lexicon. The metaset command shows the status. At this point, the set has no owner. The host that adds disks to the set will become the owner by default.
# metaset -s red -a -M -h nodeone # metaset Multi-owner Set name = red, Set number = 1, Master = Host Owner Member nodeone Yes |
In this example, you create a multi-owner disk set called red from the host nodeone. Each host added becomes a member of the disk set. The host that adds the first disk to the set becomes the master node by default.
Do not add disks larger than 1TB to disk sets if you expect to run the Solaris software with a 32–bit kernel or if you expect to use a version of the Solaris OS prior to Solaris 9 4/03. See Overview of Large Volume Support in Solaris Volume Manager for more information about large volume support in Solaris Volume Manager.
Only disks that meet the following conditions can be added to a disk set:
The disk must not be in use in a volume or hot spare pool, or contain a state database replica.
The disk must not be currently mounted, swapped on, or otherwise opened for use by an application.
To add disks to a disk set, use one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Disk Sets node. Select the disk set you want to modify, then right-click and choose Properties. Select the Disks tab, click Add Disk, then follow the instructions in the wizard. For more information, see the online help.
To add disks to a disk set from the command line, use the following form of the metaset command:
metaset -s diskset-name -a disk-name |
Specifies the name of a disk set on which the metaset command will work.
Adds disks to the named disk set.
Specifies the disks to add to the disk set. Disk names are in the form cxtxdx; no “sx” slice identifiers are at the end of the name. They need to be the same as seen from all hosts in the disk set.
See the metaset man page (metaset(1M)) for more information.
The first host to add a disk to a disk set becomes the owner of the disk set.
Do not add a disk with data; the process of adding it to the disk set might repartition the disk, destroying any data. For more information, see Example—Two Shared Disk Sets.
Use the metaset command to verify the status of the disk set and disks.
# metaset |
# metaset -s blue -a c1t6d0 # metaset Set name = blue, Set number = 1 Host Owner lexicon Yes Drive Dbase c1t6d0 Yes |
In this example, the host name is lexicon. The shared disk set is blue. At this point, only one disk has been added to the disk set blue.
Optionally, you could add multiple disks at once by listing each of them on the command line. For example, you could use the following:
# metaset -s blue -a c1t6d0 c2t6d0 |
Solaris Volume Manager supports a maximum of four hosts per disk set. This procedure explains how to add another host to an existing disk set that only has one host.
To add a host to a disk set, use one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Disk Sets node and choose the disk set you want to modify. Select the disk set you want to modify, then right-click and choose Properties. Select the Hosts tab, click Add Host, then follow the instructions in the wizard. For more information, see the online help.
To add hosts to a disk set from the command line, use the following form of the metaset command:
metaset -s diskset-name -a -h hostname |
Specifies the name of a disk set on which metaset will work.
Adds disks to the named disk set.
Specifies one or more host names to be added to the disk set. Adding the first host creates the set. The host name is the same name found in the /etc/nodename file.
See the metaset man page (metaset(1M)) for more information.
Verify that the host has been added to the disk set by using the metaset command without any options.
# metaset |
# metaset -s blue -a -h idiom # metaset -s blue Set name = blue, Set number = 1 Host Owner lexicon Yes idiom Drive Dbase c1t6d0 Yes c2t6d0 Yes |
This example shows the addition of host idiom to the disk set blue.
After you create a disk set, you can create volumes and hot spare pools using the disks that you added to the disk set. You can use either the Enhanced Storage tool within the Solaris Management Console or the command line utilities.
To create volumes or other Solaris Volume Manager devices within a disk set, use one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Volumes, State Database Replicas, or Hot Spare Pools node. Choose Action->Create, then follow the instructions in the wizard. For more information, see the online help.
Use the command line utilities with the same basic syntax you would without a disk set, but add -s diskset-name immediately after the command for every command.
# metainit -s blue d11 1 1 c1t6d0s0 blue/d11: Concat/Stripe is setup # metainit -s blue d12 1 1 c2t6d0s0 blue/d12: Concat/Stripe is setup # metainit -s blue d10 -m d11 blue/d10: Mirror is setup # metattach -s blue d10 d12 blue/d10: submirror blue/d12 is attached # metastat -s blue blue/d10: Mirror Submirror 0: blue/d11 State: Okay Submirror 1: blue/d12 State: Resyncing Resync in progress: 0 % done Pass: 1 Read option: roundrobin (default) Write option: parallel (default) Size: 17674902 blocks blue/d11: Submirror of blue/d10 State: Okay Size: 17674902 blocks Stripe 0: Device Start Block Dbase State Reloc Hot Spare c1t6d0s0 0 No Okay blue/d12: Submirror of blue/d10 State: Resyncing Size: 17674902 blocks Stripe 0: Device Start Block Dbase State Reloc Hot Spare c2t6d0s0 0 No Okay |
This example shows the creation of a mirror, d10, in disk set blue, that consists of submirrors (RAID 0 devices) d11 and d12.
Use one of the following methods to check the status of a disk set.
From the Enhanced Storage tool within the Solaris Management Console, open the Disk Sets node. Right-click the Disk Set you want to monitor, then choose Properties from the menu. For more information, see the online help.
Use the metaset command to view disk set status.
See metaset(1M) for more information.
Disk set ownership is only shown on the owning host.
red# metaset -s blue Set name = blue, Set number = 1 Host Owner idiom Yes Drive Dbase c1t6d0 Yes c2t6d0 Yes |
The metaset command with the -s option followed by the name of the blue disk set displays status information for that disk set. By issuing the metaset command from the owning host, idiom, it is determined that idiom is in fact the disk set owner. The metaset command also displays the disks in the disk set.
The metaset command by itself displays the status of all disk sets.
To delete a disk set, you must first delete all disks from the disk set.
From the Enhanced Storage tool within the Solaris Management Console, open the Disk Sets node. Right-click the Disk Set you want to release, then choose Properties from the menu. Click the Disks tab and follow the instructions in the online help.
Use the following form of the metaset command:
metaset -s diskset-name -d drivename |
Specifies the name of a disk set on which the metaset command will work.
Specifies the disks to delete from the disk set. Disk names are in the form cxtxdx; no “sx” slice identifiers are at the end of the name.
See the metaset(1M) man page for more information.
Verify that the disk has been deleted from the disk set by using the metaset -s diskset-name command.
# metaset -s blue |
lexicon# metaset -s blue -d c1t6d0 lexicon# metaset -s blue Set name = blue, Set number = 1 Host Owner lexicon idiom Drive Dbase c2t6d0 Yes |
This example deletes the disk from the disk set blue.
This option is not available for multi-owner disk sets.
Use one of the following methods to take a disk set.
From the Enhanced Storage tool within the Solaris Management Console, open the Disk Sets node. Right-click the Disk Set you want to take, then choose Take Ownership from the menu. For more information, see the online help.
Use the following form of the metaset command.
metaset -s diskset-name -t |
Specifies the name of a disk set on which the metaset command will work.
Specifies to take the disk set.
Specifies to take the disk set forcibly.
See the metaset(1M) man page for more information.
When one host in a disk set takes the disk set, the other host in the disk set cannot access data on disks in the disk set.
The default behavior of the metaset command takes the disk set for your host only if a release is possible on the other host.
Use the -f option to forcibly take the disk set. This option takes the disk set whether or not another host currently has the set. Use this method when a host in the disk set is down or not communicating. If the other host had the disk set taken at this point, it would panic when it attempts to perform an I/O operation to the disk set.
Disk set ownership is only shown on the owning host.
lexicon# metaset ... Set name = blue, Set number = 1 Host Owner lexicon idiom ... lexicon# metaset -s blue -t lexicon# metaset ... Set name = blue, Set number = 1 Host Owner lexicon Yes idiom ... |
In this example, host lexicon communicates with host idiom and ensures that host idiom has released the disk set before host lexicon attempts to take the set.
In this example, if host idiom owned the set blue, the “Owner” column in the above output would still have been blank. The metaset command only shows whether the issuing host owns the disk set, and not the other host.
# metaset -s blue -t -f |
In this example, the host that is taking the disk set does not communicate with the other host. Instead, the disks in the disk set are taken without warning. If the other host had the disk set, it would panic when it attempts an I/O operation to the disk set.
Releasing a disk set is useful when you perform maintenance on the physical disks in the disk set. When a disk set is released, it cannot be accessed by the host. If both hosts in a disk set release the set, neither host in the disk set can access volumes or hot spare pools defined in the set directly, although if both hosts release the set, the hosts can access the disks directly through their c*t*d* names.
This option is not available for multi-owner disk sets.
Use one of the following methods to release a disk set.
From the Enhanced Storage tool within the Solaris Management Console, open the Disk Sets node. Right-click the Disk Set you want to release, then choose Release Ownership from the menu. For more information, see the online help.
To release ownership of the disk set, use the following form of the metaset command.
metaset -s diskset-name -r |
Specifies the name of a disk set on which the metaset command will work.
Releases ownership of a disk set. The reservation of all the disks within the disk set is removed. The volumes within the disk set are no longer accessible.
See the metaset(1M) man page for more information.
Disk set ownership is only shown on the owning host.
Verify that the disk set has been released on this host by using the metaset command without any options.
# metaset |
lexicon# metaset -s blue -r lexicon# metaset -s blue Set name = blue, Set number = 1 Host Owner lexicon idiom Drive Dbase c1t6d0 Yes c2t6d0 Yes |
This example shows the release of the disk set blue. Note that there is no owner of the disk set. Viewing status from host lexicon could be misleading. A host can only determine if it does or does not own a disk set. For example, if host idiom were to reserve the disk set, it would not appear so from host lexicon. Only host idiom would be able to determine the reservation in this case.
Deleting a disk set requires that the disk set contains no disks and that no other hosts are attached to the disk set. Deleting the last host will destroy the disk set.
Use one of the following methods to delete a host from a disk set, or to delete a disk set.
From the Enhanced Storage tool within the Solaris Management Console, open the Disk Sets node. Right-click the Disk Set you want to release, then choose Delete from the menu. Follow the instructions in the online help.
To delete the host and remove the disk set if the host removed is the last host on the disk set, use the following form of the metaset command.
metaset -s diskset-name -d -h hostname |
Specifies the name of a disk set on which the metaset command will work.
Deletes a host from a disk set.
Specifies the name of the host to delete.
# metaset -s blue -d idiom |
See the metaset(1M) man page for more information.
Verify that the host has been deleted from the disk set by using the metaset command. Note that only the current (owning) host is shown. Other hosts have been deleted.
# metaset -s blue Set name = blue, Set number = 1 Host Owner lexicon Yes Drive Dbase c1t2d0 Yes c1t3d0 Yes c1t4d0 Yes c1t5d0 Yes c1t6d0 Yes c2t1d0 Yes |
lexicon# metaset -s blue -d lexicon lexicon# metaset -s blue metaset: lexicon: setname "blue": no such set |
This example shows the deletion of the last host from the disk set blue.
The metaimport command allows you to import disk sets from one system to another.
This option is not available for multi-owner disk sets.
Become superuser.
Obtain a report on disk sets available for import.
# metaimport -r -v |
Provides a report of the unconfigured disk sets available for import on the system.
Provides detailed information about the state database replica location and status on the disks of unconfigured disk sets available for import on the system.
The following examples show how to print a report on disk sets available for import.
# metaimport -r Drives in diskset including disk c1t2d0: c1t2d0 c1t3d0 c1t8d0 More info: metaimport -r -v c1t2d0 Import: metaimport -s <newsetname> c1t2d0 # metaimport -r -v c1t2d0 Import: metaimport -s <newsetname> c1t2d0 Last update: Mon Dec 29 14:13:35 2003 Device offset length replica flags c1t2d0 16 8192 a u c1t3d0 16 8192 a u c1t8d0 16 8192 a u |
Become superuser.
Determine if the volume names are within the range of the nmd value. Modify the nmd field in /kernel/drv/md.conf, if needed. For more information, see How to Increase the Number of Default Volumes.
Verify that a disk set is available for import.
# metaimport -r -v |
Import an available disk set.
# metaimport -s diskset-name drive-name |
Specifies the name of the disk set being created.
Identifies a disk (c#t#d#) containing a state database replica from the disk set being imported.
Verify that the disk set has been imported.
# metaset -s diskset-name |
The following example shows how to import a disk set.
# metaimport -s red c1t2d0 Drives in diskset including disk c1t2d0: c1t2d0 c1t3d0 c1t8d0 More info: metaimport -r -v c1t2d0 # metaset -s red Set name = red, Set number = 1 Host Owner lexicon Yes Drive Dbase c1t2d0 Yes c1t3d0 Yes c1t8d0 Yes |