<chapter id="tasks-softpart-1"><title>Soft
Partitions (Tasks)</title><highlights><para>This chapter provides information about performing tasks that are associated
with Solaris Volume Manager soft partitions. For conceptual information regarding soft
partitions, see <olink targetptr="about-softpart-1" remap="internal">Chapter&nbsp;12, Soft
Partitions (Overview)</olink>.</para>
</highlights><sect1 id="tasks-softpart-2"><title>Soft Partitions (Task Map)</title><para>The following task map identifies the procedures that are needed to
manage Solaris Volume Manager soft partitions. </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 soft partitions</para>
</entry><entry><para>Use the Solaris Volume Manager GUI or the <command>metainit</command> command
to create soft partitions.</para>
</entry><entry><para><olink targetptr="tasks-softpart-3" remap="internal">How to Create a Soft Partition</olink></para>
</entry>
</row><row><entry><para>Check the status of soft partitions</para>
</entry><entry><para>Use the Solaris Volume Manager GUI or the <command>metastat</command> command
to check the status of soft partitions.</para>
</entry><entry><para><olink targetptr="tasks-softpart-16" remap="internal">How to Check the Status of a Soft
Partition</olink></para>
</entry>
</row><row><entry><para>Expand soft partitions</para>
</entry><entry><para>Use the Solaris Volume Manager GUI or the <command>metattach</command> command
to expand soft partitions.</para>
</entry><entry><para><olink targetptr="tasks-softpart-19" remap="internal">How to Expand a Soft Partition</olink></para>
</entry>
</row><row><entry><para>Remove soft partitions</para>
</entry><entry><para>Use the Solaris Volume Manager GUI or the <command>metaclear</command> command
to remove soft partitions.</para>
</entry><entry><para><olink targetptr="tasks-softpart-25" remap="internal">How to Remove a Soft Partition</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="tasks-softpart-2a"><title>Creating Soft Partitions</title><task id="tasks-softpart-3"><title>How to Create a Soft Partition</title><taskprerequisites><para>Check the <olink targetptr="about-softpart-8" remap="internal">Configuration Guidelines
for Soft Partitions</olink>.</para>
</taskprerequisites><procedure remap="single-step"><step id="tasks-softpart-step-3"><para>Use one of the following methods to
create a soft partition:</para><itemizedlist><listitem><para>From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node. Choose Action&rArr;Create
Volume. Then, follow the instructions in the wizard. For more information,
see the online help.</para>
</listitem><listitem><para>To create a soft partition, use the following form of the <command>metainit</command> command:</para><screen># <userinput>metainit [-s diskset] <replaceable>soft-partition</replaceable> -p [-e] <replaceable>component</replaceable> <replaceable>size</replaceable></userinput></screen><variablelist><varlistentry><term><option>s</option><literal>diskset</literal></term><listitem><para>Specifies which disk set is being used. If <literal>-s</literal> is
not specified, the local (default) disk set is used.</para>
</listitem>
</varlistentry><varlistentry><term><option>p</option></term><listitem><para>Specifies that a soft partition be configured.</para>
</listitem>
</varlistentry><varlistentry><term><option>e</option></term><listitem><para>Specifies that the entire disk should be reformatted. Formatting
the disk provides a slice 0, which takes most of the disk. Formatting the
disk also provides a slice 7 of a minimum of 4 Mbytes in size. Slice 7 contains
a state database replica.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>soft-partition</replaceable></term><listitem><para>Specifies the name of the soft partition. The name is of the
form <literal>d</literal><replaceable>nnn</replaceable><literal></literal>,
where <replaceable>nnn</replaceable> is a number in a range between 0 and
8192.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>component</replaceable></term><listitem><para>Specifies the disk, slice, or logical volume from which to
create the soft partition. All <emphasis>existing data on the component is
destroyed</emphasis> because the soft partition headers are written at the
beginning of the component.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>size</replaceable></term><listitem><para>Specifies the size of the soft partition. The size is specified
as a number followed by one of the following:</para><itemizedlist><listitem><para><literal>M</literal> or <literal>m</literal> for megabytes</para>
</listitem><listitem><para><literal>G</literal> or <literal>g</literal> for gigabytes</para>
</listitem><listitem><para><literal>T</literal> or <literal>t</literal> for terabytes</para>
</listitem><listitem><para><literal>B</literal> or <literal>b</literal> for blocks (sectors)</para>
</listitem>
</itemizedlist>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</itemizedlist><para>See the following examples and the <olink targetdoc="refman1m" targetptr="metainit-1m" remap="external"><citerefentry><refentrytitle>metainit</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page for more information.</para>
</step>
</procedure><example id="egjvn"><title>Creating a Soft Partition</title><para>In the following example, a 4-Gbyte soft partition called <filename>d20</filename> is created on <literal>c1t3d0s2</literal>.</para><screen># <userinput>metainit d20 -p c1t3d0s2 4g</userinput></screen>
</example><example id="egjvl"><title>Taking a Whole Disk for Soft Partitions</title><para>The following example creates a soft partition and formats disk <literal>c1t2d0</literal>. This action destroys any data on that disk and creates a
new soft partition on slice 0.</para><screen># <userinput>metainit d7 -p -e c1t2d0 1G</userinput></screen>
</example>
</task>
</sect1><sect1 id="tasks-softpart-5"><title>Maintaining Soft Partitions</title><para>Maintaining soft partitions is no different from maintaining other logical
volumes.</para><task id="tasks-softpart-16"><title>How to Check the Status of a Soft Partition</title><taskprerequisites><para>Read the <olink targetptr="about-softpart-8" remap="internal">Configuration Guidelines
for Soft Partitions</olink>.</para>
</taskprerequisites><procedure remap="single-step"><step id="tasks-softpart-step-35"><para>Use one of the following methods to
check the status of a soft partition:</para><itemizedlist><listitem><para>From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node. Choose the soft
partition that you want to monitor. Then, choose Action&rArr;Properties. Follow
the onscreen instructions . For more information, see the online help.</para>
</listitem><listitem><para>To view the existing configuration, use the following form
of the <command>metastat</command> command:</para><screen># <userinput>metastat <replaceable>soft-partition</replaceable></userinput></screen><variablelist><varlistentry><term><replaceable>soft-partition</replaceable></term><listitem><para>Specifies the name of the partition you want to check.</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</itemizedlist>
</step>
</procedure><example id="egjvo"><title>Checking the Status of a Soft Partition</title><para>In the following example, the status of soft partition <literal>d1</literal> is
checked. This soft partition includes two extents and is built on the RAID-1
volume <literal>d100</literal>.</para><screen># <userinput>metastat d1</userinput>
d1: soft partition 
    component:  d100 
    state: OKAY 
    size:  42674285 blocks 
             Extent              Start Block                Block Count 
             0                          10234                   40674285 
             1                       89377263                    2000000 
