<chapter id="tasks-metadevices-1"><title>RAID-0
(Stripe and Concatenation) Volumes (Tasks)</title><highlights><para>This chapter contains information about tasks that are related to RAID-0
volumes. For information about related concepts, see <olink targetptr="about-metadevices-22802" remap="internal">Chapter&nbsp;8, RAID-0 (Stripe and Concatenation)
Volumes (Overview)</olink>.</para>
</highlights><sect1 id="tasks-metadevices-73"><title>RAID-0 Volumes (Task Map)</title><para>The following task map identifies the procedures that are needed to
manage Solaris Volume Manager RAID-0 volumes. </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 RAID-0 (stripe) volumes</para>
</entry><entry><para>Use the Solaris Volume Manager GUI or the <command>metainit</command> command
to create a new volume. </para>
</entry><entry><para><olink targetptr="tasks-metadevices-21" remap="internal">How to Create a RAID-0 (Stripe)
Volume</olink></para>
</entry>
</row><row><entry><para>Create RAID-0 (concatenation) volumes</para>
</entry><entry><para>Use the Solaris Volume Manager GUI or the <command>metainit</command> command
to create a new volume. </para>
</entry><entry><para><olink targetptr="addtasks-17877" remap="internal">How to Create a RAID-0 (Concatenation)
Volume</olink></para>
</entry>
</row><row><entry><para>Expand storage space</para>
</entry><entry><para>Use the Solaris Volume Manager GUI or the <command>metainit</command> command
to expand an existing file system. </para>
</entry><entry><para><olink targetptr="tasks-metadevices-4" remap="internal">How to Expand Storage Capacity
for Existing Data</olink></para>
</entry>
</row><row><entry><para>Expand an existing RAID-0 volume</para>
</entry><entry><para>Use the Solaris Volume Manager GUI or the <command>metattach</command> command
to expand an existing volume. </para>
</entry><entry><para><olink targetptr="maintaintasksnew-36568" remap="internal">How to Expand an Existing
RAID-0 Volume</olink></para>
</entry>
</row><row><entry><para>Remove a RAID-0 volume</para>
</entry><entry><para>Use the Solaris Volume Manager GUI or the <command>metaclear</command> command
to delete a volume.</para>
</entry><entry><para><olink targetptr="removetasks-41513" remap="internal">How to Remove a RAID-0 Volume</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="tasks-metadevices-20"><title>Creating RAID-0 (Stripe) Volumes</title><caution><para>Do not create a stripe from an existing file system or data.
Doing so destroys data. To create a stripe from existing data, you must back
up the data, create the stripe volume, and then restore the data to the volume.</para>
</caution><caution><para>Do not create volumes larger than 1Tbyte if you expect to run
the Solaris software with a 32-bit kernel. Additionally, do not create volumes
larger than 1Tbyte 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 large volume support in Solaris Volume Manager.</para>
</caution><task id="tasks-metadevices-21"><title>How to Create a RAID-0 (Stripe) Volume</title><taskprerequisites><para>Check <olink targetptr="addtasks-20933" remap="internal">Prerequisites for Creating Solaris
Volume Manager Components</olink> and <olink targetptr="addtasks-14796" remap="internal">Background
Information for Creating RAID-0 Volumes</olink>.</para>
</taskprerequisites><procedure remap="single-step"><step id="tasks-metadevices-step-23"><para>To create a stripe volume, use
one of the following methods:</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>Use the following form of the <command>metainit</command> command:</para><screen># <userinput>metainit <replaceable>volume-name</replaceable> <replaceable>number-of-stripes</replaceable>
 <replaceable>components-per-stripe</replaceable> 
