<chapter id="tasks-disksets-1"><title>Disk
Sets (Tasks)</title><highlights><para>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 <olink targetptr="about-disksets-31856" remap="internal">Chapter&nbsp;18, Disk Sets
(Overview)</olink>.</para>
</highlights><sect1 id="tasks-disksets-66"><title>Disk Sets (Task Map)</title><para>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.</para><informaltable frame="all"><tgroup cols="3" colsep="1" rowsep="1"><colspec colname="colspec0" colwidth="110.00*"/><colspec colname="colspec1" colwidth="167.00*"/><colspec colname="colspec2" colwidth="119.00*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Create a disk set</para>
</entry><entry><para>Use the Solaris Volume Manager GUI or the <command>metaset</command> command
to create a disk set. </para><para>Use the <command>metaset</command> <option>M</option>command to create a multi-owner disk set.</para>
</entry><entry><para><olink targetptr="addtasks-10742" remap="internal">How to Create a Disk Set</olink></para>
</entry>
</row><row><entry><para>Add disks to a disk set</para>
</entry><entry><para>Use the Solaris Volume Manager GUI or the <command>metaset</command> command
to add disks to a disk set. </para>
</entry><entry><para><olink targetptr="addtasks-42054" remap="internal">How to Add Disks to a Disk Set</olink></para>
</entry>
</row><row><entry><para>Add a host to a disk set </para>
</entry><entry><para>Use the Solaris Volume Manager GUI or the <command>metaset</command> command
to add a host to a disk set. </para>
</entry><entry><para><olink targetptr="tasks-disksets-18" remap="internal">How to Add Another Host to a Disk
Set</olink></para>
</entry>
</row><row><entry><para>Create Solaris Volume Manager volumes in a disk set</para>
</entry><entry><para>Use the Solaris Volume Manager GUI or the <command>metainit</command> command
to create volumes in a disk set. </para>
</entry><entry><para><olink targetptr="tasks-disksets-24" remap="internal">How to Create Solaris Volume Manager
Components in a Disk Set</olink></para>
</entry>
</row><row><entry><para>Check the status of a disk set</para>
</entry><entry><para>Use the Solaris Volume Manager GUI, or use the <command>metaset</command> command
to check the status of a disk set. </para>
</entry><entry><para><olink targetptr="maintaintasksnew-23499" remap="internal">How to Check the Status of
a Disk Set</olink></para>
</entry>
</row><row><entry><para>Remove disks from a disk set</para>
</entry><entry><para>Use the Solaris Volume Manager GUI or the <command>metaset</command> command
to remove disks from a disk set. </para>
</entry><entry><para><olink targetptr="tasks-disksets-67" remap="internal">How to Delete Disks From a Disk
Set</olink></para>
</entry>
</row><row><entry><para>Take a disk set</para>
</entry><entry><para>Use the Solaris Volume Manager GUI or the <command>metaset</command> command
to take a disk set. </para>
</entry><entry><para><olink targetptr="tasks-disksets-3" remap="internal">How to Take a Disk Set</olink></para>
</entry>
</row><row><entry><para>Release a disk set</para>
</entry><entry><para>Use the Solaris Volume Manager GUI or the <command>metaset</command> command
to release a disk set. </para>
</entry><entry><para><olink targetptr="tasks-disksets-6" remap="internal">How to Release a Disk Set</olink></para>
</entry>
</row><row><entry><para>Delete a host from a disk set</para>
</entry><entry><para>Use the Solaris Volume Manager GUI or the <command>metaset</command> command
to delete hosts from a disk set. </para>
</entry><entry><para><olink targetptr="tasks-disksets-71" remap="internal">How to Delete a Host or Disk Set</olink></para>
</entry>
</row><row><entry><para>Delete a disk set</para>
</entry><entry><para>Use the Solaris Volume Manager GUI or the <command>metaset</command> command
to delete the last host from a disk set, thus deleting the disk set.</para>
</entry><entry><para><olink targetptr="tasks-disksets-71" remap="internal">How to Delete a Host or Disk Set</olink></para>
</entry>
</row><row><entry><para>Import a disk set</para>
</entry><entry><para>Use the <command>metaimport</command> 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.</para>
</entry><entry><para><olink targetptr="efnri" remap="internal">Importing Disk Sets</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="tasks-disksets-32"><title>Creating Disk Sets</title><task id="addtasks-10742"><title>How to Create a Disk Set</title><taskprerequisites><para>Check <olink targetptr="egjyp" remap="internal">Guidelines for Working With Disk Sets</olink>.</para>
</taskprerequisites><procedure><step id="tasks-metadevices-step-65a"><para>To create a disk set, use one
of the following methods:</para><itemizedlist><listitem><para>From the Enhanced Storage tool within the Solaris Management Console,  open the Disk Sets node. Choose Action&rArr;Create
Disk Set. Then, follow the instructions in the wizard. For more information,
see the online help.</para>
</listitem><listitem><para>To create a disk set from scratch from the command line, use
the following form of the <command>metaset</command> command:</para><screen># <userinput>metaset -s <replaceable>diskset-name</replaceable> -a -h -M <replaceable>hostname</replaceable></userinput></screen><variablelist><varlistentry><term><option>s</option> <replaceable>diskset-name</replaceable></term><listitem><para>Specifies the name of a disk set on which the <command>metaset</command> command
will work.</para>
</listitem>
</varlistentry><varlistentry><term><option>a</option></term><listitem><para>Adds hosts to the named disk set. Solaris Volume Manager supports
up to four hosts per disk set.</para>
</listitem>
</varlistentry><varlistentry><term><option>M</option></term><listitem><para>Specifies that the disk set being created is a multi-owner
disk set.</para>
</listitem>
</varlistentry><varlistentry><term><option>h</option> <replaceable>hostname</replaceable></term><listitem><para>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 <replaceable>hostname</replaceable>. <replaceable>hostname</replaceable> is the same name found in the <filename>/etc/nodename</filename> file.</para>
</listitem>
</varlistentry>
</variablelist><para>See the <olink targetdoc="refman1m" targetptr="metaset-1m" remap="external"><citerefentry><refentrytitle>metaset</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page for more information.</para>
</listitem>
</itemizedlist>
</step><step id="addtasks-step-194"><para>Check the status of the new disk set.</para><screen># <userinput>metaset</userinput></screen>
</step>
</procedure><example id="egjvp"><title>Creating a Disk Set</title><para>In the following example, you create a shared disk set called <filename>blue</filename>, from the host <filename>host1</filename>. The <command>metaset</command> 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.</para><screen># <userinput>metaset -s blue -a -h host1</userinput>              
# <userinput>metaset</userinput>
Set name = blue, Set number = 1

