<chapter id="mirrorplanning-1"><title>Creating RAID-1 Volumes (Mirrors) During
Installation (Planning)</title><highlights><para>This chapter describes the requirements and guidelines that are necessary
to create RAID-1 volumes with the custom JumpStart or Solaris Live Upgrade
installation methods.</para><para>This chapter describes the following topics.</para><itemizedlist><listitem><para><olink targetptr="volumes-28" remap="internal">System Requirement</olink></para>
</listitem><listitem><para><olink targetptr="volumes-10" remap="internal">State Database Replicas Guidelines
and Requirements</olink></para>
</listitem><listitem><para><olink targetptr="volumes-17" remap="internal">RAID-1 and RAID-0 Volume Requirements
and Guidelines</olink></para>
</listitem><listitem><para><olink targetptr="volumes-27" remap="internal">Booting Into Single-User Mode
Causes Mirror to Appear to Need Maintenance</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-28"><title>System Requirement</title><para>To create RAID-1 volumes to duplicate data on specific slices, the disks
that you plan to use must be directly attached and available to the system
during the installation.</para>
</sect1><sect1 id="volumes-10"><title>State Database Replicas Guidelines and Requirements</title><para>You should distribute state
database replicas across slices, drives, and controllers, to  avoid single
points of failure. You want a majority of replicas to survive a  single component
failure. If you lose a replica, when a device fails, for example, the failure
might cause problems with running Solaris Volume Manager software or when rebooting
 the system. Solaris Volume Manager software requires at least half of the replicas
to be  available to run, but a majority (half plus one) to reboot into multiuser
 mode.</para><para>For detailed instructions about creating and administering state database
replicas, see <olink targetdoc="logvolmgradmin" remap="external"><citetitle remap="book">Solaris Volume Manager Administration Guide</citetitle></olink>.</para><sect2 id="volumes-29"><title>Selecting Slices for State Database Replicas</title><para>Before selecting slices for state database replicas, consider the following
guidelines and recommendations.</para><informaltable frame="topbot"><tgroup cols="2" colsep="0" rowsep="0"><colspec colwidth="21.38*"/><colspec colwidth="78.62*"/><thead><row rowsep="1"><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry>
</row>
</thead><tbody><row><entry><para>Choose a dedicated slice</para>
</entry><entry><para>You should create state database replicas on a dedicated slice  of at
least 4 MB per replica. If necessary, you could create state database  replicas
on a slice that is to be used as part of a RAID-0 or RAID-1 volume. You must
 create the replicas before you add the slice to the volume.</para>