<replaceable>component-names</replaceable>
[ -i <replaceable>interlace</replaceable>]</userinput></screen><variablelist><varlistentry><term><replaceable>volume-name</replaceable></term><listitem><para>Specifies the name of the volume to create. For information
on naming volumes, see <olink targetptr="basics-34" remap="internal">Volume Names</olink>.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>number-of-stripes</replaceable></term><listitem><para>Specifies the number of stripes to create.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>components-per-stripe</replaceable></term><listitem><para>Specifies the number of components each stripe should have.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>component-names</replaceable></term><listitem><para>Specifies the names of the components that are used. If more
than one component is used, separate each component with a space.</para>
</listitem>
</varlistentry><varlistentry><term><option>i</option> <replaceable>interlace</replaceable></term><listitem><para>Specifies the interlace width to use for the stripe. The interlace
width is a value, followed by either `k' for kilobytes, `m' for  megabytes,
or `b' for blocks. The interlace specified cannot be less than 16 blocks, or greater
than 100 megabytes. The default interlace width is 512 kilobytes.</para>
</listitem>
</varlistentry>
</variablelist><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>
</listitem>
</itemizedlist>
</step>
</procedure><example id="egjya"><title>Creating a RAID&ndash;0 (Stripe) Volume of Three Slices</title><screen># <userinput>metainit d20 1 3 c0t1d0s2 c0t2d0s2 c0t3d0s2</userinput>
d20: Concat/Stripe is setup</screen><para>This example shows the stripe, <filename>d20</filename>, consists
of a single stripe (the number <option role="nodash">1</option>). The stripe
is composed of three slices (the number <option role="nodash">3</option>).
Because no interlace value is specified, the stripe uses the default of 512 Kbytes.
The system confirms that the volume has been set up.  </para>
</example><example id="egjym"><title>Creating a RAID-0 (Stripe) Volume of Two Slices With a 32&ndash;Kbyte
Interlace Value</title><screen># <userinput>metainit d10 1 2 c0t1d0s2 c0t2d0s2 -i 32k</userinput>
d10: Concat/Stripe is setup</screen><para>This example shows the stripe, <filename>d10</filename>, consists of
a single stripe (the number <option role="nodash">1</option>). The stripe
is composed of two slices (the number <option role="nodash">2</option>). The <option>i</option> option sets the interlace value to 32 Kbytes. (The interlace value
cannot be less than 8 Kbytes, nor greater than 100 Mbytes.) The system verifies
that the volume has been set up.</para>
</example><taskrelated role="see-also"><para>To prepare the newly created stripe for a file system, see <olink targetdoc="sagdfs" targetptr="fscreate-96442" remap="external">Chapter 18, <citetitle remap="chapter">Creating UFS, TMPFS, and LOFS File Systems (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Devices and File Systems</citetitle></olink>.
Some applications, such as a database, do not use a file system. These applications
instead use the raw device. The application must have its own way of accessing
the raw device.</para>
</taskrelated>
</task>
</sect1><sect1 id="tasks-metadevices-25"><title>Creating RAID-0 (Concatenation) Volumes</title><task id="addtasks-17877"><title>How to Create a RAID-0 (Concatenation) Volume</title><tasksummary><caution><para>Do not create volumes larger than 1Tbyte if you expect to run
the Solaris software with a 32&ndash;bit kernel. Additionally, do not create
volumes larger than 1 Tbyte 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 volumes in Solaris Volume Manager.</para>
</caution>
</tasksummary><taskprerequisites><para>Check <olink targetptr="addtasks-20933" remap="internal">Prerequisites for Creating Solaris
Volume Manager Components</olink> and <olink targetptr="addtasks-14796" remap="internal">Background
Information for Creating RAID-0 Volumes</olink>.</para>
</taskprerequisites><procedure remap="single-step"><step id="tasks-metadevices-step-58"><para>To create a concatenation volume,
use one of the following methods:</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>Use the following form of the <command>metainit</command> command:</para><screen># <userinput>metainit <replaceable>volume-name</replaceable> <replaceable>number-of-stripes</replaceable>
<replaceable>components-per-stripe</replaceable>
<replaceable>component-names</replaceable></userinput></screen><variablelist><varlistentry><term><replaceable>volume-name</replaceable></term><listitem><para>Specifies the name of the volume to create.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>number-of-stripes</replaceable></term><listitem><para>Specifies the number of stripes to create.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>components-per-concatenation</replaceable></term><listitem><para>Specifies the number of components each concatenation should
have.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>component-names</replaceable></term><listitem><para>Specifies the names of the components that are used. If more
than one component is used, separate each component with a space.</para>
</listitem>
</varlistentry>
</variablelist><para>For more information, 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.</para>
</listitem>
</itemizedlist>
</step>
</procedure><example id="egjxu"><title>Creating a Concatenation of One Slice</title><screen># <userinput>metainit d25 1 1 c0t1d0s2</userinput>
d25: Concat/Stripe is setup</screen><para>This example shows the creation of a concatenation, <filename>d25</filename>.
This concatenation consists of one stripe (the first number <option role="nodash">1</option>) composed of a single slice (the second number <option role="nodash">1</option> in front of the slice). The system verifies that the volume has
been set up.</para><para>The example shows a concatenation that can safely encapsulate existing
data.</para>
</example><example id="egjyf"><title>Creating a Concatenation of Four Slices</title><screen># <userinput>metainit d40 4 1 c0t1d0s2 1 c0t2d0s2 1 c0t2d0s3 1 c0t2d1s3</userinput>
d40: Concat/Stripe is setup</screen><para>This example shows the creation of a concatenation, <filename>d40</filename>.
The concatenation consists of four stripes (the number 4), each composed of
a single slice (the number <option role="nodash">1</option> in front of each
slice). The system verifies that the volume has been set up. </para>
</example><taskrelated role="see-also"><para>To prepare the newly created concatenation for a file system, see <olink targetdoc="sagdfs" targetptr="fscreate-96442" remap="external">Chapter 18, <citetitle remap="chapter">Creating UFS, TMPFS, and LOFS File Systems (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Devices and File Systems</citetitle></olink>. </para>
</taskrelated>
</task>
</sect1><sect1 id="tasks-metadevices-27"><title>Expanding Storage Capacity</title><para>To add storage capacity to a file system, create a concatenation volume.
To add storage capacity to an existing stripe, create a concatenated stripe
volume.</para><task id="tasks-metadevices-4"><title>How to Expand Storage Capacity for Existing
Data</title><tasksummary><caution><para>Do not create volumes larger than 1Tbyte if you expect to run
the Solaris software with a 32-bit kernel. Additionally, do not create volumes
larger than 1 Tbyte 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>
</tasksummary><taskprerequisites><para>Check <olink targetptr="addtasks-20933" remap="internal">Prerequisites for Creating Solaris
Volume Manager Components</olink> and <olink targetptr="addtasks-14796" remap="internal">Background
Information for Creating RAID-0 Volumes</olink>.</para>
</taskprerequisites><procedure><step id="tasks-metadevices-step-29"><para>Unmount the file system.</para><screen># <userinput>umount <replaceable>/filesystem</replaceable></userinput></screen>
</step><step id="tasks-metadevices-step-61"><para>To create a concatenation, use
one of the following methods:</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>Use the following form of the <command>metainit</command> command:</para><screen># <userinput>metainit <replaceable>volume-name</replaceable> <replaceable>number-of-stripes</replaceable>
 <replaceable>components-per-stripe</replaceable>
<replaceable>component-names</replaceable></userinput></screen><variablelist><varlistentry><term><replaceable>volume-name</replaceable></term><listitem><para>Specifies is the name of the volume to create.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>number-of-stripes</replaceable></term><listitem><para>Specifies the number of stripes to create.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>components-per-stripe</replaceable></term><listitem><para>Specifies the number of components each stripe should have.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>component-names</replaceable></term><listitem><para>Specifies the names of the components that are used. If more
than one component is used, separate each component with a space.</para>
</listitem>
</varlistentry>
</variablelist><para>For more information, see the <olink targetdoc="refman1m" targetptr="metainit-1m" remap="external"><citerefentry><refentrytitle>metainit</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para>
</listitem>
</itemizedlist>
</step><step id="tasks-metadevices-step-34"><para>Edit the <filename>/etc/vfstab</filename> file
so that the file system references the name of the concatenation.</para>
</step><step id="tasks-metadevices-step-33"><para>Remount the file system.</para><screen># <userinput>mount <replaceable>/filesystem</replaceable></userinput></screen>
</step>
</procedure><example id="egjyw"><title>Expanding a File System by Creating a Concatenation</title><screen># <userinput>umount /docs</userinput>
# <userinput>metainit d25 2 1 c0t1d0s2 1 c0t2d0s2</userinput>
d25: Concat/Stripe is setup
<lineannotation>(Edit the /etc/vfstab file so that the file system  references the volume d25 instead of slice c0t1d0s2)</lineannotation>
# <userinput>mount /docs</userinput></screen><para>This example shows the creation of a concatenation, <filename>d25</filename>,
out of two slices, <filename>/dev/dsk/c0t1d0s2</filename> (which contains
a file system mounted on <filename>/docs</filename>) and <filename>/dev/dsk/c0t2d0s2</filename>. The file system must first be unmounted. Note that the first
slice in the <command>metainit</command> command must be the slice that contains
the file system. If not, you will corrupt your data.</para><para>Next, the entry for the file system in the <filename>/etc/vfstab</filename> file
is changed (or entered for the first time) to reference the concatenation.
For example, initially, the following line appears in the <literal>/etc/vfstab</literal> file:</para><screen>/dev/dsk/c0t1d0s2 /dev/rdsk/c0t1d0s2 /docs ufs 2 yes -</screen><para>This line should be changed to the following: </para><screen>/dev/md/dsk/d25 /dev/md/rdsk/d25 /docs ufs 2 yes -</screen><para>Finally, the file system is remounted. </para>
</example><taskrelated role="see-also"><para>For a UFS file system, run the <command>growfs</command> command on
the concatenation. See <olink targetptr="tasks-metadevices-7" remap="internal">How to Expand
a File System</olink>.</para><para>Some applications, such as a database, do not use a file system. An
application such as a database uses the raw concatenation and must have its
own way of recognizing the concatenation, or of growing the added space.</para>
</taskrelated>
</task><task id="maintaintasksnew-36568"><title>How to Expand an Existing RAID-0
Volume</title><tasksummary><para>A concatenated stripe enables you to expand an existing stripe. For
example, if a stripe has run out of storage capacity, you convert it into
a concatenated stripe. Doing so allows you to expand your storage capacity
without having to back up and restore data.</para><para>This procedure assumes that you are adding an additional stripe to an
existing stripe. </para><caution><para>Do not create volumes larger than 1Tbyte if you expect to run
the Solaris software with a 32-bit kernel. Additionally, do not create volumes
larger than 1 Tbyte 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 support in Solaris Volume Manager.</para>
</caution>
</tasksummary><taskprerequisites><para>Check <olink targetptr="addtasks-20933" remap="internal">Prerequisites for Creating Solaris
Volume Manager Components</olink> and <olink targetptr="addtasks-14796" remap="internal">Background
Information for Creating RAID-0 Volumes</olink>.</para>
</taskprerequisites><procedure remap="single-step"><step id="tasks-metadevices-step-65"><para>To create a concatenated stripe,
use one of the following methods:</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 concatenate existing stripes from the command line, use
the following form of the <command>metattach</command> command:</para><screen># <userinput>metattach <replaceable>volume-name</replaceable> <replaceable>component-names</replaceable></userinput></screen><variablelist><varlistentry><term><replaceable>volume-name</replaceable></term><listitem><para>Specifies the name of the volume to expand.</para>
</listitem>
</varlistentry><varlistentry><term><replaceable>component-names</replaceable></term><listitem><para>Specifies the names of the components that are used.  If more
than one component is used, separate each component with a space.</para>
</listitem>
</varlistentry>
</variablelist><para>See the <olink targetdoc="refman1m" targetptr="metattach-1m" remap="external"><citerefentry><refentrytitle>metattach</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page for more information.</para>
</listitem>
</itemizedlist>
</step>
</procedure><example id="maintaintasksnew-134"><title>Creating a Concatenated Stripe by Attaching a Single Slice</title><screen># <userinput>metattach d2 c1t2d0s2</userinput>
d2: components are attached</screen><para>This example illustrates how to attach a slice to an existing
stripe, <filename>d2</filename>. The system confirms that the slice is attached. </para>
</example><example id="maintaintasksnew-135"><title>Creating a Concatenated Stripe by Adding Several Slices</title><screen># <userinput>metattach d25 c1t2d0s2 c1t2d1s2 c1t2d3s2</userinput>
d25: components are attached</screen><para>This example takes an existing three-way stripe, <filename>d25</filename>,
and concatenates another three-way stripe to it. Because no interlace value
is given for the attached slices, the stripes inherit the interlace value
configured for <filename>d25</filename>. The system verifies that the volume
has been set up.  </para>
</example><taskrelated role="see-also"><para>For a UFS file system, run the <command>growfs</command> command on
the volume. See <olink targetptr="tasks-metadevices-7" remap="internal">How to Expand a File
System</olink>.</para><para>Some applications, such as a database, do not use a file system. An
application such as a database uses the raw volume and must have its own way
of recognizing the volume, or of growing the added space.</para><para>To prepare a newly created concatenated stripe for a file system, see <olink targetdoc="sagdfs" targetptr="fscreate-96442" remap="external">Chapter 18, <citetitle remap="chapter">Creating UFS, TMPFS, and LOFS File Systems (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Devices and File Systems</citetitle></olink>.</para>
</taskrelated>
</task>
</sect1><sect1 id="tasks-metadevices-43"><title>Removing a RAID-0 Volume</title><task id="removetasks-41513"><title>How to Remove a RAID-0 Volume</title><procedure><step id="tasks-metadevices-step-71"><para>Make sure that you have a current
backup of all data and that you have root privilege.</para>
</step><step id="tasks-metadevices-step-73"><para>Make sure that you no longer need
the volume. </para><para>If you delete a stripe or concatenation and reuse
the slices that were part of the deleted volume, all data on the volume is
deleted from the system.</para>
</step><step id="tasks-metadevices-step-45"><para>Unmount the file system, if needed.</para><screen># <userinput>umount <replaceable>/filesystem</replaceable></userinput></screen>
</step><step id="tasks-metadevices-step-74"><para>To remove a volume, use one of
the following methods:</para><itemizedlist><listitem><para>From the Enhanced Storage tool within the Solaris Management Console,  open the Volumes node. Choose Edit&rArr;Delete,
then follow the onscreen instructions. For more information, see the online
help.</para>
</listitem><listitem><para>Use the following format of the <command>metaclear</command> command
to delete the volume:</para><screen><command>metaclear</command> <replaceable>volume-name</replaceable></screen><para>See the following example and the <olink targetdoc="refman1m" targetptr="metaclear-1m" remap="external"><citerefentry><refentrytitle>metaclear</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page for more information.</para>
</listitem>
</itemizedlist>
</step>
</procedure><example id="egjys"><title>Removing a Concatenation</title><screen># <userinput>umount d8</userinput>
# <userinput>metaclear d8</userinput>
d8: Concat/Stripe is cleared
<lineannotation>(Edit the /etc/vfstab file)</lineannotation></screen><para>This example illustrates removing the concatenation, <literal>d8</literal>,
that also contains a mounted file system. The file system must be unmounted
before the volume can be removed. The system displays a confirmation message
that the concatenation is removed. If an entry in the <filename>/etc/vfstab</filename> file
exists for this volume, delete that entry. You do not want to confuse the
system by asking it to mount a file system on a nonexistent volume.</para>
</example>
</task>
</sect1>
</chapter>