Host                Owner
  host1                </screen>
</example><example id="eqqeg"><title>Creating a Multi-Owner Disk Set</title><para>In the following example, you create a multi-owner disk set called <filename>red</filename>. The first line of the output from the <command>metaset</command> command
displays &ldquo;Multi-owner,&rdquo; indicating that the disk set is a multi-owner
disk set.</para><screen># <userinput>metaset -s red -a -M -h nodeone</userinput>
# <userinput>metaset -s red</userinput>
Multi-owner Set name = red, Set number = 1, Master = 

Host                Owner          Member
  nodeone                          Yes </screen>
</example>
</task>
</sect1><sect1 id="tasks-disksets-41"><title>Expanding Disk Sets</title><task id="addtasks-42054"><title>How to Add Disks to a Disk Set</title><tasksummary><caution><para>Do not add disks larger than 1Tbyte to disk sets if you expect
to run the Solaris software with a 32&ndash;bit kernel or if you expect to
use a version of the Solaris OS prior to the Solaris 9 4/03 release. See <olink targetptr="large-volume-overview" remap="internal">Overview of Multi-Terabyte Support in Solaris
Volume Manager</olink> for more information about multi-terabyte volume support
in Solaris Volume Manager.</para>
</caution><para>Only disks that meet the following conditions can be added to a disk
set:</para><itemizedlist><listitem><para>The disk must not be in use in a volume or hot spare pool.</para>
</listitem><listitem><para>The disk must not contain a state database replica.</para>
</listitem><listitem><para>The disk must not be currently mounted, swapped on, or otherwise
opened for use by an application.</para>
</listitem>
</itemizedlist>
</tasksummary><taskprerequisites><para>Check <olink targetptr="egjyp" remap="internal">Guidelines for Working With Disk Sets</olink>.</para>
</taskprerequisites><procedure><step id="tasks-disksets-step-63"><para>To add disks to a disk set, use one
of the following methods:</para><itemizedlist><listitem><para>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.</para>
</listitem><listitem><para>To add disks to a disk set from the command line, use the
following form of the <command>metaset</command> command:</para><screen># <userinput>metaset -s <replaceable>diskset-name</replaceable> -a <replaceable>disk-name</replaceable></userinput></screen><variablelist><varlistentry><term><option>s</option> <replaceable>diskset-name</replaceable></term><listitem><para>Specifies the name of a disk set on which the <command>metaset</command> command
will work.</para>
</listitem>
</varlistentry><varlistentry><term><option>a</option></term><listitem><para>Adds disks to the named disk set.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>disk-name</replaceable></term><listitem><para>Specifies the disks to add to the disk set. disk names are
in the form <literal>c</literal><replaceable>x</replaceable><literal>t</literal><replaceable>x</replaceable><literal>d</literal><replaceable>x</replaceable><literal></literal>.
N The &ldquo;s<replaceable>x</replaceable>&rdquo; slice identifiers are not
included when adding a disk to a disk set. </para>
</listitem>
</varlistentry>
</variablelist><para>See the <olink targetdoc="refman1m" targetptr="metaset-1m" remap="external"><citerefentry><refentrytitle>metaset</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink>man
page for more information.</para>
</listitem>
</itemizedlist><para>The first host to add a disk to a disk set becomes the owner of the
disk set.</para><caution><para>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.</para>
</caution>
</step><step id="addtasks-step-199"><para>Verify the status of the disk set and disks.</para><screen># <userinput>metaset</userinput></screen>
</step>
</procedure><example id="egjwj"><title>Adding a Disk to a Disk Set</title><screen># <userinput>metaset -s blue -a c1t6d0</userinput>
# <userinput>metaset</userinput>
Set name = blue, Set number = 1

