The process for mirroring root (/) is the same as in mirroring any other file system that you cannot unmount, with the exception that you run the metaroot command instead of manually editing the /etc/vfstab file. See How to Create a RAID 1 Volume From a File System. The following sections outline special considerations and issues for mirroring root (/) file systems.
After mirroring your root (/) file system, error messages will be displayed in the console and logged in the system log (as defined in /etc/syslog.conf). These error messages do not indicate a problem—they show up for each device type that you are not currently using, because an unused module cannot be force loaded. The error messages look 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 warning messages.
When you are mirroring root (/), you might need the path to the alternate boot device later if the primary device fails. The process for finding and recording the alternate boot device differs, depending on your system's architecture. See SPARC: Example—Recording the Alternate Boot Device Path or x86: Example—Recording the Alternate Boot Device Path.
In this example, you determine the path to the alternate root device by using the ls -l command on the slice that is being attached as the second submirror to the root (/) mirror.
# ls -l /dev/dsk/c1t3d0s0 lrwxrwxrwx 1 root root 55 Mar 5 12:54 /dev/rdsk/c1t3d0s0 -> \ ../../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.
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/c0t0d0s0 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
You can use the OpenBootTM Prom nvalias command to define a “backup root” device alias for the secondary root (/) mirror. For example:
ok nvalias backup_root /sbus@1,f8000000/esp@1,200000/disk@3,0:a |
Then, 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 |
In the event of primary root disk failure, the system would automatically boot to the second submirror. Or, if you boot manually, rather than using auto boot, you would only enter:
ok boot backup_root |
In this example, you would determine the path to the alternate boot device by using the ls -l command on the slice that is being attached as the second submirror to the root (/) mirror.
# ls -l /dev/dsk/c1t0d0s0 lrwxrwxrwx 1 root root 55 Mar 5 12:54 /dev/rdsk/c1t0d0s0 -> ../. ./devices/eisa/eha@1000,0/cmdk@1,0:a |
Here, you would record the string that follows the /devices directory: /eisa/eha@1000,0/cmdk@1,0:a
If your primary submirror on a mirrored root (/) fails, you will need to initiate the boot from the other submirror. You can either configure the system to boot automatically from the second side of the mirror, or can manually boot from the second side.
See Chapter 10, Booting a System (Tasks), in System Administration Guide: Basic Administration.