<chapter id="mirroroverview-1"><title>Creating RAID-1 Volumes (Mirrors) During
Installation (Overview)</title><highlights><para>This chapter discusses the advantages of creating RAID-1 volumes (mirrors)
for the root (<filename>/</filename>) file system. This chapter also describes
the Solaris Volume Manager components that are required to create mirrors
for file systems. This chapter describes the following topics.</para><itemizedlist><listitem><para><olink targetptr="volumes-19" remap="internal">Why Use RAID-1 Volumes?</olink></para>
</listitem><listitem><para><olink targetptr="volumes-21" remap="internal">How Do RAID-1 Volumes Work?</olink></para>
</listitem><listitem><para><olink targetptr="volumes-22" remap="internal">Overview of Solaris Volume Manager
Components</olink></para>
</listitem><listitem><para><olink targetptr="mirroroverview-300" remap="internal">Example of RAID-1 Volume
Disk Layout</olink></para>
</listitem>
</itemizedlist><para>For additional information specific to Solaris Live Upgrade or JumpStart,
see the following references:</para><itemizedlist><listitem><para>For Solaris Live Upgrade: <olink targetdoc="solinstallupg" targetptr="luplanning-6" remap="external"><citetitle remap="section">General Guidelines When Creating RAID-1 Volumes (Mirrored) File Systems</citetitle> in <citetitle remap="book">Solaris Express Installation Guide:  Solaris Live Upgrade and Upgrade Planning</citetitle></olink></para>
</listitem><listitem><para>For JumpStart:</para><itemizedlist><listitem><para><olink targetdoc="solinstalladv" targetptr="jumpstartreference-mirror" remap="external"><citetitle remap="section">filesys Profile Keyword (Creating RAID-1 Volumes)</citetitle> in <citetitle remap="book">Solaris Express Installation Guide: Custom JumpStart and Advanced Installations</citetitle></olink></para>
</listitem><listitem><para><olink targetdoc="solinstalladv" targetptr="jumpstartreference-metadb" remap="external"><citetitle remap="section">metadb Profile Keyword (Creating State Database Replicas)</citetitle> in <citetitle remap="book">Solaris Express Installation Guide: Custom JumpStart and Advanced Installations</citetitle></olink></para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist>
</highlights><sect1 id="volumes-19"><title>Why Use RAID-1 Volumes?</title><para>During the installation or upgrade, you can create RAID-1 volumes to
duplicate your system data over multiple physical disks. By duplicating your
data over separate disks, you can protect your data from disk corruption or
a disk failure.</para><para>The Solaris custom JumpStart and Solaris Live Upgrade installation methods
use the Solaris Volume Manager technology to create RAID-1 volumes that mirror
a file system. Solaris Volume Manager provides a powerful way to reliably
manage your disks and data by using volumes. Solaris Volume Manager enables
concatenations, stripes, and other complex configurations. The custom JumpStart
and Solaris Live Upgrade installation methods enable a subset of these tasks,
such as creating a RAID-1 volume for the root (<filename>/</filename>) file
system. You can create RAID-1 volumes during your installation or upgrade,
eliminating the need to create them after the installation.</para><itemizedlist><listitem><para>For guidelines, see <olink targetptr="mirrorplanning-2" remap="internal">Custom
JumpStart and Solaris Live Upgrade Guidelines</olink>.</para>
</listitem><listitem><para>For detailed information about complex Solaris Volume Manager
software and components, see <olink targetdoc="logvolmgradmin" remap="external"><citetitle remap="book">Solaris Volume Manager Administration Guide</citetitle></olink>.</para>
</listitem>
</itemizedlist>
</sect1><sect1 id="volumes-21"><title>How Do RAID-1 Volumes Work?</title><para>Solaris Volume Manager uses virtual disks to
manage physical disks and their  associated data. In Solaris Volume Manager, a virtual
disk is called a  <emphasis>volume</emphasis>. A <emphasis>volume</emphasis> is
a name for a group of physical slices  that appear to the system as a single,
logical device. Volumes are actually  pseudo, or virtual, devices in standard <trademark class="registered">UNIX</trademark> terms.  </para><para>A volume is functionally identical to a physical disk in the view of
an  application or a file system (such as UFS). Solaris Volume Manager converts
I/O  requests that are directed at a volume into I/O requests to the underlying
member  disks. Solaris Volume Manager volumes are built from slices (disk partitions)
or from  other Solaris Volume Manager volumes.</para><para>You use volumes to increase performance and data  availability.
In some instances, volumes can also increase I/O performance.  Functionally,
volumes behave the same way as slices. Because volumes look like  slices,
they are transparent to end users, applications, and file systems. Like  physical
devices, you can use Solaris Volume Manager software to access volumes through
block or raw device names. The volume name changes, depending on whether the
block or raw device is used. The custom JumpStart installation method and
Solaris Live Upgrade support the use of block devices to create mirrored file
systems. See  <olink targetptr="epudh" remap="internal">RAID Volume Name Requirements and Guidelines
for Custom JumpStart and Solaris Live Upgrade</olink> for details about volume
names.</para><para>When you create RAID-1 volumes ) with RAID-0 volumes (single-slice
concatenations), Solaris Volume Manager duplicates data on the RAID-0 submirrors
and treats the submirrors as one volume.</para><para><olink targetptr="mirroroverview-fig-2" remap="internal">Figure 8&ndash;1</olink> shows
a mirror that duplicates the root (<literal>/</literal>) file system over
two physical disks.</para><figure id="mirroroverview-fig-2"><title>Creating RAID-1 Volumes on the Root
(/) File System on Two Disks</title><mediaobject><imageobject><imagedata entityref="rootmirror"/>
</imageobject><textobject><simpara> The context describes the illustration.</simpara>
</textobject>
</mediaobject>
</figure><para><olink targetptr="mirroroverview-fig-2" remap="internal">Figure 8&ndash;1</olink> shows
a system with the following configuration. </para><itemizedlist><listitem><para>The mirror that is named <filename>d30</filename> consists
of the submirrors that are named <filename>d31</filename> and <filename>d32</filename>.
The mirror, <filename>d30</filename>, duplicates the data in the root (/)
file system on both submirrors.</para>
</listitem><listitem><para>The root (<filename>/</filename>) file system on <filename>hdisk0</filename> is included in the single-slice concatenation that is named <filename>d31</filename>.</para>
</listitem><listitem><para>The root (<filename>/</filename>) file system is copied to
the hard disk named <filename>hdisk1</filename>. This copy is the single-slice
concatenation that is named <filename>d32</filename>. </para>
</listitem>
</itemizedlist>
</sect1><sect1 id="volumes-22"><title>Overview of Solaris Volume Manager Components</title><para>The custom JumpStart installation method and Solaris Live Upgrade enable
you to create the following components that are required to replicate data.</para><itemizedlist><listitem><para>State database and state database replicas (metadbs)</para>
</listitem><listitem><para>RAID-1 volumes (mirrors) with single-slice concatenations
(submirrors)</para>
</listitem>
</itemizedlist><para>This section briefly describes each of these components. For complete
information about these components, see <olink targetdoc="logvolmgradmin" remap="external"><citetitle remap="book">Solaris Volume Manager Administration Guide</citetitle></olink>.</para><sect2 id="basics-40"><title>State Database and State Database Replicas</title><para>The <emphasis>state database</emphasis> is  a database that stores information
on a physical disk. The state database records and tracks changes  that are
made to your configuration. Solaris Volume Manager automatically updates the state
 database when a configuration or state change occurs. Creating a new volume