Host                Owner
  host1            Yes 

Drive               Dbase
  c1t6d0             Yes </screen><para>In this example, the host name is <filename>host1</filename>. The shared
disk set is <filename>blue</filename>. Only the disk, <literal>c1t6d0</literal>,
has been added to the disk set <filename>blue</filename>.</para><para>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:</para><screen># <userinput>metaset -s blue -a c1t6d0 c2t6d0</userinput></screen>
</example>
</task><task id="tasks-disksets-18"><title>How to Add Another Host to a Disk Set</title><tasksummary><para>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.</para>
</tasksummary><taskprerequisites><para>Check <olink targetptr="egjyp" remap="internal">Guidelines for Working With Disk Sets</olink>.</para>
</taskprerequisites><procedure><step id="tasks-disksets-step-65"><para>To add a host to a disk set, use one
of the following methods:</para><itemizedlist><listitem><para>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.</para>
</listitem><listitem><para>To add hosts to a disk set from the command line, use the
following form of the <command>metaset</command> command:</para><screen># <userinput>metaset -s <replaceable>diskset-name</replaceable> -a -h <replaceable>hostname</replaceable></userinput></screen><variablelist><varlistentry><term><option>s</option> <replaceable>diskset-name</replaceable></term><listitem><para>Specifies the name of a disk set on which to add the host.</para>
</listitem>
</varlistentry><varlistentry><term><option>a</option></term><listitem><para>Adds the host to the named disk set.</para>
</listitem>
</varlistentry><varlistentry><term><option>h</option> <replaceable>hostname</replaceable></term><listitem><para>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 <filename>/etc/nodename</filename> file.</para>
</listitem>
</varlistentry>
</variablelist><para>See the <olink targetdoc="refman1m" targetptr="metaset-1m" remap="external"><citerefentry><refentrytitle>metaset</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page for more information.</para>
</listitem>
</itemizedlist>
</step><step id="tasks-disksets-step-22"><para>Verify that the host has been added
to the disk set.</para><screen># <userinput>metaset</userinput></screen>
</step>
</procedure><example id="egjvy"><title>Adding Another Host to a Disk Set</title><screen># <userinput>metaset -s blue -a -h host2</userinput>
# <userinput>metaset</userinput>
Set name = blue, Set number = 1
 
Host                Owner
  host1                Yes
  host2
 
