Solaris Volume Manager Administration Guide

Analyzing Volume Creation with the metassist Command

When you use the metassist command, you can take several steps to gain visibility into what the metassist command does and how it makes decisions. This information can be useful for troubleshooting some of the following:

Specifying Output Verbosity from the metassist Command

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.

To Use the metassist Command with Verbose Output
  1. Make sure that you have the necessary prerequisites for using top down volume creation (the metassist command).

  2. Identify available storage on which to create the volume.

  3. Use the following form of the metassist command to create a stripe and specify verbose output:

    metassistcreate -s diskset-name -S size[-v verbosity]
    • create is the subcommand to create volumes.

    • -s diskset-name specifies the name of the disk set to use for the volumes.

    • -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. The default level is 1, and allowable values range from 0 (nearly silent output) to 2 (significant output).

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

  4. Use the metastat command to view the new volume.

    metastat -s diskset-name

Example—Using the metassist Command with Verbose Output


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

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

Example—Using the metassist Command with Minimal Output


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

This example shows how to use the metassist command to create a two-way mirror, 10Mb 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.

Creating a Command File with the metassist Command

By running the metassist command with the -c argument, you can generate a Bourne shell script containing the commands that would be used to create the volume configuration. This technique allows you to review the commands before actually creating the volume, or even to modify the script somewhat to meet specific needs.

To Create a Command File with the metassist Command
  1. Make sure that you have the necessary prerequisites for using top down volume creation (the metassist command).

  2. Identify available storage on which to create the volume.

  3. Use the following form of the metassist command to create a stripe and specify that the volume should not actually be created, but that a command sequence (shell script) to create the volumes should be sent to standard output:

    metassistcreate -s diskset-name -S size [-c]
    • create is the subcommand to create volumes.

    • -s diskset-name specifies the name of the disk set to use for the volumes.

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

    • -c specifies that the volume should not actually be created. Instead, a shell script that can be used to create the specified configuration will be sent to standard output.

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

    Note that the shell script required by the -c argument will be sent to standard output, while the rest of the output from the metassist command goes to standard error, so you can redirect the output streams as you choose.

Example—Creating a Command File (Shell Script) with the metassist Command


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

This example shows how to use the metassist command to create a two-way mirror, 10Mb in size, with a hot spare to provide additional fault tolerance (the -f option specifies fault tolerance). The final argument (-c) specifies that the volume should not actually be created, but rather than a shell script that could be used to create the specified configuration should be sent to standard output.

Example—Saving a Command File (Shell Script) from the metassist Command


# metassist create -s myset -f -r 2 -S 10mb -c > /tmp/metassist-shell-script.sh
 

This example shows how to use the metassist command to create a two-way mirror, 10Mb in size, with a hot spare to provide additional fault tolerance (the -f option specifies fault tolerance). The final argument (-c) specifies that the volume should not actually be created, but rather that a shell script that could be used to create the specified configuration should be sent to standard output. The end of the command redirects standard output to create the /tmp/metassist-shell-script.sh shell script that can later be used to create the specified volume.

Creating a Volume with A Saved Shell Script Created by the metassist Command

After you have created a shell script with the metassist command, you can use that script to create the volumes specified when the shell script was created.


Note –

The command script created by the metassist command has significant dependencies on the specific system configuration of the system on which the script was created, at the time the script was created. Using the script on different systems or after any changes to the system configuration can lead to data corruption or loss.


To Execute a Saved metassist Command Shell Script
  1. Make sure that you have the necessary prerequisites for using top down volume creation (the metassist command).

  2. Ensure that the system configuration has not changed since the shell script was created, and that you are executing the script on the same system it was created on.

  3. Execute the saved shell script:

    sh ./metassist-shell-script-name
  4. Use the metastat command to view the new volume.

    metastat -s diskset-name

Creating a Volume Configuration File with the metassist Command

By running the metassist command with the -d argument, you can generate an XML-based volume configuration file that specifies the volumes and their components in detail, including all options and relevant information about the volumes. Reviewing this file helps you understand the configuration that the metassist command recommends. Making careful changes to this file can also allow you to fine-tune the configuration, then to use the volume configuration file as input to the metassist command to actually create volumes.

To Create a Volume Configuration File with the metassist Command
  1. Make sure that you have the necessary prerequisites for using top down volume creation (the metassist command).

  2. Identify available storage on which to create the volume.

  3. Use the following form of the metassist command to create a stripe and specify that the volume should not actually be created, but that a volume configuration file describing the proposed volumes should be sent to standard output:

    metassist create -s diskset-name -S size [-d]
    • create is the subcommand to create volumes.

    • -s diskset-name specifies the name of the disk set to use for the volumes.

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

    • -d specifies that the volume should not actually be created. Instead, an XML-based volume configuration file that can eventually be used to create the specified configuration will be sent to standard output.

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

    Note that the XML-based volume configuration file required by the -d argument will be sent to standard output, while the rest of the output from the metassist command goes to standard error, so you can redirect the output streams as you choose.

Example—Creating a Volume Configuration File with the metassist Command


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

This example shows how to use the metassist command to create a two-way mirror, 10Mb in size, with a hot spare to provide additional fault tolerance (the -f option specifies fault tolerance). The final argument (-d) specifies that the volume should not actually be created, but rather that a volume configuration file that could eventually be used to create the specified configuration should be sent to standard output.

Example—Saving a Volume Configuration File from the metassist Command


# metassist create -s myset -f -r 2 -S 10mb -d > /tmp/metassist-volume-config.xml
 

This example shows how to use the metassist command to create a two-way mirror, 10Mb in size, with a hot spare to provide additional fault tolerance (the -f option specifies fault tolerance). The final argument (-d) specifies that the volume should not actually be created, but rather that a volume configuration file that could eventually be used to create the specified configuration should be sent to standard output. The end of the command redirects standard output to create the /tmp/metassist-volume-config.xml shell script that can later be used to create the specified volume.