Contenues dansTrouver plus de documentationRessources d'assistance comprises | Télécharger cet ouvrage au format PDF (1479 Ko)
|
/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.
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 |
Forces the command to continue. You must use this option when the slice contains a mounted file system.
Specifies the name of the volume to create. For information on naming volumes, see Volume Names.
Specifies the number of stripes to create.
Specifies the number of components each stripe should have.
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.
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 |
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 |
Specifies the name of the volume to create.
Specifies to create a mirror.
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.
# metattach volume-name submirror-name |
Specifies the name of the RAID-1 volume on which to add the submirror.
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 |
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.
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.