Drive               Dbase
  c1t6d0             Yes 
  c2t6d0             Yes </screen><para>This example shows the addition of the host, <filename>host2</filename>,
to the disk set, <filename>blue</filename>.</para>
</example>
</task><task id="tasks-disksets-24"><title>How to Create Solaris Volume Manager Components
in a Disk Set</title><tasksummary><para>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.</para>
</tasksummary><procedure remap="single-step"><step id="tasks-disksets-step-58"><para>To create volumes or other Solaris Volume Manager components
within a disk set, use one of the following methods:</para><itemizedlist><listitem><para>From the Enhanced Storage tool within the Solaris Management Console, open the Volumes, State Database Replicas,
or Hot Spare Pools node. Choose Action&rArr;Create. Then follow the instructions
in the wizard. For more information, see the online help.</para>
</listitem><listitem><para>Use the same command line utilities with the same basic syntax
to create volumes, state database replicas, or hot spare pools. However, add <option>s</option> <replaceable>disk-set</replaceable> immediately after the command
for every command. </para><screen># <userinput><replaceable>command</replaceable> -s <replaceable>disk-set</replaceable></userinput></screen>
</listitem>
</itemizedlist>
</step>
</procedure><example id="egjwe"><title>Creating Solaris Volume Manager Volumes in a Disk Set</title><para>The following example shows the creation of a mirror, <filename>d10</filename>,
in the disk set, <filename>blue</filename>. The mirror consists of submirrors
(RAID-0 volumes), <filename>d11</filename> and <filename>d12</filename>.</para><screen># <userinput>metainit -s blue d11 1 1 c1t6d0s0</userinput>
blue/d11: Concat/Stripe is setup
# <userinput>metainit -s blue d12 1 1 c2t6d0s0</userinput>
blue/d12: Concat/Stripe is setup
# <userinput>metainit -s blue d10 -m d11</userinput>           
blue/d10: Mirror is setup
# <userinput>metattach -s blue d10 d12</userinput>
blue/d10: submirror blue/d12 is attached

# <userinput>metastat -s blue</userinput>
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                </screen>
</example>
</task>
</sect1><sect1 id="tasks-disksets-45"><title>Maintaining Disk Sets</title><task id="maintaintasksnew-23499"><title>How to Check the Status of a Disk
Set</title><procedure remap="single-step"><step id="tasks-disksets-step-59a"><para>Use one of the following methods
to check the status of a disk set.</para><itemizedlist><listitem><para>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.</para>
</listitem><listitem><para>Use the following form of the <command>metaset</command> command
to view disk set status.</para><screen># <userinput>metaset -s <replaceable>diskset-name</replaceable></userinput></screen><para>See the <olink targetdoc="refman1m" targetptr="metaset-1m" remap="external"><citerefentry><refentrytitle>metaset</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page for more information.</para><note><para>Disk set ownership is only shown on the owning host.</para>
</note>
</listitem>
</itemizedlist>
</step>
</procedure><example id="egjvu"><title>Checking the Status of a Specified Disk Set</title><para>The following example shows the <command>metaset</command> command with
the <option>s</option> option followed by the name of the disk set, <filename>blue</filename>. The output from this command displays status information for
that disk set. The output indicates that <literal>host1</literal> is the disk
set owner. The <command>metaset</command> command also displays the disks
in the disk set.</para><screen>red# <userinput>metaset -s blue</userinput>


Set name = blue, Set number = 1

Host                Owner
  host1             Yes 

Drive               Dbase
  c1t6d0             Yes 
  c2t6d0             Yes </screen><para>The <command>metaset</command> command by itself displays the
