This chapter provides information about performing tasks that are associated with disk sets. For information about the concepts that are involved in these tasks, see Chapter 18, Disk Sets (Overview).
The following task map identifies the procedures that are 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 |
For Instructions |
---|---|---|
Create a disk set |
Use the Solaris Volume Manager GUI or the metaset command to create a disk set. Use the metaset -Mcommand 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 use the metaset command 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. |
Check Guidelines for Working With Disk Sets.
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 four hosts per disk set.
Specifies that the disk set being created is a multi-owner disk set.
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. However, the second host 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 the metaset(1M) man page for more information.
Check the status of the new disk set.
# metaset |
In the following example, you create a shared disk set called blue, from the host host1. The metaset command shows the status. At this point, the disk set has no owner. The host that adds disks to the set becomes the owner by default.
# metaset -s blue -a -h host1 # metaset Set name = blue, Set number = 1 Host Owner host1 |
In the following example, you create a multi-owner disk set called red. The first line of the output from the metaset command displays “Multi-owner,” indicating that the disk set is a multi-owner disk set.
# metaset -s red -a -M -h nodeone # metaset -s red Multi-owner Set name = red, Set number = 1, Master = Host Owner Member nodeone Yes |
Do not add disks larger than 1Tbyte 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 the Solaris 9 4/03 release. See Overview of Multi-Terabyte Support in Solaris Volume Manager for more information about multi-terabyte 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.
The disk must not contain a state database replica.
The disk must not be currently mounted, swapped on, or otherwise opened for use by an application.
Check Guidelines for Working With Disk Sets.
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 that you want to modify. Then click the right mouse button 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. N The “sx” slice identifiers are not included when adding a disk to a disk set.
See the metaset(1M)man page 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 to a disk set. The process of adding a disk with data to a disk set might repartition the disk, destroying the data.
Verify the status of the disk set and disks.
# metaset |
# metaset -s blue -a c1t6d0 # metaset Set name = blue, Set number = 1 Host Owner host1 Yes Drive Dbase c1t6d0 Yes |
In this example, the host name is host1. The shared disk set is blue. Only the disk, c1t6d0, has been added to the disk set blue.
Optionally, you could add multiple disks at once by listing each disk on the command line. For example, you could use the following command to add two disks to the disk set simultaneously:
# metaset -s blue -a c1t6d0 c2t6d0 |
This procedure explains how to add another host to an existing disk set that only has one host. Solaris Volume Manager supports up to four hosts per disk set.
Check Guidelines for Working With Disk Sets.
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 click the right mouse button , 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 to add the host.
Adds the host to the named disk set.
Specifies one or more host names to be added to the disk set. Adding the first host creates the disk set. The host name is the same name found in the /etc/nodename file.
See the metaset(1M) man page for more information.
Verify that the host has been added to the disk set.
# metaset |
# metaset -s blue -a -h host2 # metaset Set name = blue, Set number = 1 Host Owner host1 Yes host2 Drive Dbase c1t6d0 Yes c2t6d0 Yes |
This example shows the addition of the host, host2, to the disk set, blue.
After you create a disk set, you can create volumes and hot spare pools using the disks 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 components 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 same command line utilities with the same basic syntax to create volumes, state database replicas, or hot spare pools. However, add -s disk-set immediately after the command for every command.
# command -s disk-set |
The following example shows the creation of a mirror, d10, in the disk set, blue. The mirror consists of submirrors (RAID-0 volumes), d11 and d12.
# 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 |
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. Click the right mouse button on the Disk Set you want to monitor. Then choose Properties from the menu. For more information, see the online help.
Use the following form of the metaset command to view disk set status.
# metaset -s diskset-name |
See the metaset(1M) man page for more information.
Disk set ownership is only shown on the owning host.
The following example shows the metaset command with the -s option followed by the name of the disk set, blue. The output from this command displays status information for that disk set. The output indicates that host1 is the disk set owner. The metaset command also displays the disks in the disk set.
red# metaset -s blue Set name = blue, Set number = 1 Host Owner host1 Yes Drive Dbase c1t6d0 Yes c2t6d0 Yes |
The metaset command by itself displays the status of all disk sets.
To delete a disk from a disk set, use one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Disk Sets node. Click the right mouse on the Disk Set that you want to release. Then choose Properties from the menu. Click the Disks tab. Follow the instructions in the online help.
Use the following form of the metaset command to delete a disk from a disk set.
# metaset -s diskset-name -d disk-name |
Specifies the name of a disk set on which to delete the disk.
Specifies the disks to delete from the disk set. Disk names are in the form cxtxdx. The “sx” slice identifiers are not included when deleting a disk from a disk set.
See the metaset(1M) man page for more information.
Verify that the disk has been deleted from the disk.
# metaset -s diskset-name |
To delete a disk set, you must first delete all the disks from the disk set.
The following example shows the deletion of the disk, c1t6d0 from the disk set, blue.
host1# metaset -s blue -d c1t6d0 host1# metaset -s blue Set name = blue, Set number = 1 Host Owner host1 host2 Drive Dbase c2t6d0 Yes |
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. Click the right mouse on the disk set you want to take. Then, hen 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 -f |
Specifies the name of a disk set to take.
Specifies to take the disk set.
Specifies to take the disk set forcibly.
See the metaset(1M) man page for more information.
Only one host at a time can own a disk set. When one host in a disk set takes the disk set, the other host in the disk set cannot access data on the disks in the disk set.
The default behavior of the metaset command is to allow your host to take the disk set only if a release is possible on the host that has ownership of the disk set. 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 on the disk set.
Disk set ownership is only shown on the owning host.
In the following example, the host, host1, communicates with the host, host2. This communication ensures that the host host2 has released the disk set before the host, host1, attempts to take the disk set.
host1# metaset ... Set name = blue, Set number = 1 Host Owner host1 host2 ... host1# metaset -s blue -t host2# metaset ... Set name = blue, Set number = 1 Host Owner host1 Yes host2 ... |
If host2 owned the disk set, blue, the “Owner” column in the preceding output would still have been blank. The metaset command only shows whether the host issuing the command owns the disk set.
In the following example, the host that is taking the disk set does not communicate with the other host. Instead, the -f option allows the disks in the disk set to be forcibly taken without warning. If the other host had owned the disk set, that host would panic when it attempted an I/O operation on the disk set.
# metaset -s blue -t -f |
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 directly the volumes or hot spare pools that are defined in the disk set . However, if both hosts release the disk set, the hosts can access the disks directly through their c*t*d* names.
This option is not available for multi-owner disk sets.
Check Guidelines for Working With 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. Click the right mouse on the disk set that 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.
# metaset |
The following example shows the release of the disk set, blue. Note that there is no owner of the disk set. Viewing status from the host host1 could be misleading. A host can only determine if it does or does not own a disk set. For example, if he host, host2, were to take ownership of the disk set, the ownership would not appear from the host, host1. Only the host, host2, would display that host2 has ownership of the disk set.
host1# metaset -s blue -r host1# metaset -s blue Set name = blue, Set number = 1 Host Owner host1 host2 Drive Dbase c1t6d0 Yes c2t6d0 Yes |
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 destroys 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. Click the right mouse on the disk set you want to release, then choose Delete from the menu. Follow the instructions in the online help.
To delete the host 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.
Use the same form of the preceding metaset command to delete a disk set. Deleting a disk set requires that the disk set contains no disks and that no other hosts own the disk set. Deleting the last host destroys the disk set.
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 disk-set |
The following example shows the deletion of the host, host2 from the disk set, blue.
# metaset -s blue Set name = blue, Set number = 1 Host Owner host1 Yes ..host2 Drive Dbase c1t2d0 Yes c1t3d0 Yes c1t4d0 Yes c1t5d0 Yes c1t6d0 Yes c2t1d0 Yes |
# metaset -s blue -d -h host2 |
# metaset -s blue Set name = blue, Set number = 1 Host Owner host1 Yes Drive Dbase c1t2d0 Yes c1t3d0 Yes c1t4d0 Yes c1t5d0 Yes c1t6d0 Yes c2t1d0 Yes |
The following example shows the deletion of the last host from the disk set, blue.
host1# metaset -s blue -d -h host1 host1# metaset -s blue metaset: host: setname "blue": no such set |
importing a disk set
The metaimport command allows you to import disk sets from one system to another.
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 (metadb) 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. The output from the metaimport command distinguishes between regular disk sets and replicated disk sets.
# metaimport -r Disksets eligible for import: 1) Found replicated diskset containing disks : c1t2d0 c1t3d0 Creation time: Tue May 3 14:27:29 2006 For more information about this set: metaimport -r -v c1t2d0 To import this set: metaimport -s <newsetname> c1t2d0 2) Found replicated diskset containing disks : c1t12d0 c1t9d0 Creation time: Tue May 3 14:30:00 2006 For more information about this set: metaimport -r -v c1t12d0 To import this set: metaimport -s <newsetname> c1t12d0 Number of disksets eligible for import: 2 # metaimport -r -v c1t2d0 Disksets eligible for import: 1) Found regular diskset containing disks: c1t2d0 c1t3d0 Metadatabase information: flags first blk block count a u 16 8192 /dev/dsk/c1t2d0s7 a u 16 8192 /dev/dsk/c1t3d0s7 Metadevice information: Creation time: Tue May 23 13:05:39 2006 Last modified time: Tue May 23 13:05:39 2006 To import this diskset: metaimport -s <newsetname> c1t2d0 |
The following output of metaimport -r reports the following conditions in the system's disk set configuration.
A partial disk set in which one or more disks are unavailable
Disk conflicts where the disk is detected in more than one disk set
A replicated disk set
The recommended disk set to import
A disk can also be reported as unavailable and in conflict at the same time.
# metaimport -r Disksets eligible for import: 1) Found partial regular diskset containing disks: c1t2d0 (CONFLICT) c3t50020F230000FA57d0 (UNAVAIL) c3t50020F230000FA57d1 (UNAVAIL) (UNAVAIL) WARNING: This disk is unavailable on this system. Import may corrupt data in the diskset. (CONFLICT) WARNING: This disk has been reused in another diskset or system c onfiguration. Import may corrupt data in the diskset. Creation time: Tue May 23 13:05:39 2006 For more information about this diskset: metaimport -r -v c1t2d0 To import this diskset: metaimport -f -s <newsetname> c1t2d0 2) Found regular diskset containing disks: c1t2d0 (CONFLICT) c1t3d0 c1t4d0 (CONFLICT) WARNING: This disk has been reused in another diskset or system c onfiguration. Import may corrupt data in the diskset. Creation time: Tue May 23 13:04:57 2006 For more information about this diskset: metaimport -r -v c1t3d0 To import this diskset: metaimport -f -s <newsetname> c1t3d0 3) Found replicated diskset containing disks: c3t50020F23000100F7d13 c3t50020F23000100F7d15 c3t50020F23000100F7d14 Creation time: Thu May 25 14:56:13 2006 For more information about this diskset: metaimport -r -v c3t50020F23000100F7d13 To import this diskset: metaimport -s <newsetname> c3t50020F23000100F7d13 Number of disksets eligible for import: 3 Warning: The following disks have been detected in more than one set. Import recommendation based upon set creation time. Proceed with the import with caution. c1t2d0 - must import with set created at : Tue May 23 13:05:39 2006 # |
Importing a disk set is blocked if the disk set has disk conflicts. The preceding example recommends that c1t2d0 be imported with the set created at 13:05:39 on Tuesday, May 23. If you import a different disk set instead, the following message is displayed:
# metaimport -f -s <setname> c1t3d0 Importing regular diskset containing disks: c1t2d0 (CONFLICT) c1t3d0 c1t4d0 (CONFLICT) WARNING: This disk has been reused in another diskset or system configuration. Import may corrupt data in the diskset. Creation time: Tue May 23 13:04:57 2006 Warning: The following disks have been detected in more than one set. Import recommendation based upon set creation time. Proceed with the import with caution. c1t2d0 - must import with set created at : Tue May 23 13:05:39 2006 To import this set, c1t2d0 must be removed from the system # |
Become superuser.
Verify that a disk set is available for import.
# metaimport -r -v |
Import an available disk set.
# metaimport -s diskset-name disk-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 # metaset -s red Set name = red, Set number = 1 Host Owner host1 Yes Drive Dbase c1t2d0 Yes c1t3d0 Yes c1t8d0 Yes |