is  an example of a configuration change. A submirror failure is an example
of a  state change. </para><para>The state database is actually a collection of multiple, replicated
 database copies. Each copy, referred to as a <emphasis>state database  replica</emphasis>,
ensures that the data in the database is always valid.  Having copies of the
state database protects against data loss from single  points of failure.
The state database tracks the location and status of all  known state database
replicas. </para><para>Solaris Volume Manager cannot operate until you have created the state database
 and its state database replicas. A Solaris Volume Manager  configuration must have
an operating state database.</para><para>The state  database replicas ensure that the data in the state
database is always valid.  When the state database is updated, each state
database replica is also updated.  The updates occur one at a time to protect
against corruption of all updates  if the system crashes.</para><para>If your system loses a state database replica, Solaris Volume Manager must
identify which state database replicas still contain valid data. Solaris Volume Manager 
determines this information by using a <emphasis>majority consensus  algorithm</emphasis>.
This algorithm requires that a majority (half + 1) of the  state database
replicas be available and in agreement before any of them are  considered
valid. Because of this majority consensus algorithm, you  must create at least
three state database replicas when you set up your disk  configuration. A
consensus can be reached if at least two of the three  state database replicas
are available. </para><para>Each state database replica occupies 4 Mbytes (8192 disk sectors) of
disk  storage by default. Replicas can be stored on the following  devices:</para><itemizedlist><listitem><para>A dedicated local disk slice</para>
</listitem><listitem><para><emphasis role="strong">Solaris Live Upgrade only</emphasis>:</para><itemizedlist><listitem><para>A local slice that will be part of a  volume</para>
</listitem><listitem><para>A local slice that will be part of a UFS logging  device</para>
</listitem>
</itemizedlist>
</listitem>
</itemizedlist><para>Replicas cannot be stored on the root (<filename>/</filename>),  <filename>swap</filename>, or <filename>/usr</filename> slices, or on slices  that contain
existing file systems or data. After the replicas have been stored,  volumes
or file systems can be placed on the same slice.</para><para>You can keep more than one copy of a state database on one slice. However,
 you might make the system more vulnerable to a single point of failure by