status of all disk sets.</para>
</example>
</task><task id="tasks-disksets-67"><title>How to Delete Disks From a Disk Set</title><procedure><step><para>To delete a disk from a disk set, use one of the following methods:</para><itemizedlist><listitem><para>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.</para>
</listitem><listitem><para>Use the following form of the <command>metaset</command> command
to delete a disk from a disk set.</para><screen># <userinput>metaset -s <replaceable>diskset-name</replaceable> -d <replaceable>disk-name</replaceable></userinput></screen><variablelist><varlistentry><term><option>s</option> <replaceable>diskset-name</replaceable></term><listitem><para>Specifies the name of a disk set on which to delete the disk.</para>
</listitem>
</varlistentry><varlistentry><term><option>d</option> <replaceable>disk-name</replaceable></term><listitem><para>Specifies the disks to delete from the disk set. Disk names
are in the form <literal>c</literal><replaceable>x</replaceable><literal>t</literal><replaceable>x</replaceable><literal>d</literal><replaceable>x</replaceable>. The &ldquo;s<replaceable>x</replaceable>&rdquo; slice identifiers are not included when deleting a
disk from a disk set.</para>
</listitem>
</varlistentry>
</variablelist><para>See the <olink targetdoc="refman1m" targetptr="metaset-1m" remap="external"><citerefentry><refentrytitle>metaset</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page for more information.</para>
</listitem>
</itemizedlist>
</step><step id="tasks-disksets-step-69"><para>Verify that the disk has been deleted
from the disk.</para><screen># <userinput>metaset -s <replaceable>diskset-name</replaceable></userinput></screen><note><para>To delete a disk set, you must first delete all the disks from
the disk set.</para>
</note>
</step>
</procedure><example id="egjwv"><title>Deleting a Disk from a Disk Set</title><para>The following example shows the deletion of the disk, <literal>c1t6d0</literal> from
the disk set, <filename>blue</filename>.</para><screen>host1# <userinput>metaset -s blue -d c1t6d0</userinput>
host1# <userinput>metaset -s blue</userinput>
 
Set name = blue, Set number = 1

Host                Owner
  host1            
	host2 

Drive               Dbase
  c2t6d0             Yes 
 </screen>
</example>
</task><task id="tasks-disksets-3"><title>How to Take a Disk Set</title><tasksummary><note><para>This option is not available for multi-owner disk sets.</para>
</note>
</tasksummary><procedure remap="single-step"><step id="tasks-disksets-step-60"><para>Use one of the following methods to
take a disk set:</para><itemizedlist><listitem><para>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.</para>
</listitem><listitem><para>Use the following form of the <command>metaset</command> command.</para><screen># <userinput>metaset -s <replaceable>diskset-name</replaceable> -t -f </userinput></screen>
</listitem>
</itemizedlist><variablelist><varlistentry><term><option>s</option> <replaceable>diskset-name</replaceable></term><listitem><para>Specifies the name of a disk set to take.</para>
</listitem>
</varlistentry><varlistentry><term><option>t</option></term><listitem><para>Specifies to take the disk set.</para>
</listitem>
</varlistentry><varlistentry><term><option>f</option></term><listitem><para>Specifies to take the disk set forcibly.</para>
</listitem>
</varlistentry>
</variablelist><para>See the <olink targetdoc="refman1m" targetptr="metaset-1m" remap="external"><citerefentry><refentrytitle>metaset</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page for more information.</para><para>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. </para><para>The
default behavior of the <command>metaset</command> 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 <option>f</option> 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.</para><note><para>Disk set ownership is only shown on the owning host.</para>
</note>
</step>
</procedure><example id="egjxa"><title>Taking a Disk Set</title><para>In the following example, the host, <filename>host1</filename>, communicates
with the host, <filename>host2</filename>. This communication ensures that
the host <filename>host2</filename> has released the disk set before the host, <filename>host1</filename>, attempts to take the disk set.</para><screen>host1# <userinput>metaset</userinput>
...
Set name = blue, Set number = 1
 
Host                Owner
  host1
  host2
...
host1# <userinput>metaset -s blue -t</userinput>
host2# <userinput>metaset</userinput>
...
Set name = blue, Set number = 1
 
Host                Owner
  host1                Yes
  host2
