<chapter id="about-hotspares-40444"><title>Hot Spare
Pools (Overview)</title><highlights><para>This chapter explains how Solaris Volume Manager uses hot spare pools. For information
about performing related tasks, see <olink targetptr="tasks-hotspares-1" remap="internal">Chapter&nbsp;17, Hot Spare
Pools (Tasks)</olink>.</para><para>This chapter contains the following information:</para><itemizedlist><listitem><para><olink targetptr="about-hotspares-40673" remap="internal">Overview of Hot Spares and Hot Spare
Pools</olink></para>
</listitem><listitem><para><olink targetptr="about-hotspares-9" remap="internal">Scenario&mdash;Hot Spares</olink></para>
</listitem>
</itemizedlist>
</highlights><sect1 id="about-hotspares-40673"><title>Overview of Hot Spares and Hot Spare
Pools</title><para>A <firstterm>hot spare pool</firstterm> is collection of slices (<firstterm>hot spares</firstterm>) that Solaris Volume Manager uses to provide increased data
availability for RAID-1 (mirror) and RAID-5 volumes. In a slice failure occurs,
in either a submirror or a RAID-5 volume, Solaris Volume Manager automatically substitutes
the hot spare for the failed slice. </para><note><para>Hot spares do not apply to RAID-0 volumes or one-way mirrors.
For automatic substitution to work, redundant data must be available.</para>
</note><para>A hot spare cannot be used to hold data or state database replicas while
it is idle. A hot spare must remain ready for immediate use a slice failure
occurs in the volume with which it is associated. To use hot spares, you must
invest in additional disks beyond those disks that the system actually requires
to function.</para><para>Solaris Volume Manager enables you to dynamically add, delete, replace, and
enable hot spares within hot spare pools. You can use either the Solaris Management Console or
the command-line utilities to administer hot spares and hot spare pools. See <olink targetptr="tasks-hotspares-1" remap="internal">Chapter&nbsp;17, Hot Spare
Pools (Tasks)</olink> for
details on these tasks.</para><sect2 id="about-hotspares-14383"><title>Hot Spares</title><para>A hot spare is a slice (not a volume) that
is functional and available, but not in use. A hot spare is reserved, meaning
that it stands ready to substitute for a failed slice in a submirror or RAID-5
volume. </para><para>Hot spares provide protection from hardware failure. Slices from RAID-1
and RAID-5 volumes are automatically replaced by hot spares when they fail.
The hot spares are resynchronized available for use in the volume. The hot
spare can be used temporarily until the failed submirror or RAID-5 volume
slice can either be fixed or replaced.</para><para>You create hot spares within hot spare pools. Individual hot spares
can be included in one or more hot spare pools. For example, you might have
two submirrors and two hot spares. The hot spares can be arranged as two hot
spare pools, with each pool having the two hot spares in a different order
of preference. This strategy enables you to specify which hot spare is used
first. This strategy also improves availability by having more hot spares
available.</para><para>A submirror or RAID-5 volume can use only a hot spare whose size is
equal to or greater than the size of the failed slice in the submirror or
RAID-5 volume. If, for example, you have a submirror made of 1-Gbyte drives,
a hot spare for the submirror must be 1 Gbyte or greater.</para>
</sect2><sect2 id="about-hotspares-18125"><title>Hot Spare Pools</title><para>A hot spare pool is an ordered list (collection) of hot spares. </para><para>You can place hot spares into one or more hot spare pools to get the
most flexibility and protection from the fewest slices. You could put a single
slice designated for use as a hot spare into multiple hot spare pools, with
each hot spare pool having different slices and characteristics. Then, you
could assign a hot spare pool to any number of submirror volumes or RAID-5
volumes.</para><note><para>You can assign a single hot spare pool to multiple submirrors
or RAID-5 volumes. However, a submirror or a RAID-5 volume can be associated
with only one hot spare pool.</para>
</note>
</sect2><sect2 id="about-hotspares-8"><title>How Hot Spares Work</title><para>When
I/O errors occur, Solaris Volume Manager searches the hot spare pool for a hot spare
based on the order in which hot spares were added to the hot spare pool. Solaris Volume Manager checks
the hot spare pool for the first available hot spare whose size is equal to
or greater than the size of the slice that is being replaced. The first hot
spare found by Solaris Volume Manager that is large enough is used as a replacement. Solaris Volume Manager changes
the hot spare's status to &ldquo;In-Use&rdquo; and automatically resynchronizes
the data if necessary. The order of hot spares in the hot spare pool is not
changed when a replacement occurs.</para><para>In the case of a mirror, the hot spare is resynchronized with data from
a functional submirror. In the case of a RAID-5 volume, the hot spare is resynchronized
with the other slices in the volume. If a slice of adequate size is not found
in the list of hot spares, the submirror or RAID-5 volume that failed goes
into a failed state and the hot spares remain unused. In the case of the submirror,
the submirror no longer replicates the data completely. In the case of the
RAID-5 volume, data redundancy is no longer available. </para><tip><para>When you add hot spares to a hot spare pool, add them from smallest
to largest in size. This strategy avoids potentially wasting &ldquo;large&rdquo;
hot spares as replacements for small slices.</para>
</tip><para>When a slice experiences an I/O error, the failed slice is placed in
the &ldquo;Broken&rdquo; state. To fix this condition, first repair or replace
the failed slice. Then, bring the slice back to the &ldquo;Available&rdquo;
state by using the Enhanced Storage tool within the Solaris Management Console. Or, use the <command>metahs <option>e</option></command> command. </para><para>A submirror or RAID-5 volume is uses a hot spare in place of a failed
slice until that failed slice is enabled or replaced. The hot spare is then
marked &ldquo;Available&rdquo; in the hot spare pool. This hot spare is again
ready for use.</para>
</sect2><sect2 id="egjyg"><title>Hot Spare Pool States</title><para>The following table explains hot spare pool states and possible actions
to take.</para><table frame="topbot" id="maintaintasksnew-13042"><title>Hot Spare Pool States
(Command Line)</title><tgroup cols="3" colsep="0" rowsep="0"><colspec colname="column1" colwidth="72*"/><colspec colname="column2" colwidth="180*"/><colspec colname="column3" colwidth="144*"/><thead><row rowsep="1"><entry><para>State</para>
</entry><entry><para>Meaning</para>
</entry><entry><para>Action</para>
</entry>
</row>
</thead><tbody><row><entry><para>Available</para>
</entry><entry><para>The hot spares in the hot spare pool are running and ready to accept
data. The hot spares are not currently being written to or read from.</para>
</entry><entry><para>None.</para>
</entry>
</row><row><entry><para>In-Use</para>
</entry><entry><para>This hot spare pool includes hot spares that are being used to replace
failed slices in a redundant volume. </para>
</entry><entry><para>Diagnose how the hot spares are being used. Then, repair the slice in
the volume for which the hot spare is being used.</para>
</entry>
</row><row><entry><para>Broken</para>
</entry><entry><para>A problem exists with a hot spare or hot spare pool. However, there
is no immediate danger of losing data. This status is also displayed if all
the hot spares are in use.</para>
</entry><entry><para>Diagnose how the hot spares are being used or why they are broken. You
can add more hot spares to the hot spare pool, if desired.</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect2><sect2 id="about-hotspares-2"><title>Example&mdash;Hot Spare Pool</title><para><olink targetptr="about-hotspares-fig-3" remap="internal">Figure 16&ndash;1</olink> illustrates a hot spare pool that is associated
with submirrors <filename>d11</filename> and <filename>d12</filename> in mirror <filename>d1</filename>. If a slice in either submirror were to fail, a hot spare would
automatically be substituted for the failed slice. The hot spare pool itself
is associated with each submirror volume, not the mirror. The hot spare pool
could also be associated with other submirrors or RAID-5 volumes, if desired.</para><figure id="about-hotspares-fig-3"><title>Hot Spare Pool Example</title><mediaobject><imageobject><imagedata entityref="fig134.epsi"/>
</imageobject><textobject><simpara>Diagram shows how hot spares can replace components of
a submirror after a component failure. </simpara>
</textobject>
</mediaobject>
</figure>
</sect2>
</sect1><sect1 id="about-hotspares-9"><title>Scenario&mdash;Hot Spares</title><para>Hot spares provide extra protection for redundant volumes (RAID-1 and
RAID-5) to help guard against data loss. By associating hot spares with the
underlying slices that comprise your RAID-0 submirrors or RAID-5 configuration,
you can have the system automatically replace failed slices with working slices
from the hot spare pool. Those slices that were swapped into use are updated
with the information they should have. The slices then can continue to function
just like the original slices. You can replace the failed slices at your convenience.</para>
</sect1>
</chapter>