Only drives that meet the following conditions can be added to a disk set:
The drive must not be in use in a volume or hot spare pool, or contain a state database replica.
The drive must not be currently mounted, swapped on, or otherwise opened for use by an application.
To add drives 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 drives 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 drives to the named disk set.
Specifies the drives to add to the disk set. Drive 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 drive 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 drives.
# 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 drives 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 drives 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.