...</screen><para>If <filename>host2</filename> owned the disk set, <filename>blue</filename>,
the &ldquo;Owner&rdquo; column in the preceding output would still have been
blank. The <command>metaset</command> command only shows whether the host
issuing the command owns the disk set.</para>
</example><example id="egjxb"><title>Taking a Disk Set Forcibly</title><para>In the following example, the host that is taking the disk set
does not communicate with the other host. Instead, the <option>f</option> 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.</para><screen># <userinput>metaset -s blue -t -f</userinput></screen>
</example>
</task><task id="tasks-disksets-6"><title>How to Release a Disk Set</title><tasksummary><para>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 <literal>c*t*d*</literal> names.</para><note><para>This option is not available for multi-owner disk sets.</para>
</note>
</tasksummary><taskprerequisites><para>Check <olink targetptr="egjyp" remap="internal">Guidelines for Working With Disk Sets</olink>.</para>
</taskprerequisites><procedure><step id="tasks-disksets-step-75"><para>Use one of the following methods to
release a disk set:</para><itemizedlist><listitem><para>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.</para>
</listitem><listitem><para>To release ownership of the disk set, use the following form
of the <command>metaset</command> command:</para><screen># <userinput>metaset -s <replaceable>diskset-name</replaceable> -r</userinput></screen><variablelist><varlistentry><term><option>s</option> <replaceable>diskset-name</replaceable></term><listitem><para>Specifies the name of a disk set on which the <command>metaset</command> command
will work.</para>
</listitem>
</varlistentry><varlistentry><term><option>r</option></term><listitem><para>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.</para>
</listitem>
</varlistentry>
</variablelist><para>See the <olink targetdoc="refman1m" targetptr="metaset-1m" remap="external"><citerefentry><refentrytitle>metaset</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page for more information.</para><note><para>Disk set ownership is only shown on the owning host.</para>
</note>
</listitem>
</itemizedlist>
</step><step id="tasks-disksets-step-10"><para>Verify that the disk set has been
released on this host.</para><screen># <userinput>metaset</userinput></screen>
</step>
</procedure><example id="egjwf"><title>Releasing a Disk Set</title><para>The following example shows the release of the disk set, <filename>blue</filename>.
Note that there is no owner of the disk set. Viewing status from the host <filename>host1</filename> could be misleading. A host can only determine if it does
or does not own a disk set. For example, if he host, <filename>host2</filename>,
were to take ownership of the disk set, the ownership would not appear from
the host, <filename>host1</filename>. Only the host, <filename>host2</filename>,
would display that <filename>host2</filename> has ownership of the disk set.</para><screen>host1# <userinput>metaset -s blue -r</userinput>
host1# <userinput>metaset -s blue</userinput>
 
Set name = blue, Set number = 1

Host                Owner
  host1            
	host2

Drive               Dbase
  c1t6d0             Yes 
  c2t6d0             Yes 
 </screen>
</example>
</task><task id="tasks-disksets-71"><title>How to Delete a Host or Disk Set</title><tasksummary><para>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.</para>
</tasksummary><procedure><step id="tasks-disksets-step-76"><para>Use one of the following methods to
delete a host from a disk set, or to delete a disk set:</para><itemizedlist><listitem><para>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.</para>
</listitem><listitem><para>To delete the host use the following form of the <command>metaset</command> command. </para><screen><command>metaset <option>s</option> <replaceable>diskset-name</replaceable> <option>d</option> <option>h</option> <replaceable>hostname</replaceable></command></screen><variablelist><varlistentry><term><option>s</option> <replaceable>diskset-name</replaceable></term><listitem><para>Specifies the name of a disk set on which the <command>metaset</command> command
will work.</para>
</listitem>
</varlistentry><varlistentry><term><option>d</option></term><listitem><para>Deletes a host from a disk set.</para>
</listitem>
</varlistentry><varlistentry><term><option>h</option> <replaceable>hostname</replaceable></term><listitem><para>Specifies the name of the host to delete.</para>
</listitem>
</varlistentry>
</variablelist><para>Use the same form of the preceding <command>metaset</command> 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.</para><para>See the <olink targetdoc="refman1m" targetptr="metaset-1m" remap="external"><citerefentry><refentrytitle>metaset</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page for more information.</para>
</listitem>
</itemizedlist>
</step><step id="tasks-disksets-step-73"><para>Verify that the host has been deleted
from the disk set by using the <command>metaset</command> command. Note that
only the current (owning) host is shown. Other hosts have been deleted.</para><screen># <userinput>metaset -s <replaceable>disk-set</replaceable></userinput></screen>
</step>
</procedure><example id="eyprk"><title>Deleting a Host From a Disk Set</title><para>The following example shows the deletion of the host, <filename>host2</filename> from
the disk set, <filename>blue</filename>.</para><screen># <userinput>metaset -s blue</userinput>
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</screen><screen># <userinput>metaset -s blue -d -h host2</userinput></screen><screen># <userinput>metaset -s blue</userinput>
Set name = blue, Set number = 1

Host                Owner
  host1            Yes 

