Solaris Volume Manager Administration Guide
Previous Next

Expanding Disk Sets

How to Add Disks to a Disk Set


Caution - 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.

Before You Begin

Check Guidelines for Working With Disk Sets.

  1. 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
      -s diskset-name

      Specifies the name of a disk set on which the metaset command will work.

      -a

      Adds disks to the named disk set.

      disk-name

      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.


    Caution - 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.


  2. Verify the status of the disk set and disks.
    # metaset
Example 19-3 Adding a Disk to a Disk Set
# 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

How to Add Another Host to a Disk Set

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.

Before You Begin

Check Guidelines for Working With Disk Sets.

  1. 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
      -s diskset-name

      Specifies the name of a disk set on which to add the host.

      -a

      Adds the host to the named disk set.

      -h hostname

      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.

  2. Verify that the host has been added to the disk set.
    # metaset
Example 19-4 Adding Another Host to a Disk Set
# 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.

How to Create Solaris Volume Manager Components in a Disk Set

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
Example 19-5 Creating Solaris Volume Manager Volumes in a 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                
Previous Next