d100: Mirror 
    Submirror 0: d10 
    State: OKAY 
    Read option: roundrobin (default) 
    Write option: parallel (default) 
    Size: 426742857 blocks 

d10: Submirror of d100 
    State:  OKAY 
    Hot spare pool: hsp002 
    Size: 426742857 blocks 
    Stripe 0: (interlace: 32 blocks) 
        Device              Start Block  Dbase State        Hot Spare 
        c3t3d0s0                  0             No    Okay 
  </screen>
</example>
</task><task id="tasks-softpart-19"><title>How to Expand a Soft Partition</title><tasksummary><para>When no other logical volumes have been built on a soft partition, you
can add space to the soft partition. Free space is located and used to extend
the partition.  Existing data is not moved. </para><note><para>If a soft partition has been used to create another volume (for
example, if it is a component of a RAID-0 volume), the soft partition cannot
be expanded. In most cases, the same objective (providing more space for the
device that contains the soft partition) can be achieved by concatenating
other volumes onto the containing device. See <olink targetptr="tasks-metadevices-27" remap="internal">Expanding Storage Capacity</olink> for more information.</para>
</note>
</tasksummary><taskprerequisites><para>Read the <olink targetptr="about-softpart-8" remap="internal">Configuration Guidelines
for Soft Partitions</olink>.</para>
</taskprerequisites><procedure remap="single-step"><step id="tasks-softpart-step-38"><para>Use one of the following methods to
expand a soft partition:</para><itemizedlist><listitem><para>From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node. Choose the soft
partition that you want to expand, then choose Action&rArr;Properties. Follow
the onscreen instructions. For more information, see the online help.</para>
</listitem><listitem><para>To add space to a soft partition, use the following form of
the <command>metattach</command> command:</para><screen># <userinput>metattach [-s diskset] <replaceable>soft-partition</replaceable> <replaceable>size</replaceable></userinput></screen><variablelist><varlistentry><term><replaceable>diskset</replaceable></term><listitem><para>Specifies the name of the disk set in which the soft partition
exists.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>soft-partition</replaceable></term><listitem><para>Specifies the name of an existing soft partition.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>size</replaceable></term><listitem><para>Specifies the amount of storage space to add.</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</itemizedlist>
</step>
</procedure><example id="egjvk"><title>Expanding a Soft Partition</title><para>The following example shows how to attach space to a soft partition.
The file system is then expanded using the <userinput>growfs</userinput> command
while the soft partition is online and mounted.</para><screen># <userinput>mount /dev/md/dsk/d20 /home2</userinput>
# <userinput>metattach d20 10g</userinput>
# <userinput>growfs -M /home2 /dev/md/rdsk/d20</userinput></screen><para>For more information on the <command>growfs</command> command, see <olink targetptr="tasks-metadevices-41" remap="internal">Expanding a File System Using the growfs
Command</olink>.</para>
</example>
</task><task id="tasks-softpart-25"><title>How to Remove a Soft Partition</title><taskprerequisites><para>Read the <olink targetptr="about-softpart-8" remap="internal">Configuration Guidelines
for Soft Partitions</olink>.</para>
</taskprerequisites><procedure remap="single-step"><step id="tasks-softpart-step-44"><para>Use one of the following methods to
delete a soft partition:</para><itemizedlist><listitem><para>From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node. Choose the soft
partition that you want to delete. Then choose Action&rArr;Properties. Follow
the onscreen instructions. For more information, see the online help.</para>
</listitem><listitem><para>To delete a soft partition, use one of the following forms
of the <command>metaclear</command> command:</para><screen># <userinput>metaclear [-s diskset] <replaceable>component</replaceable></userinput>
# <userinput>metaclear [-s diskset] -r <replaceable>soft-partition</replaceable></userinput>
# <userinput>metaclear [-s diskset] -p <replaceable>component</replaceable></userinput></screen><variablelist><varlistentry><term><replaceable>diskset</replaceable></term><listitem><para>Specifies the disk set in which the soft partition exists.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>soft-partition</replaceable></term><listitem><para>Specifies the soft partition to delete.</para>
</listitem>
</varlistentry><varlistentry><term><option>r</option></term><listitem><para>Specifies to recursively delete logical volumes, but not volumes
on which others depend.</para>
</listitem>
</varlistentry><varlistentry><term><option>p</option></term><listitem><para>Specifies to purge all soft partitions on the specified component,
except those soft partitions that are open.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>component</replaceable></term><listitem><para>Specifies the component from which to clear all of the soft
partitions.</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</itemizedlist>
</step>
</procedure><example id="egjvm"><title>Removing a Soft Partition</title><para>This example shows how to delete all soft partitions on <literal>c1t4d2s0</literal>.</para><screen># <userinput>metaclear -p c1t4d2s0</userinput></screen>
</example>
</task>
</sect1>
</chapter>