<chapter id="about-metadevices-22802"><title>RAID-0
(Stripe and Concatenation) Volumes (Overview)</title><highlights><para>This chapter describes RAID-0 (both stripe and concatenation) volumes
that are available in Solaris Volume Manager. For information about related tasks,
see <olink targetptr="tasks-metadevices-1" remap="internal">Chapter&nbsp;9, RAID-0 (Stripe
and Concatenation) Volumes (Tasks)</olink>.</para><para>This chapter provides the following information:</para><itemizedlist><listitem><para><olink targetptr="about-metadevices-21306" remap="internal">Overview of RAID-0
Volumes</olink></para>
</listitem><listitem><para><olink targetptr="addtasks-14796" remap="internal">Background Information for
Creating RAID-0 Volumes</olink></para>
</listitem><listitem><para><olink targetptr="about-metadevices-40a" remap="internal">Scenario&mdash;RAID-0
Volumes</olink></para>
</listitem>
</itemizedlist>
</highlights><sect1 id="about-metadevices-21306"><title>Overview of RAID-0 Volumes</title><para>RAID-0 volumes, are composed of slices or soft partitions. These
volumes enable you to expand disk storage capacity. They can be used either
directly or as the building blocks for RAID-1 (mirror) volumes, and soft partitions. There are three kinds of RAID-0
volumes:</para><itemizedlist><listitem><para>Stripe volumes</para>
</listitem><listitem><para>Concatenation volumes</para>
</listitem><listitem><para>Concatenated stripe volumes</para>
</listitem>
</itemizedlist><note><para>A <firstterm>component</firstterm> refers to any devices, from
slices to soft partitions, used in another logical volume.</para>
</note><para>A stripe volume spreads data equally across all components in the volume,
while a concatenation volume writes data to the first available component
until it is full, then moves to the next available component. A concatenated
stripe volume is simply a stripe volume that has been expanded from its original
configuration by adding additional components.</para><para>RAID-0 volumes allow you to quickly and simply expand disk storage capacity.
The drawback is that these volumes do not provide any data redundancy, unlike
RAID-1 or RAID-5 volumes. If a single component fails on a RAID-0 volume,
data is lost.</para><para>For sequential I/O operations on a stripe volume, Solaris Volume Manager reads
all the blocks in a segment of blocks (called an <firstterm>interlace</firstterm>)
on the first component, then all the blocks in a segment of blocks on the
second component, and so forth.</para><para>For sequential I/O operations on a concatenation volume, Solaris Volume Manager reads
all the blocks on the first component, then all the blocks of the second component,
and so forth. </para><para>On both a concatenation volume and a stripe volume, all I/O operations
occurs in parallel.</para><para>You can use a RAID-0 volume that contains a single slice for any file
system. </para><para>You can use a RAID-0 volume that contains multiple components for any
file system except the following: </para><itemizedlist><listitem><para>root (<filename>/</filename>)</para>
</listitem><listitem><para><filename>/usr</filename></para>
</listitem><listitem><para><filename>swap</filename></para>
</listitem><listitem><para><filename>/var</filename></para>
</listitem><listitem><para><filename>/opt</filename></para>
</listitem><listitem><para>Any file system that is accessed during an operating system
upgrade or installation</para>
</listitem>
</itemizedlist><note><para>When you mirror root (<filename>/</filename>), <filename>/usr</filename>, <filename>swap</filename>, <filename>/var</filename>, or <filename>/opt</filename>,
you put the file system into a one-way concatenation or stripe (a concatenation
of a single slice) that acts as a submirror. This one-way concatenation is
mirrored by another submirror, which must also be a concatenation. </para>
</note><sect2 id="about-metadevices-34920"><title>RAID-0 (Stripe) Volume</title><para>A RAID-0 (stripe) volume is a volume that arranges data across
one or more components. Striping alternates equally-sized segments of data
across two or more components, forming one logical storage unit. These segments
are interleaved round-robin so that the combined space is made alternately
from each component, in effect, shuffled like a deck of cards.  </para><note><para>To increase the capacity of a stripe volume , you need to build
a concatenated stripe volume. See <olink targetptr="about-metadevices-34224" remap="internal">RAID-0
(Concatenated Stripe) Volume</olink>. </para>
</note><para>Striping enables multiple controllers to access data at the same time,
which is also called <firstterm>parallel access</firstterm>. Parallel access
can increase I/O throughput because all disks in the volume are busy most
of the time servicing I/O requests. </para><para>An existing file system cannot be converted directly to a stripe. To
place an existing file system on a stripe volume , you must back up the file
system, create the volume, then restore the file system to the stripe volume.</para><sect3 id="about-metadevices-39"><title>Interlace Values for a RAID&ndash;0
(Stripe) Volume</title><para>An interlace is the size, in Kbytes, Mbytes, or blocks, of the logical
data segments on a stripe volume. Depending on the application, different
interlace values can increase performance for your configuration. The performance
increase comes from having several disk arms managing I/O requests. When the
I/O request is larger than the interlace size, you might get better performance.</para><note><para>RAID-5 volumes also use an interlace value. See <olink targetptr="about-metadevices-18901" remap="internal">Overview of RAID-5 Volumes</olink> for
more information.</para>
</note><para>When you create a stripe volume, you can set the interlace value or
use the Solaris Volume Manager default interlace value of 512 Kbytes. Once you have created the stripe volume, you cannot change the
interlace value. However, you could back up the data on it, delete the stripe
volume, create a new stripe volume with a new interlace value, and then restore
the data.</para>
</sect3><sect3 id="about-metadevices-5"><title>Scenario&mdash;RAID-0 (Stripe) Volume</title><para><olink targetptr="about-metadevices-fig-6" remap="internal">Figure 8&ndash;1</olink> shows
a stripe volume that is built from three components (slices). It also illustrates
how data is written onto the volume components according to the interlace
size and using the round-robin technique.</para><para>When Solaris Volume Manager writes data onto the components of a stripe volume,
it writes data blocks of the interlace width to Disk A (interlace 1), Disk
B (interlace 2), and Disk C (interlace 3). Solaris Volume Manager then repeats the
pattern writing to Disk A (interlace 4), Disk B (interlace 5), Disk C (interlace
6), and so forth.</para><para>The interlace value sets the size of each time data is written to a
slice. The total capacity of the stripe volume equals the number of components
multiplied by the size of the smallest component. (If each slice in the following
example were 2 Gbytes, the volume would equal 6 Gbytes.)</para><figure id="about-metadevices-fig-6"><title>RAID-0 (Stripe) Volume Example</title><mediaobject><imageobject><imagedata entityref="fig78.epsi"/>
</imageobject><textobject><simpara>Diagram shows physical slices, and how interlace widths
are taken from each slice in turn and presented as a single logical volume.</simpara>
</textobject>
</mediaobject>
</figure>
</sect3>
</sect2><sect2 id="about-metadevices-22606"><title>RAID-0 (Concatenation) Volume</title><para>A RAID&ndash;0 (concatenation) volume is a volume whose data is
organized serially and adjacently across components, forming one logical storage
unit.</para><para>Use a concatenation volume to get more storage capacity by combining
the capacities of several components. You can add more components to the concatenation
volume as the demand for storage grows.</para><para>A concatenation volume enables you to dynamically expand storage capacity
and file system sizes online. A concatenation volume allows you to add components
even if the other components are currently active. </para><para>A concatenation volume can also expand any active and mounted UFS file
system without having to bring down the system. In general, the total capacity
of a concatenation volume is equal to the total size of all the components
in the volume. If a concatenation volume contains a slice with a state database
replica, the total capacity of the volume is the sum of the components minus
the space that is reserved for the replica.</para><para>You can also create a concatenation volume from a single component.
Later, when you need more storage, you can add more components to the volume.</para><note><para>You must use a concatenation volume to encapsulate root (<filename>/</filename>), <filename>swap</filename>, <filename>/usr</filename>, <filename>/opt</filename>, or <filename>/var</filename> when mirroring these file systems.</para>
</note><sect3 id="about-metadevices-2"><title>Scenario&mdash;RAID-0 (Concatenation)
Volume</title><para><olink targetptr="about-metadevices-fig-3" remap="internal">Figure 8&ndash;2</olink> illustrates
a concatenation volume that is built from three components (slices). It also
illustrates how data is written onto the volume components according to the
interlace size and onto each slice sequentially.</para><para>The data blocks are written sequentially across the components, beginning
with Slice A. You can envision Slice A as containing logical data blocks 1
through 4. Disk B would contain logical data blocks 5 through 8. Drive C would
contain logical data blocks 9 through 12. The total capacity of volume would
be the combined capacities of the three slices. If each slice were 2 Gbytes,
the volume would have an overall capacity of 6 Gbytes.</para><figure id="about-metadevices-fig-3"><title>RAID-0 (Concatenation) Volume
Example</title><mediaobject><imageobject><imagedata entityref="fig76.epsi"/>
</imageobject><textobject><simpara>Diagram shows how interlace widths are taken from each
slice (all widths from one slice, then all from the next) and presented as
a single volume. </simpara>
</textobject>
</mediaobject>
</figure>
</sect3>
</sect2><sect2 id="about-metadevices-34224"><title>RAID-0 (Concatenated Stripe) Volume</title><para>A RAID&ndash;0 (concatenated stripe) volume is a stripe that has
been expanded by adding additional components (stripes). </para><para>To set the interlace value for a concatenated stripe volume, at the
stripe level, use either the Enhanced Storage tool within the Solaris Management Console, or the <command>metattach <option>i</option></command> command.
Each stripe within the concatenated stripe volume can have its own interlace
value. When you create a concatenated stripe volume from scratch, if you do
not specify an interlace value for a particular stripe, it inherits the interlace
value from the previous stripe added to the volume.</para><sect3 id="about-metadevices-35559"><title>Example&mdash;RAID-0 (Concatenated
Stripe) Volume</title><para><olink targetptr="about-metadevices-fig-8" remap="internal">Figure 8&ndash;3</olink> illustrates a
concatenated stripe volume that is a concatenation of three stripes.</para><para>The first stripe consists of three slices, Slice A through C, with an
interlace value of 512 Kbytes. The second stripe consists of two slices, Slice D and E,
and uses an interlace value of 1024 Kbytes32 Kbytes.
The last stripe consists of a two slices, Slice F and G. Because no interlace
value is specified for the third stripe, it inherits the value from the stripe
that was added before it, which in this case is 1024 Kbytes32 Kbytes.
Sequential data blocks are added to the first stripe until that stripe has
no more space. Data blocks are then added to the second stripe. When this
stripe has no more space, data blocks are added to the third stripe. Within
each stripe, the data blocks are interleaved according to the specified interlace
value.</para><figure id="about-metadevices-fig-8"><title>RAID-0 (Concatenated Stripe) Volume
Example</title><mediaobject><imageobject><imagedata entityref="fig75.epsi"/>
</imageobject><textobject><simpara>Diagram shows how several stripes are concatenated together
to present a single larger logical RAID-0 volume.</simpara>
</textobject>
</mediaobject>
</figure>
</sect3>
</sect2>
</sect1><sect1 id="addtasks-14796"><title>Background Information for Creating RAID-0
Volumes</title><sect2 id="about-metadevices-40"><title>RAID-0 Volume Requirements</title><para>When you are working with RAID-0 volumes, consider the following:</para><itemizedlist><listitem><para>Use components that are each on different controllers to increase
the number of simultaneous reads and writes that can be performed.</para>
</listitem><listitem><para>Do not create a stripe from an existing file system or data.
Doing so will destroy data. Instead, use a concatenation. (You can create
a stripe from existing data, but you must dump and restore the data to the
volume.)</para>
</listitem><listitem><para>Use disk components of the same size for stripes. Striping
components of different sizes results in wasted disk space.</para>
</listitem><listitem><para>Set up a stripe's interlace value to better match the I/O
requests made by the system or applications.</para>
</listitem><listitem><para>Because a stripe or concatenation does not contain replicated
data, when such a volume has a component failure, you must replace the component,
recreate the stripe or concatenation, and restore data from a backup.  </para>
</listitem><listitem><para>When you recreate a stripe or concatenation, use a replacement
component that has at least the same size as the failed component.</para>
</listitem>
</itemizedlist>
</sect2><sect2 id="about-metadevices-41"><title>RAID-0 Volume Guidelines</title><itemizedlist><listitem><para>Concatenation uses less CPU cycles than striping and performs
well for small random I/O and for even I/O distribution.</para>
</listitem><listitem><para>When possible, distribute the components of a stripe or concatenation
across different controllers and busses. Using stripes that are each on different
controllers increases the number of simultaneous reads and writes that can
be performed.</para>
</listitem><listitem><para>If a stripe is defined on a failing controller and another
controller is available on the system, you can &ldquo;move&rdquo; the stripe
to the new controller by moving the disks to the controller and redefining
the stripe.</para>
</listitem><listitem><para>Number of stripes: Another way of looking at striping is to
first determine the performance requirements. For example, you might need
10.4 Mbytes/sec performance for a selected application, and each disk might
deliver approximately 4 Mbyte/sec. Based on this formula, then determine how
many disk spindles you need to stripe across:</para><para><literal>10.4 Mbyte/sec
/ 4 Mbyte/sec = 2.6</literal></para><para>Therefore, you need three disks
capable of performing I/O operations in parallel.</para>
</listitem>
</itemizedlist>
</sect2>
</sect1><sect1 id="about-metadevices-40a"><title>Scenario&mdash;RAID-0 Volumes</title><para>RAID-0 volumes provide the fundamental building blocks for creating
more complex storage configurations or for building mirrors. The following
example, drawing on the scenario explained in <olink targetptr="svm-scenario-1" remap="internal">Chapter&nbsp;5,
Configuring and Using Solaris Volume Manager (Scenario)</olink>, describes
how RAID-0 volumes can provide larger storage spaces and allow you to construct
a mirror of existing file systems, including root (<filename>/</filename>). </para><para>The sample system in the scenario has a collection of relatively small
(9 Gbyte) disks, but specific applications would likely require larger storage
spaces. To create larger spaces (and improve performance), you can create
a stripe that spans multiple disks. For example, each one of the following
disks, <literal>c1t1d0</literal>, <literal>c1t2d0</literal>, <literal>c1t3d0</literal>, <literal>c2t1d0</literal>, <literal>c2t2d0</literal>, and <literal>c2t3d0</literal>,
could be formatted with a slice <literal>0</literal> that spans the entire
disk. Then, a stripe including all three of the disks from one controller
could provide approximately 27 Gbytes of storage and allow faster access.
The second stripe, from the second controller, could be used for redundancy,
as described in <olink targetptr="tasks-mirrors-1" remap="internal">Chapter&nbsp;11, RAID-1
(Mirror) Volumes (Tasks)</olink> and specifically in the <olink targetptr="about-mirrors-8" remap="internal">Scenario&mdash;RAID-1 Volumes (Mirrors)</olink>.</para>
</sect1>
</chapter>