Purpose
To
provide instructions to the customer to create a Flash Archive recovery image
that can be used to restore a system to "factory fresh" condition.
This document provides the simplest instructions to create a Flash Archive
(FLAR) image that can be loaded onto the target system to recover from a failed
disk drive.
Assumptions
The
customer has access to both:
Initial boot
media (installation CD/DVD), or netinstall service.
Off-system
storage for the FLAR image.
Instructions
Creating the FLAR image.
Record the
partition table of the disk drive that the image is for. This assumes that the
replacement disk drive will be the same size, and parititioned identically to
the original drive.
There are two methods for obtaining the partition table of the disk drive:
There are two methods for obtaining the partition table of the disk drive:
As a root-level
user, use the format(1M) command to
print out the partition table of the drive that the FLAR image will be taken
from.
# format
The format command will provide the names of the partitions.
# format
The format command will provide the names of the partitions.
As a root-level
user, use the prtvtoc(1M) command to generate
the parition information.
# prtvtoc /dev/dsk/c0t0d0s0
The prtvtoc command will provide the size of the partitions by the number of cylinders for each partition. Save the information to a safe location. It will be used during the restoration of the system image during recovery.
# prtvtoc /dev/dsk/c0t0d0s0
The prtvtoc command will provide the size of the partitions by the number of cylinders for each partition. Save the information to a safe location. It will be used during the restoration of the system image during recovery.
Make sure that
there is adequate space for the FLAR image where it will be created. The FLAR
archive will require up to 5GB of space without compression.
# df -h /tmp
# df -h /tmp
Create the FLAR
archive.
As a root-level user, execute the flarcreate(1M) command. In this example, the FLAR image will be stored to a directory in under /tmp named FLAR_recovery. The FLAR image will be named newsystem_recovery.flar. If stored locally, the creation of the image should take less than 30 minutes.
# mkdir /tmp/FLAR_recovery
# flarcreate -n my_recovery_image -x /tmp/FLAR_recovery /tmp/FLAR_recovery/newsystem_recovery.flar
In this example:
As a root-level user, execute the flarcreate(1M) command. In this example, the FLAR image will be stored to a directory in under /tmp named FLAR_recovery. The FLAR image will be named newsystem_recovery.flar. If stored locally, the creation of the image should take less than 30 minutes.
# mkdir /tmp/FLAR_recovery
# flarcreate -n my_recovery_image -x /tmp/FLAR_recovery /tmp/FLAR_recovery/newsystem_recovery.flar
In this example:
·
The
"-n
my_recovery_image"
implants a name into the FLAR image. The name should be something unique and
meaningful to better identify it as the FLAR image for the system.
·
The
"-x
/tmp/FLAR_recovery"
option causes the /tmp/FLAR_recovery directory and
its contents to be excluded from the FLAR image since it will not be needed in
the recovery image.
NOTE: By default, the flarcreate command ignores items that are located in "swap" partitions.
NOTE: By default, the flarcreate command ignores items that are located in "swap" partitions.
·
/tmp/FLAR_recovery/newsystem_recovery.flar is the path and
filename of the FLAR image. The filename should be something unique and
meaingful to better identify it as the FLAR image for the system.
Saving the FLAR image to a secure
off-system location.
Obviously,
saving your recovery image on the same disk drive that you intend to restore
after a failure will not be useful when that same disk drive fails. The FLAR
image must be saved to an external device or at a remote location across NFS.
That external device or remote location must be accessible to the system at
recovery time.
Copy the new
FLAR to a safe location:
# cp /tmp/FLAR_recovery/newsystem_recovery.flar /net/my-safe-machine/FLAR_image
# cp /tmp/FLAR_recovery/newsystem_recovery.flar /net/my-safe-machine/FLAR_image
Recovering the system image from a FLAR
image.
The
process begins as a normal installation using whichever install method you
choose. Instead of installing from the boot method, the installer is used to
install from the FLAR image.
Begin the boot
process.
Using the
initial boot media (installation CD/DVD).
ok> boot cdrom
ok> boot cdrom
Using the
netinstall service.
ok> boot net
ok> boot net
Supply the
network, date/time, and password information for the system.
When the
"Solaris Interactive Installation" part is reached, select
"Flash" as the installation choice.
Supply the path
to the off-system location of the FLAR image:
/net/my-safe-machine/FLAR_image/newsystem_recovery.flar
/net/my-safe-machine/FLAR_image/newsystem_recovery.flar
Select the
correct Retrieval Method (HTTP, FTP, NFS) to locate the FLAR image.
For our example, we copied to an NFS location.
For our example, we copied to an NFS location.
Specify the FLAR
image location.
From our example, the location would be:
my-safe-machine:/FLAR_image/newsystem_recovery.flar
From our example, the location would be:
my-safe-machine:/FLAR_image/newsystem_recovery.flar
At the
"Select Disks" section, select the disk to install the FLAR image
onto.
There is no need
to preserve existing data.
At the
"File System and Disk Layout" window, choose "Customize" to
edit the disk slices to input the values of the disk partition table from the
original disk. The partition table corresponds to each slice on the disk.
Partition 0 from the partition table maps to Slice 0 (s0) on the harddrive.
·
The
slice sizes can be viewed in Cylinders to better match the output from the
partition table.
·
Do
not change the size of Slice 2. It must span the entire disk regardless of the
space being allocated.
·
If
the replacement disk has more storage space than the original disk, then it can
be partitioned to use the space available. However, at least as much space for
each partition must be allocated as it was allocated on the original disk.
After
the system reboots, the recovery is now complete.
Additional Considerations
Rebuilding the Device Trees
The
recovery instructions assume that none of the hardware components have been
added, removed or moved between the time that the recovery image was created
and the time that a recovery is performed. If a system has been recovered after
hardware has been changed, then it is possible that the device trees (/dev and
/devices) need to be updated. This can be done with either a reconfiguration
reboot of the system, or by using the devfsadm(1M) command.
To
rebuild the device trees, as a root-level user, use the devfsadm(1M) command:
# devfsadm -C
# devfsadm -C
No comments:
Post a Comment