Drive               Dbase
  c1t2d0             Yes 
  c1t3d0             Yes 
  c1t4d0             Yes 
  c1t5d0             Yes 
  c1t6d0             Yes 
  c2t1d0             Yes</screen>
</example><example id="egjwl"><title>Deleting the Last Host from a Disk Set</title><para>The following example shows the deletion of the last host from the disk
set, <filename>blue</filename>.</para><screen>host1# <userinput>metaset -s blue -d -h host1</userinput>
host1# <userinput>metaset -s blue</userinput>
 
metaset: host: setname "blue": no such set </screen>
</example>
</task>
</sect1><sect1 id="efnri"><title>Importing Disk Sets</title><blockquote><para>importing a disk set</para>
</blockquote><para>The <command>metaimport</command> command allows you to import disk
sets from one system to another.</para><task id="eoqsa"><title>How to Print a Report on Disk Sets Available for Import</title><procedure><step><para>Become superuser.</para>
</step><step><para>Obtain a report on disk sets available for import.</para><screen># <userinput>metaimport -r -v</userinput></screen><variablelist><varlistentry><term><option>r</option></term><listitem><para>Provides a report of the unconfigured disk sets available
for import on the system.</para>
</listitem>
</varlistentry><varlistentry><term><option>v</option></term><listitem><para>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.</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure><example id="eoqrq"><title>Reporting on Disk Sets Available for Import</title><para>The following examples show how to print a report on disk sets available
for import. The output from the <command>metaimport</command> command
distinguishes between regular disk sets and replicated disk sets.</para><screen># <userinput>metaimport -r</userinput>
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 &lt;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 &lt;newsetname> c1t12d0

Number of disksets eligible for import: 2

# <userinput>metaimport -r -v c1t2d0</userinput>
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 &lt;newsetname> c1t2d0</screen><para>The following output of <command>metaimport</command> <option>r</option> reports the following conditions in the system's
disk set configuration.</para><itemizedlist><listitem><para>A partial disk set in which one or more disks are unavailable</para>
</listitem><listitem><para>Disk conflicts where the disk is detected in more than one
disk set</para>
</listitem><listitem><para>A replicated disk set</para>
</listitem><listitem><para>The recommended disk set to import</para><note><para>A disk can also be reported as unavailable and in conflict at
the same time.</para>
</note>
</listitem>
</itemizedlist><screen># <userinput>metaimport -r</userinput>

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 &lt;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 &lt;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 &lt;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
#</screen><para>Importing a disk set is blocked if the disk set has disk conflicts.
The preceding example recommends that <literal>c1t2d0</literal> 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:</para><screen># <userinput>metaimport -f -s &lt;setname> c1t3d0</userinput>

  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 
#</screen>
</example>
</task><task id="eoqrs"><title>How to Import a Disk Set From One System to Another
System</title><procedure><step><para>Become superuser.</para>
</step><step><para>Verify that a disk set is available for import.</para><screen># <userinput>metaimport -r -v</userinput></screen>
</step><step><para>Import an available disk set.</para><screen># <userinput>metaimport -s <replaceable>diskset-name</replaceable> <replaceable>disk-name</replaceable></userinput></screen><variablelist><varlistentry><term><option> s</option> <replaceable>diskset-name</replaceable></term><listitem><para>Specifies the name of the disk set being created.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>disk-name</replaceable></term><listitem><para>Identifies a disk (<literal>c#t#d#</literal>)
containing a state database replica from the disk set being imported.</para>
</listitem>
</varlistentry>
</variablelist>
</step><step><para>Verify that the disk set has been imported.</para><screen># <userinput>metaset -s <replaceable>diskset-name</replaceable></userinput></screen>
</step>
</procedure><example id="eoqrw"><title>Importing a Disk Set</title><para>The following example shows how to import a disk set.</para><screen># <userinput>metaimport -s red c1t2d0</userinput>
Drives in diskset including disk c1t2d0:
  c1t2d0
  c1t3d0
  c1t8d0
# <userinput>metaset -s red</userinput>


Set name = red, Set number = 1

Host                Owner
  host1            Yes

Drive    Dbase

c1t2d0   Yes  

c1t3d0   Yes  

c1t8d0   Yes  </screen>
</example>
</task>
</sect1>
</chapter>