Solaris Volume Manager Administration Guide

Creating Volumes Automatically

The metassist command enables you to create Solaris Volume Manager volumes, as well as sets of volumes, based on quality-of-service criteria. The metassist command creates volumes for you with one command, rather than the series of commands that Solaris Volume Manager traditionally requires to create volumes.

You can use the metassist command to create RAID-1 (mirror) volumes directly. Thus, you do not have to first create the submirrors (concatenations or stripes) that are used as components of the RAID-1 (mirror) volume.

Analyzing Volume Creation by Specifying Output Verbosity

When you run the metassist command, you can specify the level of verbose output. More verbose output can help diagnose problems, such as determining why disks were or were not selected for use in a volume, or to determine why a specific attempted command failed. Less verbose output can reduce the amount of extraneous information that you must review.

When you specify output verbosity, you can learn what the metassist command does and how it makes its decisions. This information is useful for troubleshooting some of the following:

ProcedureHow to Create RAID-1 (mirror) Volumes Using the metassist Command

Before You Begin

Check Prerequisites for Top-Down Volume Creation.

Steps
  1. Identify the available storage on which to create the volume.

    If you do not explicitly specify storage, Solaris Volume Manager identifies unused storage on the system and uses it, as appropriate. If you choose to specify storage, either broadly (for example, all storage on controller 1) or specifically (for example, use c1t4d2, but do not use c1t4d1), Solaris Volume Manager uses the storage you specify.

  2. Use the metassist command and the appropriate options for your task.

    • To create volumes from the command line, use the following form of the metassist command.


      # metassist create -s diskset-name -f -r redundancy -a device1, device2... -S size -v verbosity
      
      create

      Is the subcommand used to create volumes.

      -s diskset-name

      Specifies the name of the disk set to use for the volume.

      -f

      Specifies that the volume be associated with a hot spare.

      -r redundancy

      Specifies the level of redundancy (number of data copies) to create.

      -a device1, device2...

      Specifies the devices that are available for creating the volume.

      -S size

      Specifies the size of the volume to create in KB, MB, GB, or TB, for kilobytes, megabytes, gigabytes, and terabytes, respectively.

      -v verbosity

      Specifies how verbose the output should be. Allowable values range from 0 (nearly silent output) to 2 (significant output). The default level is 1 (moderate output).

    • To create volumes using an input file to specify volume characteristics, use one of the following forms of the metassist command.


      # metassist create [-v n] [-c] -F config_file
      # metassist create [-v n] [-c | -d] -F request_file
      
      -c

      Specifies to output the command script that would implement the specified or generated volume configuration. The command script is not run, and processing stops at this stage.

      -d

      Specifies to output the volume configuration that satisfies the specified or generated volume request. No command script is generated or executed, and processing stops at this stage.

      -F config_file | request_file

      Specifies the volume request or volume configuration file to process. If config_file or request_file is specified as a dash (-), it is read from standard input. The -d option cannot be specified when input file is a volume configuration file.

      A volume configuration file describes detailed configurations of the volumes to be created, while a volume request file provides characteristics for the volumes to be produced. For more information, see volume-config(4)volume-config(4) and volume-request(4) man pages.

      -v verbosity

      Specifies how verbose the output should be. Allowable values range from 0 (nearly silent output) to 2 (significant output). The default level is 1 (moderate output).

    See the following examples and the metassist(1M) man page for more information.

  3. Once you have created the volumes, view the new volumes.


    # metastat -s diskset-name
    

Example 23–1 Creating a Two-Way Mirror Using the metassist Command

The following example shows how to create a two-way mirror, 10 Mbytes in size. The metassist command identifies unused disks and creates the best mirror possible using those disks. The -s myset argument specifies that the volumes will be created in the myset disk set. The disk set is created, if necessary.


# metassist create -s myset -r 2 -S 10mb


Example 23–2 Creating a Two-Way Mirror and Hot Spare Using the metassist Command

The following example shows how to use the metassist command to create a two-way mirror, 10 Mbytes in size, with a hot spare to provide additional fault tolerance. The -f option specifies the fault tolerance.


# metassist create -s myset -f -r 2 -S 10mb
 


Example 23–3 Creating a Stripe With a Specific Controller Using the metassist Command

The following example shows how to use the metassist command to create a stripe using disks available on controller 1. The -a option specifies the available controller.


# metassist create -s myset -a c1 -S 10mb


Example 23–4 Specifying Output Verbosity From the metassist Command

The following example shows how to use the metassist command to create a two-way mirror, 10 Mbytes in size, with a hot spare to provide additional fault tolerance. The -f option specifies fault tolerance. The final argument (-v 2) specifies a verbosity level of two, which is the maximum level and will provide the most information possible about how the metassist command worked.


# metassist create -s myset -f -r 2 -S 10mb -v 2
Scanning system physical device configuration...

  These HBA/Controllers are known:.
    c0                        /pci@1f,0/pci@1,1/ide@3
    c1                        /pci@1f,0/pci@1/pci@2/SUNW,isptwo@4

  These disks are known:

    c0t0d0                    id1,dad@AST34342A=____________VGD97101
    c1t1d0                    id1,sd@SSEAGATE_ST39204LCSUN9.0G3BV0L88P000021097XNL
    c1t2d0                    id1,sd@SSEAGATE_ST39102LCSUN9.0GLJW22867000019171JDF
    c1t3d0                    id1,sd@SSEAGATE_ST39204LCSUN9.0G3BV0L7RV00007108TG0H
    c1t4d0                    id1,sd@SSEAGATE_ST39204LCSUN9.0G3BV0LDFR000021087R1T
    c1t5d0                    id1,sd@SSEAGATE_ST39204LCSUN9.0G3BV0L0M200002109812L
    c1t6d0                    id1,sd@SSEAGATE_ST39204LCSUN9.0G3BV0L8K8000021087R0Z
.
.
.
(output truncated)

The following example shows how to use the metassist command to create a two-way mirror, 10 Mbytes in size, with a hot spare to provide additional fault tolerance. The -f option specifies fault tolerance. The final argument (-v 0) specifies a verbosity level of zero, which is the minimum level and will provide nearly silent output when the command runs.


# metassist create -s myset -f -r 2 -S 10mb -v 0
myset/hsp000: Hotspare pool is setup
myset/hsp000: Hotspare is added
myset/d2: Concat/Stripe is setup
myset/d1: Concat/Stripe is setup
myset/d0: Mirror is setup
myset/d0: submirror myset/d1 is attached


Example 23–5 Creating a Volume Using an Input File

The following example shows how to use the metassist command to create a volume using an input file.


# metassist create -F request.xml

For more information on using input files with the metassist command, see Working With File-Based Data Using the metassist Command.