Creating a RAID-1 Volume
How to Create a RAID-1 Volume From Unused Slices
This procedure shows you how to create a two-way mirror. If you
want to create a three-way mirror or a four-way mirror, use the same
procedure.
Before You Begin
Check Prerequisites for Creating Solaris Volume Manager Components and Creating and Maintaining RAID-1 Volumes.
- Create two stripes or concatenations. These components become the submirrors.
See How to Create a RAID-0 (Stripe) Volume or How to Create a RAID-0 (Concatenation) Volume.
- To create the mirror, use one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, then choose Action⇒Create Volume and follow the onscreen instructions. For more information, see the online help.
Use the following form of the metainit command to create a one-way mirror:
# metainit volume-name -m submirror-name
- volume-name
Specifies the name of the volume to create
- -m
Specifies to create a mirror
- submirror-name
Specifies the name of the component that will be the first submirror in the mirror
See the following examples and the metainit(1M) man page for more information.
- To add the second submirror, use one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, then choose the mirror you want to modify. Choose Action⇒Properties, then the Submirrors. Follow the onscreen instructions to attach the submirror. For more information, see the online help.
Use the following form of the metattach command:
# metattach volume-name submirror-name
- volume-name
Specifies the name of the RAID-1 volume on which to add the submirror
- submirror-name
Specifies the name of the component that will be the second submirror attached to the mirror
See the following examples and the metattach(1M) man page for more information.
Example 11-1 Creating a Two-Way Mirror
# metainit d51 1 1 c0t0d0s2
d51: Concat/Stripe is setup
# metainit d52 1 1 c1t0d0s2
d52: Concat/Stripe is setup
# metainit d50 -m d51
d50: Mirror is setup
# metattach d50 d52
d50: Submirror d52 is attached
This example shows you how to create the two-way mirror, d50. The metainit
command creates two submirrors (d51 and d52), which are RAID-0 volumes. The
metainit -m command creates the one-way mirror from the d51 RAID-0 volume. The
metattach command attaches d52, creating a two-way mirror and causing a resynchronization. Any
data on the attached submirror is overwritten by the other submirror during the
resynchronization.
Example 11-2 Creating a Two-Way Mirror Without Resynchronization
# metainit d51 1 1 c0t0d0s2
d51: Concat/Stripe is setup
# metainit d52 1 1 c1t0d0s2
d52: Concat/Stripe is setup
# metainit d50 -m d51 d52
metainit: d50: WARNING: This form of metainit is not recommended.
The submirrors may not have the same data.
Please see ERRORS in metainit(1M) for additional information.
d50: Mirror is setup
This example shows the creation a two-way mirror, d50. The metainit command creates
two submirrors (d51 and d52), which are RAID-0 volumes. The metainit -m
command is then run with both submirrors to create the mirror. When you
create a mirror using the metainit command rather than the metattach command ,
no resynchronization operations occur. As a result, data could become corrupted when Solaris
Volume Manager assumes that both sides of the mirror are identical and can
be used interchangeably.
See Also
To prepare a newly created mirror for a file system, see Chapter 18, Creating UFS, TMPFS, and LOFS File Systems (Tasks), in System Administration Guide: Devices and File Systems. 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.
How to Create a RAID-1 Volume From a File System
Use this procedure to mirror an existing file system. If the file
system can be unmounted, the entire procedure can be completed without a reboot. For
file systems that cannot be unmounted, such as /usr and /swap, the
system must be rebooted to complete the procedure.
When creating a RAID-1 volume from an existing file system built on a
slice, only the single slice may be included in the primary RAID-0
volume (submirror). If you are mirroring system-critical file systems, all submirrors must consist of
only a single slice.
For the procedures associated with mirroring the root (/) file system, see SPARC: How to Create a RAID-1 Volume From the root (/) File System
and x86: How to Create a RAID-1 Volume From the root (/) File System.
In the example used in this procedure, the existing slice is c1t0d0s0.
The second slice, c1t1d0s0, is available for the second half of the mirror.
The submirrors are d1 and d2, respectively, and the mirror is d0.
Caution - Be sure to create a one-way mirror with the metainit command then attach
the additional submirrors with the metattach command. When the metattach command is not
used, no resynchronization operations occur. As a result, data could become corrupted when
Solaris Volume Manager assumes that both sides of the mirror are identical and
can be used interchangeably.
Before You Begin
Check Prerequisites for Creating Solaris Volume Manager Components and Creating and Maintaining RAID-1 Volumes.
- Identify the slice that contains the existing file system to be mirrored This
example uses the slice c1t0d0s0.
- Create a new RAID-0 volume on the slice from the previous step by
using one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, then choose Action⇒Create Volume. Follow the onscreen instructions . For more information, see the online help.
Use the following form of the metainit command:
# metainit -f volume-name number-of-stripes components-per-stripe component-name
- -f
Forces the command to continue. You must use this option when the slice contains a mounted file system.
- volume-name
Specifies the name of the volume to create. For information on naming volumes, see Volume Names.
- number-of-stripes
Specifies the number of stripes to create.
- components-per-stripe
Specifies the number of components each stripe should have.
- component-names
Specifies the names of the components that are used. This example uses the root slice, c0t0d0s0.
- Create a second RAID-0 volume (concatenation) on an unused slice (c1t1d0s0 in this
example) to act as the second submirror. The second submirror must be the
same size as the original submirror or larger. Use one of the following
methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, then choose Action->Create Volume and follow the instructions on screen. For more information, see the online help.
Use the following form of the metainit command.
# metainit volume-name number-of-stripes components-per-stripe component-name
Note - See Step 2 for an explanation of the options.
- Create a one-way mirror by using one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, then choose Action⇒Create Volume. Follow the onscreen instructions . For more information, see the online help.
Use the following form of the metainit command.
# metainit volume-name -m submirror-name
- volume-name
Specifies the name of the volume to create.
- -m
Specifies to create a mirror.
- submirror-name
Specifies the name of the component that will be the first submirror in the mirror. In this example, it is the RAID-0 volume that contains the root slice.
See the metainit(1M) man page for more information.
Caution - When you create a mirror from an existing file system, you must follow
the next two steps precisely to avoid data corruption.
- Edit the /etc/vfstab file so that the file system mount instructions refer to
the mirror, not to the block device. For more information about the/etc/vfstab file,
see Mounting File Systems in System Administration Guide: Devices and File Systems.
For example, if the /etc/vfstab file contains the following entry for the file system:
/dev/dsk/slice /dev/rdsk/slice /var ufs 2 yes -
Change the entry to read as follows:
/dev/md/dsk/mirror-name /dev/md/rdsk/mirror-name /var ufs 2 yes -
- Remount your newly mirrored file system according to one of the following procedures:
If you are mirroring a file system that can be unmounted, then unmount and remount the file system.
# umount /filesystem
# mount /filesystem
If you are mirroring a file system that cannot be unmounted, then reboot your system.
# reboot
- Use the following form of the metattach command to attach the second submirror.
# metattach volume-name submirror-name
- volume-name
Specifies the name of the RAID-1 volume on which to add the submirror
- submirror-name
Specifies the name of the component that will be the second submirror attached to the mirror
See the metattach(1M) man page for more information.
Example 11-3 Creating a Two-Way Mirror From a File System That Can Be Unmounted
# metainit -f d1 1 1 c1t0d0s0
d1: Concat/Stripe is setup
# metainit d2 1 1 c1t1d0s0
d2: Concat/Stripe is setup
# metainit d0 -m d1
d0: Mirror is setup
# umount /master
(Edit the /etc/vfstab file so that the file system references the mirror)
# mount /master
# metattach d0 d2
d0: Submirror d2 is attached
In this example, the -f option forces the creation of the first concatenation,
d1, which contains the mounted file system /master on /dev/dsk/c1t0d0s0. The second concatenation, d2,
is created from /dev/dsk/c1t1d0s0. This slice must be the same size as
, or larger than the size of d1.) The metainit command with the -m
option creates the one-way mirror, d0, from d1.
Next, the entry for the file system should be changed in the
/etc/vfstab file to reference the mirror. The following line in the /etc/vfstab
file initially appears as follows:
/dev/dsk/c1t0d0s0 /dev/rdsk/c1t0d0s0 /var ufs 2 yes -
The entry is changed to the following:
/dev/md/dsk/d0 /dev/md/rdsk/d0 /var ufs 2 yes -
Finally, the file system is remounted and submirror d2 is attached to the
mirror, causing a mirror resynchronization. The system confirms that the RAID-0 and RAID-1
volumes are set up, and that submirror d2 is attached.
Example 11-4 Creating a Two-way Mirror From a File System That Cannot Be Unmounted
# metainit -f d12 1 1 c0t3d0s6
d12: Concat/Stripe is setup
# metainit d22 1 1 c1t0d0s6
d22: Concat/Stripe is setup
# metainit d2 -m d12
d2: Mirror is setup
(Edit the /etc/vfstab file so that /usr references the mirror)
# reboot
...
# metattach d2 d22
d2: Submirror d22 is attached
This example creates a two-way mirror using a slice containing the /usr
file system. The -f option forces the creation of the first concatenation, d12,
which contains the mounted file system /usr on /dev/dsk/c0t3d0s6. The second concatenation, d22, is
created from /dev/dsk/c1t0d0s6. This slice must be the same size as, or
larger than the size of d12. The metainit command with the -m option creates
the one-way mirror d2 using the concatenation that contains the /usr file system. Next,
the /etc/vfstab file must be edited to change the entry for /usr to
reference the mirror.
The /etc/vfstab file contains the following entry for the /usr file system:
/dev/dsk/c0t3d0s6 /dev/rdsk/c0t3d0s6 /usr ufs 1 yes -
Change the entry to read as follows:
/dev/md/dsk/d2 /dev/md/rdsk/d2 /usr ufs 1 yes -
After a reboot, the second submirror d22 is attached to the mirror, causing
a mirror resynchronization.
Example 11-5 Creating a Mirror From the
/swap Space
# metainit -f d11 1 1 c0t0d0s1
d11: Concat/Stripe is setup
# metainit d21 1 1 c1t0d0s1
d21: Concat/Stripe is setup
# metainit d1 -m d11
d1: Mirror is setup
(Edit the /etc/vfstab file so that swap references the mirror)
# reboot
...
# metattach d1 d21
d1: Submirror d21 is attached
In this example, the -f option forces the creation of the first concatenation,
d11, which contains the mounted file system swap on /dev/dsk/c0t0d0s1. The second concatenation, d21,
is created from /dev/dsk/c1t0d0s1. This slice must be the same size as,
or larger than the size of d11. The metainit command with the -m option
creates the one-way mirror d1 using the concatenation that contains swap. Next, if
there is an entry for swap in the /etc/vfstab file, it must be edited
to reference the mirror.
The /etc/vfstab file contains the following entry for the swap space:
/dev/dsk/c0t0d0s1 - - swap - no -
Change the entry to read as follows:
/dev/md/dsk/d1 - - swap - no -
After a reboot, the second submirror d21 is attached to the mirror, causing
a mirror resynchronization.
To save the crash dump when you have mirrored the swap space, use
the dumpadm command to configure the dump device as a volume. For instance,
if the swap device is named /dev/md/dsk/d2, use the dumpadm command to set
this device as the dump device.
SPARC: How to Create a RAID-1 Volume From the root (/) File System
The process for mirroring the root (/) file system on a SPARC platform
is similar to mirroring any other file system that you cannot unmount. The
procedure differs in that the metaroot command is run instead of manually editing
the /etc/vfstab file. Mirroring the root (/) file system also requires recording the path
to the alternate boot device. This device reboots the system if the submirror
fails.
In the example used in this procedure, the existing slice is c1t0d0s0.
The second slice, c1t1d0s0, is available for the second half of the mirror.
The submirrors are d1 and d2, respectively, and the mirror is d0.
Caution - Be sure to create a one-way mirror with the metainit command then attach
the additional submirrors with the metattach command. When the metattach command is not
used, no resynchronization operations occur. As a result, data could become corrupted when
Solaris Volume Manager assumes that both sides of the mirror are identical and
can be used interchangeably.
Before You Begin
Check Prerequisites for Creating Solaris Volume Manager Components and Creating and Maintaining RAID-1 Volumes.
- Identify the slice that contains the existing root (/) file system to be
mirrored. This example uses the slice c1t0d0s0.
- Create a new RAID-0 volume on the slice from the previous step by
using one of the following methods. Only the single slice can be
included in the RAID-0 volume.
From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, then choose Action⇒Create Volume. Follow the onscreen instructions . For more information, see the online help.
Use the following form of the metainit command:
# metainit -f volume-name number-of-stripes components-per-stripe component-name
- -f
Forces the command to continue. You must use this option when the slice contains a mounted file system.
- volume-name
Specifies the name of the volume to create. For information on naming volumes, see Volume Names.
- number-of-stripes
Specifies the number of stripes to create.
- components-per-stripe
Specifies the number of components each stripe should have.
- component-names
Specifies the names of the components that are used. This example uses the root slice, c0t0d0s0.
- Create a second RAID-0 volume on an unused slice (c1t1d0s0 in this example)
to act as the second submirror. The secondary submirror must be the same
size as the original submirror, or larger. Use one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, then choose Action->Create Volume and follow the instructions on screen. For more information, see the online help.
Use the following form of the metainit command.
# metainit volume-name number-of-stripes components-per-stripe component-name
Note - See Step 2 for and explanation of the options.
- Create a one-way mirror by using one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, then choose Action⇒Create Volume. Follow the onscreen instructions . For more information, see the online help.
Use the following form of the metainit command.
# metainit volume-name -m submirror-name
- volume-name
Specifies the name of the volume to create.
- -m
Specifies to create a mirror.
- submirror-name
Specifies the name of the component that will be the first submirror in the mirror. In this example, it is the RAID-0 volume that contains the root slice.
- Remount your newly mirrored file system. Run the metaroot volume-name command, replacing volume-name
with the name of the mirror you have created. Then, reboot your system.
# metaroot volume-name
# reboot
For more information, see the metaroot(1M) man page.
- Use the following form of the metattach command to attach the second submirror.
# metattach volume-name submirror-name
- volume-name
Specifies the name of the RAID-1 volume on which to add the submirror
- submirror-name
Specifies the name of the component that will be the second submirror attached to the mirror
See the metattach(1M) man page for more information.
- Record the alternate boot path.
- Determine the path to the alternate root device. Use the ls -l command
on the slice that is being attached as the second submirror to the
root (/) file system mirror.
# ls -l /dev/dsk/c1t1d0s0
lrwxrwxrwx 1 root root 55 Mar 5 12:54 /dev/rdsk/c1t1d0s0 -> \
../../devices/sbus@1,f8000000/esp@1,200000/sd@3,0:a
- Record the string that follows the /devices directory: /sbus@1,f8000000/esp@1,200000/sd@3,0:a.
Note - Because the system might not be available, this information should also be written
down somewhere other than on the system. See Recovering From Boot Problems for details on booting
from the alternate boot device.
- Edit the string to change the major name (sd, in this case) to
disk, resulting in /sbus@1,f8000000/esp@1,200000/disk@3,0:a. If the system uses an IDE bus, the
original full path might look like
$ ls -l /dev/dsk/c1t1d0s0
lrwxrwxrwx 1 root root 38 Mar 13 15:03 /dev/dsk/c0t0d0s0 -> \
../../devices/pci@1f,0/ide@d/dad@0,0:a
After changing the major name dad to disk, you would have /pci@1f,0/ide@d/disk@0,0:a
- Use the OpenBootTM PROM nvalias command to define a “backup root” device alias
for the secondary root (/) file system mirror. For example:
ok nvalias backup_root /sbus@1,f8000000/esp@1,200000/disk@3,0:a
- Redefine the boot-device alias to reference both the primary and secondary submirrors, in
the order in which you want them to be used, and store the
configuration.
ok printenv boot-device
boot-device = disk net
ok setenv boot-device disk backup_root net
boot-device = disk backup_root net
ok nvstore
Note - In the event that the primary submirror fails, the system would automatically boot
to the second submirror. Or, if you boot manually, rather than using autoboot,
you would enter:
ok boot backup_root
Example 11-6 SPARC: Creating a Mirror From the root (
/) File System
# metainit -f d1 1 1 c0t0d0s0
d1: Concat/Stripe is setup
# metainit d2 1 1 c0t1d0s0
d2: Concat/Stripe is setup
# metainit d0 -m d1
d0: Mirror is setup
# metaroot d0
# lockfs -fa
# reboot
...
# metattach d0 d2
d0: Submirror d2 is attached
# ls -l /dev/dsk/c0t1d0s0
lrwxrwxrwx 1 root root 88 Feb 8 15:51 /dev/rdsk/c1t3d0s0 ->
../../devices/pci@1f,0/pci@1,1/ide@3/dad@0,0:a
# init 0
.
.
.
ok nvalias backup_root /pci@1f,0/pci@1,1/ide@3/disk@0,0:a
ok setenv boot-device disk backup_root net
ok nvstore
In this example, the -f option forces the creation of the first RAID-0
volume, d1, which contains the mounted root (/) file system on /dev/dsk/c0t0d0s0. The second
concatenation, d2, is created from /dev/dsk/c0t1d0s0. This slice must be the same
size as, or larger than the size of d1. The metainit command with
the -m option creates the one-way mirror d0 using the concatenation that contains
root (/).
Next, the metaroot command edits the /etc/vfstab and /etc/system files so that
the system can be booted with the root (/) file system on a
volume. It is a good idea to run the lockfs -fa command before rebooting. For
more information, see the lockfs(1M) man page.
Do not attach the second submirror before the system is rebooted. You must
reboot after running the metaroot command and before attaching the second submirror.
After a reboot, the submirror d2 is attached to the mirror, causing a
mirror resynchronization. The system confirms that the concatenations and the mirror are set
up, and that submirror d2 is attached.
The ls -l command is run on the root raw device to determine the
path to the alternate root device in case the system might later need
to be booted from it.
x86: How to Create a RAID-1 Volume From the root (/) File System
The process for mirroring the root (/) file system on an x86 based
system is similar to mirroring root on a SPARC system. However, on x86
based systems, the BIOS and fdisk partitioning add an additional layer of complexity.
In the example used in the procedures, the existing slice is c1t0d0s0.
The second slice, c1t1d0s0, is available for the second half of the mirror.
The submirrors are d1 and d2, respectively, and the mirror is d0.
Before You Begin
Before implementing any of the procedures, check Prerequisites for Creating Solaris Volume Manager Components and Creating and Maintaining RAID-1 Volumes.
- Verify that the ordering for the BIOS boot device can be configured to
allow the system to boot off of the second disk in the
mirror.
Before the kernel is started, the system is controlled by the read-only-memory (ROM) Basic
Input/Output System (BIOS), which is the firmware interface on an x86 based system.
The BIOS is analogous to the boot PROM on a SPARC based
system. Some of the BIOS's tasks are as follows:
Perform startup functions.
Detect the correct device from which to boot the system.
Load the master boot record from that device to allow the system to self-boot.
You can usually configure the BIOS to select the order of devices
to probe for the boot record. Additionally, most modern BIOS implementations allow you to
configure your devices so that the failover to the secondary submirror is automatic.
If your system's BIOS does not have this feature and the primary submirror
fails, you need to access the BIOS during system boot to reconfigure the
system to boot from the secondary root slice. Consult the user's guide for
your BIOS for instructions on how to configure settings in your BIOS
Before setting up a root mirror, check the BIOS on your system to
verify that you can boot off of more than one disk. Some
device drivers are configured to only see one disk on the system.
- Verify that the fdisk partitions are configured to support root mirroring.
The existence of a separate x86 boot partition presents a problem when mirroring
the root (/) file system. Because it exists outside of the Solaris fdisk
partition, the x86 boot partition cannot be mirrored by Solaris Volume Manager. Additionally, because
only one copy of the x86 boot partition exists, it represents a single
point of failure.
The GRUB-based installation program of the Solaris 10 1/06 software and subsequent releases
no longer automatically creates an x86 boot partition. However, if the x86 already
exists in the system, the installation program preserves that partition by default.
To determine if your system has a separate x86 boot partition, check the
/etc/vfstab file. The x86 boot partition exists if the file contains an entry
similar to the following:
/dev/dsk/c2t1d0p0:boot - /boot pcfs - no -
To use the Solaris Volume Manager to mirror the root (/) file system,
the file system must use the single Solaris fdisk partition. Therefore, if the
x86 boot partition already exists in the system, delete this partition with the
fdisk command and then reinstall the Solaris software. When you reinstall, the boot
partition is no longer recreated.
Note - Solaris Volume Manager can only mirror slices within the Solaris fdisk partition
If you have multiple fdisk partitions, you need to use another approach to
protect the data outside of the Solaris fdisk partition.
- Make the secondary submirror bootable with a master boot program.
- Specify the master boot program.
# fdisk -b /usr/lib/fs/ufs/mboot /dev/rdsk/c1t1d0p0
The following screen appears:
Total disk size is 31035 cylinders
Cylinder size is 1146 (512 byte) blocks
Cylinders
Partition Status Type Start End Length %
========= ====== ============ ===== === ====== ===
1 Active Solaris 1 31034 31034 100
SELECT ONE OF THE FOLLOWING:
1. Create a partition
2. Specify the active partition
3. Delete a partition
4. Change between Solaris and Solaris2 Partition IDs
5. Exit (update disk configuration and exit)
6. Cancel (exit without updating disk configuration)
Enter Selection:
- Choose number 5 from the menu, and press return.
- Make the secondary disk bootable.
# /sbin/installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c1t1d0s0
For more information about installgrub, refer to the installgrub(1M) man page.
- Identify the slice that contains the existing root (/) file system to be
mirrored.
This example uses the slice c1t0d0s0.
- Create a new RAID-0 volume on the slice from the previous step.
Only the single slice can be included in the RAID-0 volume. Use
one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, then choose Action⇒Create Volume. Follow the onscreen instructions. For more information, see the online help.
Use the following form of the metainit command:
# metainit -f volume-name number-of-stripes components-per-stripe component-name
- -f
Forces the command to continue. You must use this option when the slice contains a mounted file system.
- volume-name
Specifies the name of the volume to create. For information on naming volumes, see Volume Names.
- number-of-stripes
Specifies the number of stripes to create.
- components-per-stripe
Specifies the number of components each stripe should have.
- component-names
Specifies the names of the components that are used. This example uses the root slice, c0t0d0s0.
- Create a second RAID-0 volume (c1t1d0s0 in this example) on an unused slice
to act as the second submirror.
Note - The secondary submirror must be the same size as the original submirror, or
larger. Also, the slice you use as the second submirror must have a
slice tag of “root” and the root slice must be slice 0.
For information on configuring the slice tag field, see the format(1M) man
page.
Use either of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, then choose Action->Create Volume and follow the instructions on screen. For more information, see the online help.
Use the following form of the metainit command.
# metainit volume-name number-of-stripes components-per-stripes component-names
Note - See Step 6 for an explanation of the options.
- Create a one-way mirror by using one of the following methods:
From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, then choose Action⇒Create Volume. Follow the onscreen instructions. For more information, see the online help.
Use the following form of the metainit command.
# metainit volume-name -m submirror-name
- volume-name
Specifies the name of the volume to create.
- -m
Specifies to create a mirror.
- submirror-name
Specifies the name of the component that will be the first submirror in the mirror. In this example, it is the RAID-0 volume that contains the root slice.
- Remount your newly mirrored file system, then reboot the system.
# metaroot volume-name
# reboot
For more information, see the metaroot(1M) man page.
- Attach the second submirror.
# metattach volume-name submirror-name
- volume-name
Specifies the name of the RAID-1 volume on which to add the submirror.
- submirror-name
Specifies the name of the component that will be the second submirror attached to the mirror.
See the metattach(1M) man page for more information.
- Define the alternative boot path in the menu.lst file.
To enable the system to boot off of the disk that holds
the secondary submirror, configure the system to see the disk as the alternate
boot device. In the current example, c1t1d0s0, the alternative path is on the first
slice of the first fdisk partition on the second disk. Thus, you would
edit the menu.lst with the following entry:
title alternate boot
root (hd1,0,a)
kernel /boot/multiboot
module /boot/x86.miniroot-safe
Note - To properly edit entries in menu.lst, you must be familiar with disk-naming conventions
in GRUB. For details, see Chapter 11, GRUB Based Booting (Tasks), in System Administration Guide: Basic Administration
After you have completed editing the menu.lst file, the system is set to
failover to the second disk. If the primary disk fails, disk numbering changes
so that the system boots from the secondary disk.
Caution - On certain cases, the automatic disk-renumbering feature of the BIOS might affect recovery
from an unavailable primary disk. When disk renumbering forces the system to boot
from the secondary disk, the primary disk's boot archive becomes stale. If the
same primary disk becomes available later and you boot the system, the disk
numbering switches again to use the default primary disk for the system boot.
However, at this stage, the primary disk's boot archive remains stale. Consequently, the
system might not boot at all. Therefore make sure that in such cases,
you select the correct entry from the GRUB menu to boot the system
from the valid boot archive. After the system completes the boot up process,
perform the normal metadevice maintenance which synchronizes both primary and secondary disks and
restores the valid boot archive to the primary disk.
Understanding Boot Time Warnings When Mirroring the root (/) File System
After you mirror your root (/) file system, error messages will be displayed
in the console and logged in the system log that is defined in
the /etc/syslog.conf file. These error messages do not indicate a problem. These messages
are displayed for each device type that you are not currently using, because
an unused module cannot be force loaded. The error messages are similar to
the following:
Jul 13 10:17:42 ifr genunix: [ID 370176 kern.warning] WARNING: forceload of
misc/md_trans failed
Jul 13 10:17:42 ifr genunix: [ID 370176 kern.warning] WARNING: forceload of
misc/md_raid failed
Jul 13 10:17:42 ifr genunix: [ID 370176 kern.warning] WARNING: forceload of
misc/md_hotspares failed
You can safely disregard these error messages.