placing state database replicas on a single slice.</para><informaltable frame="topbot"><tgroup cols="2" colsep="0" rowsep="0"><colspec colwidth="50*"/><colspec colwidth="50*"/><thead><row><entry rowsep="1" valign="top"><para>Description</para>
</entry><entry rowsep="1" valign="top"><para>For More Information</para>
</entry>
</row>
</thead><tbody><row><entry><para>When using custom JumpStart or Solaris Live Upgrade to install RAID-1
volumes, review these guidelines and requirements.</para>
</entry><entry><para><olink targetptr="volumes-10" remap="internal">State Database Replicas Guidelines and
Requirements</olink></para>
</entry>
</row><row><entry><para>Obtain more detailed information about the state database and state
database replicas.</para>
</entry><entry><para><olink targetdoc="logvolmgradmin" remap="external"><citetitle remap="book">Solaris Volume Manager Administration Guide</citetitle></olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect2><sect2 id="volumes-15"><title>RAID-1 Volumes (Mirrors)</title><para>A RAID-1 volume, or <firstterm>mirror</firstterm>, is a volume
that  maintains identical copies of the data in RAID-0 volumes (single-slice
concatenations). After you configure a RAID-1 volume, the volume can be used
just as if it were a physical  slice. You can duplicate any file system, including
existing file systems. You can  also use a RAID-1 volume for any application,
such as a database.</para><para>Using RAID-1 volumes to mirror file systems has advantages and disadvantages:</para><itemizedlist><listitem><para>With RAID-1 volumes, data can be read from both RAID-0 volumes
simultaneously (either  volume can service any request), providing improved
performance. If one physical  disk fails, you can continue to use the mirror
with no loss in performance or  loss of data.</para>
</listitem><listitem><para>Using RAID-1 volumes requires an investment in disks. You
need at least twice as  much disk space as the amount of data.</para>
</listitem><listitem><para>Because Solaris Volume Manager  software must write to all RAID-0
volumes, duplicating the data can also increase the time that is required
for write requests to be written to disk.</para>
</listitem>
</itemizedlist><informaltable frame="topbot"><tgroup cols="2" colsep="0" rowsep="0"><colspec colwidth="50*"/><colspec colwidth="50*"/><thead><row><entry rowsep="1" valign="top"><para>Description</para>
</entry><entry rowsep="1" valign="top"><para>For More Information</para>
</entry>
</row>
</thead><tbody><row><entry><para>Planning for RAID-1 volumes</para>
</entry><entry><para><olink targetptr="volumes-17" remap="internal">RAID-1 and RAID-0 Volume Requirements
and Guidelines</olink></para>
</entry>
</row><row><entry><para>Detailed information about RAID-1 volumes</para>
</entry><entry><para><olink targetdoc="logvolmgradmin" remap="external"><citetitle remap="book">Solaris Volume Manager Administration Guide</citetitle></olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect2><sect2 id="volumes-13"><title>RAID-0 Volumes (Concatenations)</title><para>A RAID-0 volume is a single-slice concatenation. The concatenation
is a volume whose data is  organized serially and adjacently across components,
forming one logical storage  unit. The custom JumpStart installation method
and Solaris Live Upgrade do not enable you to create stripes or other complex
Solaris Volume Manager volumes.</para><para>During the installation or upgrade,
you can create RAID-1 volumes (mirrors) and attach RAID-0 volumes to these
mirrors. The RAID-0 volumes that  are <firstterm>mirrored</firstterm> are
called  <firstterm>submirrors</firstterm>. A mirror is made of one or more
RAID-0  volumes. After the installation, you can manage the data on separate
RAID-0 submirror volumes by administering the RAID-1 mirror volume through
the Solaris Volume Manager software.</para><para>The custom JumpStart installation method enables you to create a mirror
that  consists of up to two submirrors. Solaris Live Upgrade enables you to
create a mirror that consists of up to three submirrors. Practically, a two-way
mirror is usually sufficient. A third  submirror enables you to make online
backups without losing data redundancy  while one submirror is offline for
the backup.</para><informaltable frame="topbot"><tgroup cols="2" colsep="0" rowsep="0"><colspec colwidth="50*"/><colspec colwidth="50*"/><thead><row><entry rowsep="1" valign="top"><para>Description</para>
</entry><entry rowsep="1" valign="top"><para>For More Information</para>
</entry>
</row>
</thead><tbody><row><entry><para>Planning for RAID&ndash;0 volumes</para>
</entry><entry><para><olink targetptr="volumes-17" remap="internal">RAID-1 and RAID-0 Volume Requirements
and Guidelines</olink></para>
</entry>
</row><row><entry><para>Detailed information about RAID-0 volumes</para>
</entry><entry><para><olink targetdoc="logvolmgradmin" remap="external"><citetitle remap="book">Solaris Volume Manager Administration Guide</citetitle></olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect2>
</sect1><sect1 id="mirroroverview-300"><title>Example of RAID-1 Volume Disk Layout</title><para>The following figure shows a RAID-1 volume that duplicates the root
file system (<filename>/</filename>) over two physical disks. State database
replicas (metadbs) are placed on both disks.</para><figure id="mirroroverview-fig-4"><title>RAID-1 Volume Disk Layout</title><mediaobject><imageobject><imagedata entityref="fsmirror"/>
</imageobject><textobject><simpara>The context describes the illustration.</simpara>
</textobject>
</mediaobject>
</figure><para><olink targetptr="mirroroverview-fig-4" remap="internal">Figure 8&ndash;2</olink> shows
a system with the following configuration. </para><itemizedlist><listitem><para>The mirror that is named <filename>d30</filename> consists
of the submirrors that are named <filename>d31</filename> and <filename>d32</filename>.
The mirror, <filename>d30</filename>, duplicates the data in the root (/)
file system on both submirrors.</para>
</listitem><listitem><para>The root (<filename>/</filename>) file system  on <filename>hdisk0</filename> is included in the single-slice concatenation that is named <filename>d31</filename>.</para>
</listitem><listitem><para>The root (<filename>/</filename>) file system is copied to
the hard disk named <filename>hdisk1</filename>. This copy is the single-slice
concatenation that is named <filename>d32</filename>. </para>
</listitem><listitem><para>State database replicas are created on both slices: <filename>hdisk0</filename> and <filename>hdisk1</filename>.</para>
</listitem>
</itemizedlist><informaltable frame="topbot"><tgroup cols="2" colsep="0" rowsep="0"><colspec colwidth="50*"/><colspec colwidth="50*"/><thead><row><entry rowsep="1" valign="top"><para>Description</para>
</entry><entry rowsep="1" valign="top"><para>For More Information</para>
</entry>
</row>
</thead><tbody><row><entry><para>JumpStart profile example</para>
</entry><entry><para><olink targetdoc="solinstalladv" targetptr="preparecustom-45277" remap="external"><citetitle remap="section">Profile Examples</citetitle> in <citetitle remap="book">Solaris Express Installation Guide: Custom JumpStart and Advanced Installations</citetitle></olink></para>
</entry>
</row><row><entry><para>Solaris Live Upgrade step-by-step procedures</para>
</entry><entry><para><olink targetdoc="solinstallupg" targetptr="lucreate-1000" remap="external"><citetitle remap="section">To Create a Boot Environment With RAID-1 Volumes (Mirrors)</citetitle> in <citetitle remap="book">Solaris Express Installation Guide:  Solaris Live Upgrade and Upgrade Planning</citetitle></olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1>
</chapter>