[ Printer Friendly Page ]
[ E-mail this Document to Someone ]
[ Was this document useful? Yes or No ]
Infodoc ID |
|
Synopsis |
|
Date |
14820 |
|
SEVM - How to recover a primary boot disk. |
|
14 Apr 2000 |
NOTE: This document was written for VxVM 2.x. New functionality in
VxVM 3.x renders many of the "extra steps" in replacing a
primary root disk obsolete. See the comments interspersed
below regarding steps when using VxVM 3.x.
If Volume Manager (VxVM) is running on a system with the root disk
encapsulated and mirrored, and the root disk fails, the system stays
up and running, due to the fact that it is mirrored, but how can you
recover the original root disk?
First, some terminology:
The 'primary' root disk is the system disk on which the OS was
originally installed. This disk was "encapsulated" into VxVM and
then mirrored. Since this disk is encapsulated, there is a
direct mapping of partitions onto volumes for /, swap, /usr, and
/var.
The 'secondary' root disk is a disk which was first initialized into
VxVM and then used to form a mirror for the primary root disk.
VxVM 2.x: Since it was initialized, rather than encapsulated, there
is no mapping of partitions onto the volumes /, swap, /usr, and /var.
VxVM 3.x: When the mirror of the root disk is created, the mapping
of partitions onto the volumes /, swap, /usr, and /var is maintained.
RECOVERING THE 'SECONDARY' BOOT DISK:
If the 'secondary' system disk fails, the replacement of the disk is
straightforward. It is handled in the same manner that any other
failed drive needs to be replaced.
The easiest way to do this is to run 'vxdiskadm' and choose option
#4 (Remove a disk for replacement). Then, shut down the system (if
necessary) to physically replace the disk, and reboot.
Run 'vxdiskadm' again, this time choosing option #5 (Replace a
failed or removed disk). When asked to 'encapsulate' the disk,
reply "no", and then reply "yes" when asked if you wish to
initialize it.
This will begin recovery of the disk and the mirrors will resync
automatically.
RECOVERING THE 'PRIMARY' BOOT DISK:
NOTE: If you are running Volume Manager version 3.x.x or above, it
is not necessary to follow the steps below. Instead, the process
for replacing the 'primary' boot disk is EXACTLY the same as that
for the 'secondary' boot disk, which is shown above. The reason
for this is because Volume Manager 3.x automatically creates the
underlying "hard" partitions for /usr and /var on the replacement
disk, whereas older versions did not.
If you are using Volume Manager 2.x, continue on:
The recovery of the 'primary' boot disk contains a few additional
steps because the procedure must reestablish the direct mapping
between the partitions on the disk and the system volumes. This is
necessary so that the system can be changed back to use underlying
devices, should this be necessary (for example, to perform a system
upgrade or boot from cdrom to fsck one of these filesystems).
1. Run 'vxdiskadm' and choose option #4 (Remove a disk for
replacement). Then, shut down the system (if necessary) to
physically replace the disk, and reboot.
2. Run 'vxdiskadm' and choose option #5 (Replace a
failed or removed disk). When asked to 'encapsulate' the disk,
reply "no", and then reply "yes" when asked if you wish to
initialize it.
3. This step will change depending on the number of partitions on
the boot disk. The 'vxdiskadm' command will put back partition
0 (for /) automatically, and may also do this for swap.
However, if you have any additional volumes on that disk (i.e.,
/usr or /var), you will have to run a command to put the
partition on the new disk in the correct location.
Examine the partitions on the replaced disk by running 'format'
or 'prtvtoc' on it. At the very least, you will see a partition
for root and one for the public and one for the private
partitions for VxVM. Determine if any partitions are missing.
If so, these "missing" partitions can be recreated easily using
the steps below.
The command to use is 'vxmksdpart'. You give this
command the name of a particular subdisk, and it creates a
partition on the disk in the correct location. The syntax is:
/etc/vx/bin/vxmksdpart <subdisk> <partition> <tag> <flags>
For example, if you have a subdisk named "disk01-02" and wanted
to create partition 7 on the disk to map this subdisk, you can run
/etc/vx/bin/vxmksdpart disk01-02 7 0x00 0x00
3a. SWAP. To create a partition for the swap volume, run:
/etc/vx/bin/vxmksdpart -g rootdg <subdisk> <partition> 0x03 0x01
where <subdisk> is the name of the subdisk used in the swapvol
volume on the primary boot disk (for example, "rootdisk-01"),
and <partition> is the unused partition to use for swap (for
example, "1"). The "0x03" tag specifies this partition is for
'swap'.
3b. USR. To create a partiton for /usr (if this disk contains /usr), run:
/etc/vx/bin/vxmksdpart -g rootdg <subdisk> <partition> 0x04 0x00
3c. VAR. To create a partiton for /var (if this disk contains /var), run:
/etc/vx/bin/vxmksdpart -g rootdg <subdisk> <partition> 0x07 0x00
There is no reason to create any other partitions on the boot disk.
Top
Sun Proprietary/Confidential: Internal Use Only
Feedback to SunSolve Team