VxVM allows you to mirror the root volume and other areas needed for booting onto another disk. This makes it possible to recover from failure of your root
disk by replacing it with one of its mirrors.
To mirror your root disk onto another disk
root
disk.
vxdiskadd
or vxdiskadm
command, or the Veritas Enterprise Administrator (VEA) to add it to the bootdg
disk group. Ensure that you specify the sliced
format for the disk.
6 (Mirror Volumes on a Disk)
from the vxdiskadm
main menu, or use the VEA to create a mirror of the root disk. (These automatically invoke the vxrootmir
command if the mirroring operation is performed on the root
disk.)
Alternatively, to mirror only those file systems on the root disk that are required to boot the system, run the following command:
# /etc/vx/bin/vxrootmir
altboot_disk
where altboot_disk is the disk media name of the mirror for the root disk. vxrootmir
creates a mirror for rootvol
(the volume for the root
file system on an alternate disk). The alternate root
disk is configured to enable booting from it if the primary root
disk fails.
Having created a root disk mirror, you can make it available for booting. The procedure differs between SPARC and x64 systems.
To define a root disk mirror as bootable on a SPARC system
use-nvramrc?
is set to true
.
Enter the following command at the boot prompt:
If the system is up and running, enter the following command:
If set to true
, this allows the use of alternate boot disks. If use-nvramrc?
is set to false
, the system fails to boot from a devalias
and displays an error message such as the following:
Rebooting with command: boot vx-mirdisk
use-nvramrc?
to true
.
ok
boot prompt:
ok nvramrc=devalias vx-
altboot_disk
where altboot_disk is the device name of an alternate disk from which the system can be booted.
Alternatively, if the system is already up and running, enter the following command to define an alternate boot disk:
devalias
command at the boot prompt to discover the alternate disks from which the system may be booted:
Suitable mirrors of the root disk are listed with names of the form vx-
diskname.
vx-
altboot_disk, by entering the following command at the ok
boot prompt:
If a selected disk contains a root mirror that is stale, vxconfigd
displays an error stating that the mirror is unusable and lists any non-stale alternate bootable disks.
To define a root disk mirror as bootable on an x64 system
root
file system from the root disk mirror (this is usually on slice s0
) on a suitable mount point, such as /a
:
root
file system on the root disk mirror:
# ls -l /dev/rdsk/
altboot_disk_root_slice
Make a note of the PROM path for the root disk mirror that is displayed, such as /pci@0,0/pci1022,7450@2/pci1000,3060@3/sd@3,0:a
.
/a/boot/solaris/bootenv.rc
, and change the line that defines the boot path so that it points to the PROM path of the root disk mirror, for example:
/boot/grub/menu.lst
, and look for the entry for the primary root disk, for example:
title Solaris 10 6/06 s10x_u2wos_09a X86 (primary)
title Solaris 10 6/06 s10x_u2wos_09a X86 (alternate)
On x64 systems, the boot disk device is usually designated as hd0
by GRUB as it is the first disk to be discovered by the operating system. The alternate boot disk usually corresponds to hd1
. If you change the boot order to boot from the alternate boot disk, the new boot disk becomes hd0
, and the old boot disk becomes hd1
.