</entry>
</row><row><entry><para>Resize a slice</para>
</entry><entry><para>By default, the size of a state database replica is 4 MB or  8192 disk
blocks. Because your disk slices might not be that small, you can resize a
slice to hold the state database replica. For information about  resizing
a slice, see <olink targetdoc="sagdfs" targetptr="disksprep-31030" remap="external">Chapter 11, <citetitle remap="chapter">Administering Disks (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Devices and File Systems</citetitle></olink>.</para>
</entry>
</row><row><entry><para>Choose a slice that is not in use</para>
</entry><entry><para>You can create  state database replicas on slices that are not
in use. The part of a slice that is reserved for the state database replica
should not be  used for any other purpose. </para>
</entry>
</row><row><entry>
</entry><entry><para>You cannot create state database replicas on existing file  systems,
or the root (<filename>/</filename>), <filename>/usr</filename>, and  <filename>swap</filename> file systems. If necessary, you can create a new slice  (provided
a slice name is available) by allocating space from  <filename>swap</filename> and
then put state database replicas on that new  slice. </para>
</entry>
</row><row><entry><para>Choosing a slice that becomes a volume</para>
</entry><entry><para>When a state database replica is placed on a slice that becomes  part
of a volume, the capacity of the volume is reduced by the space that is  occupied
by the replica or replicas. The space that is used by a replica is rounded
up to the  next cylinder boundary and this space is skipped by the volume. </para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect2><sect2 id="volumes-30"><title>Choosing the Number of State Database
Replicas</title><para>Before choosing the number of state database replicas, consider the
following guidelines.</para><itemizedlist><listitem><para>A
minimum of 3 state database replicas are recommended, up to a  maximum of
50 replicas per Solaris Volume Manager disk set. The  following guidelines are recommended:</para><itemizedlist><listitem><para>For a system with only a single drive: put all three replicas
in  one slice.</para>
</listitem><listitem><para>For a system with two to four drives: put two replicas on
each  drive.</para>
</listitem><listitem><para>For a system with five or more drives: put one replica on
each  drive.</para>
</listitem>
</itemizedlist>
</listitem><listitem><para>Additional state database replicas
can improve the mirror's performance. Generally, you need to add two replicas
for each mirror you add to the system.</para>
</listitem><listitem><para>If you have a RAID-1 volume that is to be used for small-sized
 random I/O (for example, for a database), consider your number of replicas.
For best performance, ensure that you have at least two extra  replicas per
RAID-1 volume on slices (and preferably on disks and controllers) that  are
unconnected to the RAID-1 volume. </para>
</listitem>
</itemizedlist>
</sect2><sect2 id="volumes-31"><title>Distributing State Database Replicas Across
Controllers</title><para>If multiple controllers exist, replicas should be distributed
as  evenly as possible across all controllers. This strategy provides redundancy
if a controller fails and also helps balance the load. If multiple disks exist
 on a controller, at least two of the disks on each controller should store
a  replica.</para>
</sect2>
</sect1><sect1 id="volumes-17"><title>RAID-1 and RAID-0 Volume Requirements and Guidelines</title><para>When you are working
with RAID-1 volumes (mirrors) and RAID-0 volumes (single-slice concatenations),
consider the following guidelines.</para><sect2 id="mirrorplanning-2"><title>Custom JumpStart and Solaris Live Upgrade
Guidelines</title><para>The custom JumpStart installation method and Solaris Live Upgrade support
a subset of the features that are available in the Solaris Volume Manager
software. When you create mirrored file systems with these installation programs,
consider the following guidelines.</para><informaltable frame="topbot" pgwide="100"><tgroup cols="3" colsep="0" rowsep="0"><colspec colwidth="28.51*"/><colspec colname="colspec0" colwidth="60.54*"/><colspec colwidth="60.95*"/><thead><row rowsep="1"><entry><para>Installation Program</para>
</entry><entry><para>Supported Feature </para>
</entry><entry><para>Unsupported Feature</para>
</entry>
</row>
</thead><tbody><row><entry><para>Custom JumpStart and Solaris Live Upgrade</para>
</entry><entry><itemizedlist><listitem><para>Supports RAID-0 and RAID-1 volumes, but does not support other
Solaris Volume Manager components, such as RAID-5 volumes.</para>
</listitem><listitem><para>RAID-0 volume is supported, but only as a single-slice concatenation.</para>
</listitem>
</itemizedlist>
</entry><entry><para>In Solaris Volume manager a RAID-0 volume can refer to disk stripes
or disk concatenations. You cannot create RAID-0 stripe volumes during the
installation or upgrade.</para>
</entry>
</row><row><entry><para>Custom JumpStart</para>
</entry><entry><itemizedlist><listitem><para>Supports the creation of RAID-1 volumes during an initial
installation only.</para>
</listitem><listitem><para>You can create up to two RAID-0 volumes (submirrors) for each
RAID-1 volume. Two submirrors usually provide sufficient data redundancy for
most applications, and  the disk drive costs are less expensive. </para>
</listitem>
</itemizedlist>
</entry><entry><itemizedlist><listitem><para>Does not support an upgrade when RAID-1 volumes are configured.</para>
</listitem><listitem><para>More than two RAID-0 volumes are not supported.</para>
</listitem>
</itemizedlist>
</entry>
</row><row><entry><para>Solaris Live Upgrade</para>
</entry><entry><itemizedlist><listitem><para>You can create up to three  RAID-0 volumes (submirrors) for
each RAID-1 volume. Three submirrors enable you  to take a submirror offline
and perform a backup while maintaining the two remaining submirrors for continued
data redundancy. </para>
</listitem><listitem><para>Supports the creation of RAID-1 volumes during an upgrade.</para>
</listitem>
</itemizedlist><para>For examples, see <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><entry><para>More than three RAID-0 volumes are not supported.</para>
</entry>
</row><row><entry><para>Creating and Installing a Solaris Flash with RAID-1 volumes</para>
</entry><entry><para>You can create a Solaris Flash archive created from a master system
that has Solaris Volume Manager RAID-1 volumes configured.  The Solaris Flash creation
software removes all RAID-1 volume information from the archive to keep the
integrity of the clone system.  With custom JumpStart you can rebuild the
RAID-1 volumes by using a JumpStart profile.  With Solaris Live Upgrade, you
create a boot environment with RAID-1 volumes configured and install the archive.
 The Solaris installation program cannot be used to install RAID-1 volumes
with a Solaris Flash archive.</para><para>For examples of RAID-1 volumes in JumpStart profiles, see <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><entry><para>Veritas VxVM stores configuration information in areas not available
to Solaris Flash.  If Veritas VxVm file systems have been configured,
you should not create a Solaris Flash archive.  Also, Solaris install,
including JumpStart and Solaris Live Upgrade do not support rebuilding VxVM
volumes at installation time. Therefore, if you are planning to deploy Veritas
VxVM software using a Solaris Flash archive, the archive must be created
prior to configuring the VxVM file systems.  The clone systems must be then
configured individually after the archive has been applied and the system
rebooted.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable><sect3 id="epudh"><title>RAID Volume Name Requirements and Guidelines for
Custom JumpStart and Solaris Live Upgrade</title><para>Observe the following rules when assigning names for volumes.</para><itemizedlist><listitem><para>Use a naming method that maps the slice number and disk number
 to volume numbers.</para>
</listitem><listitem><para>Volume names must begin with the letter <literal>d</literal> followed
 by a number, for example, <filename>d0</filename>.</para>
</listitem><listitem><para>Solaris Volume Manager has 128 default volume names from 0&ndash;127.
 The following list shows some example volume names.</para><itemizedlist><listitem><para>Device <filename>/dev/md/dsk/d0</filename> &ndash; block volume
 <literal>d0</literal></para>
</listitem><listitem><para>Device <filename>/dev/md/dsk/d1</filename> &ndash; block volume <literal>d1</literal></para>
</listitem>
</itemizedlist>
</listitem><listitem><para>Use ranges for each particular type of volume. For example,
 assign numbers 0&ndash;20 for RAID-1 volumes, and 21&ndash;40 for RAID-0
volumes.</para>
</listitem>
</itemizedlist><sect4 id="epudi"><title>RAID Volume Naming Conventions for Solaris Live Upgrade</title><para>When you use the Solaris Live Upgrade to create RAID-1 volumes (mirrors)
and RAID-0 volumes (submirrors),  you can enable the software to detect and
assign volume names,  or you can assign the names. If you enable the software
 to detect the names, the software assigns the first mirror or submirror name
that  is available. If you assign mirror names, assign names ending in zero
so that the installation can use the names ending in 1 and 2  for submirrors.
If you assign submirror names, assign names ending in 1 or 2. If you assign
numbers incorrectly, the mirror might not  be created. For example, if you
specify a mirror name with a number that  ends in 1 or 2 (<literal>d1</literal> or <literal>d2</literal>), Solaris Live Upgrade fails to create the mirror if the  mirror
name duplicates a submirror's name. </para><note><para>In previous releases, an abbreviated volume name could be entered.
Starting with the Solaris
Express 2/07 release, only the full volume name can be entered.
For example, only the full volume name, such as <filename>/dev/md/dsk/d10</filename>,
can be used to specify a mirror.</para>
</note><example id="gdleo"><title>Solaris Live Upgrade: Enable the Software to Detect
and Name the Mirror and Submirror</title><para>In this example, Solaris Live Upgrade assigns the volume names. The
RAID-1 volumes <literal>d0</literal> and <literal>d1</literal> are the only
volumes in use. For the mirror <literal>d10</literal>, Solaris Live Upgrade
chooses <literal>d2</literal> for the submirror for the device <literal>c0t0d0s0</literal> and <literal>d3</literal> for the submirror for the device <literal>c1t0d0s0</literal>.</para><screen><userinput>lucreate -n newbe -m /:/dev/md/dsk/d10:mirror,ufs -m /:/dev/dsk/c0t0d0s0:attach
-m /:/dev/dsk/c1t0d0s0:attach</userinput></screen>
</example><example id="gdleq"><title>Solaris Live Upgrade: Assign Mirror and Submirror
Names</title><para>In this example, the volume names are assigned in the command. For the
mirror <literal>d10</literal>, <literal>d11</literal> is the name for the
submirror for the device <literal>c0t0d0s0</literal> and <literal>d12</literal> is
the name for the submirror for the device <literal>c1t0d0s0</literal>.</para><screen><userinput>lucreate -n newbe -m /:/dev/md/dsk/d10:mirror,ufs -m /:/dev/dsk/c0t0d0s0,/dev/md/dsk/d11:attach</userinput>
<userinput>-m /:/dev/dsk/c1t0d0s0,/dev/md/dsk/d12:attach</userinput></screen><para>For detailed information about Solaris Volume Manager naming requirements,
see <olink targetdoc="logvolmgradmin" remap="external"><citetitle remap="book">Solaris Volume Manager Administration Guide</citetitle></olink>.</para>
</example>
</sect4><sect4 id="epudj"><title>RAID-Volume Naming Conventions for Custom JumpStart</title><para>When you use the custom JumpStart installation method to create RAID-1
volumes (mirrors) and RAID-0 volumes (submirrors),  you can enable the software
to detect and assign volume names to mirrors,  or you can assign the names
in the profile.</para><itemizedlist><listitem><para>If you enable the software  to detect the names, the software
assigns the first volume number that  is available.</para>
</listitem><listitem><para>If you assign names in the profile, assign mirror names  ending
in zero so that the installation can use the names ending in 1 and 2  for
submirrors.</para><note><para>If you assign numbers incorrectly, the mirror might not  be created.
For example, if you specify a mirror name with a number that  ends in 1 or
2 (<literal>d1</literal> or <literal>d2</literal>), JumpStart fails to create
the mirror if the  mirror name duplicates a submirror's name. </para>
</note>
</listitem>
</itemizedlist><note><para>You can abbreviate the names of physical disk slices and Solaris
Volume Manager volumes. The abbreviation is the shortest name that uniquely
identifies a device. Examples follow.</para><itemizedlist><listitem><para>A Solaris Volume Manager volume can be identified by its <filename>d<replaceable>num</replaceable></filename> designation, so that, for example, <filename>/dev/md/dsk/d10</filename> becomes simply <filename>d10</filename>.</para>
</listitem><listitem><para>If a system has a single controller and multiple disks, you
might use <filename>t0d0s0</filename>, but with multiple controllers use <filename>c0t0d0s0</filename>. </para>
</listitem>
</itemizedlist>
</note><example id="gdkwy"><title>Enable the Software to Detect the Mirror and Submirror
Names</title><para>In the following profile example, the mirror is assigned the first volume
numbers that are available.  If the next available mirror ending in zero 
is <literal>d10</literal>, then the names <literal>d11</literal> and <literal>d12</literal> are assigned to the submirrors.</para><programlisting>filesys                 mirror c0t0d0s1  / </programlisting>
</example><example id="gdkxu"><title>Assigning Mirror and Submirror Names</title><para>In the following profile example, the mirror number is assigned in the
profile as d30. The submirror names are assigned by the software, based on
the mirror number and the first available submirrors. The submirrors are named
d31 and d32.</para><programlisting>filesys                 mirror:d30 c0t1d0s0 c0t0d0s0  /</programlisting>
</example><para>For detailed information about Solaris Volume Manager naming requirements,
see <olink targetdoc="logvolmgradmin" remap="external"><citetitle remap="book">Solaris Volume Manager Administration Guide</citetitle></olink>.</para>
</sect4>
</sect3>
</sect2><sect2 id="mirrorplanning-3"><title>Guidelines for Selecting Disks and Controllers</title><para>When you choose the disks and controllers that you want to use to mirror
a file system, consider the following guidelines.</para><itemizedlist><listitem><para>Use components that are on different controllers to  increase
the number of simultaneous reads and writes that can be  performed.</para>
</listitem><listitem><para>Keep the slices of different submirrors on different disks
and  controllers. Data protection is diminished considerably if slices of
two or more  submirrors of the same mirror are on the same disk.</para>
</listitem><listitem><para>Organize  submirrors across separate controllers, because
controllers and associated  cables tend to fail more often than disks. This
practice also improves mirror  performance.</para>
</listitem><listitem><para>Use the same type of disks and controllers in a single mirror.
 Particularly in old SCSI storage devices, different models or brands of disk
or  controller can have widely varying performance. Mixing the different performance
 levels in a single mirror can cause performance to degrade  significantly.</para>
</listitem>
</itemizedlist>
</sect2><sect2 id="mirrorplanning-4"><title>Guidelines for Selecting Slices</title><para>When you choose the slices that you want to use to mirror a file system,
consider the following guidelines.</para><itemizedlist><listitem><para>Any file system, including root (<filename>/</filename>),
 <filename>swap</filename>, and <filename>/usr</filename>, can use a mirror.
Any application,  such as a database, also can use a mirror.</para>
</listitem><listitem><para>Make sure that your submirror slices are of equal size. Submirrors
of different sizes  result in unused disk space.</para>
</listitem><listitem><para>If you have a mirrored file system in which the first submirror
 attached does not start on cylinder 0,  all additional submirrors you attach
 must also not start on cylinder 0. If you attempt to attach a submirror starting
 on cylinder 0 to a mirror in which the original submirror does not start
on  cylinder 0, the following error message is displayed:        </para><screen>can't attach 
labeled submirror to an unlabeled mirror </screen><para>You must ensure that all  submirrors you plan to attach to a mirror
either all start on  cylinder 0, or that none of them start on cylinder 0. </para><para>Starting cylinders do not have to be identical across all submirrors,
but  all submirrors must either include or not include cylinder 0.</para>
</listitem>
</itemizedlist>
</sect2>
</sect1><sect1 id="volumes-27"><title>Booting Into Single-User Mode Causes Mirror
to Appear to Need Maintenance</title><para>If a system with mirrors for root (<filename>/</filename>), <filename>/usr</filename>,
and <filename>swap</filename> is booted into single-user mode, the system
indicates that these mirrors are in need of maintenance. When you view these
mirrors with the <command>metastat</command> command, these mirrors, and possibly
all mirrors on the system, appear in the &ldquo;Needing Maintenance&rdquo;
state.</para><para>Though this situation appears to be potentially dangerous, do not be
concerned. The <command>metasync <option>r</option></command> command, which
normally occurs during boot to resynchronize mirrors, is interrupted when
the system is booted into single-user mode. After the system is rebooted,
the  <command>metasync <option>r</option></command> command runs and resynchronizes
all mirrors.</para><para>If this interruption is a concern, run the <command>metasync <option>r</option></command> command
manually.</para><para>For more information about the <command>metasync</command>, see the <olink targetdoc="refman1m" targetptr="metasync-1m" remap="external"><citerefentry><refentrytitle>metasync</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page,
and <olink targetdoc="logvolmgradmin" remap="external"><citetitle remap="book">Solaris Volume Manager Administration Guide</citetitle></olink>.</para>
</sect1>
</chapter>