Using Flash Archive in the Solaris Operating System for Disaster RecoveryJoseph Gan, May 2005 IntroductionGeneric disaster recovery preparation for the UNIX platform includes
maintaining the server's configuration details. For example, in the
system information, you need to keep a hard copy of the method you are
using for backup and restore. If you use The Solaris 9 and 10 OS releases provide a new installation function called flash installation. With flash installation, you can create a single reference installation of the Solaris OS on one system, called the master system. Then you can replicate that installation as a new installation on any number of systems, called cloned systems, that have the same architecture as the master system. Although flash installation is designed to clone a master machine, I
have done some tests and found it to be very useful for disaster
recovery. This article shows what I did to back up the system
using the The Procedure1. Bring the machine into single-user mode before creating the
archive. Two reasons exist for doing this: First, although
In single-user mode, # init 0 ok> boot -s 2. Log in as root. If # mount /opt 3. Create a flash archive: Use the # flarcreate -n testhost.flar -c -S -R / -t /dev/rmt/2 WARNING: hash generation disabled when using tape (-t) Full Flash Checking integrity... Integrity OK. Running precreation scripts... Precreation scripts done. Determining the size of the archive... ....... The archive will be approximately 2.69GB. Creating the archive... ....... 18226862 blocks Archive creation complete. 4. Check that the archive on the tape completed successfully. # flar info -t /dev/rmt/2 files_archived_method=cpio creation_date=20040927044841 creation_master=testhost content_name=testhost.flar creation_node=testhost creation_hardware_class=sun4u creation_platform=SUNW,Ultra-Enterprise creation_processor=sparc creation_release=5.8 creation_os_name=SunOS creation_os_version=Generic_117350-02 files_compressed_method=none content_architectures=sun4u 5. Next, recover the system from the backup using the backed up image on the tape. You can use a different machine to do the recovery test as long as it has the same kernel architecture. In this case, I used the same machine. First bring the machine down. Then insert the Solaris 8 OS Software CD 1 media and follow the installation menus, as shown in the following examples: ok boot cdrom Resetting ... The Solaris Installation Program The Solaris OS installation program is divided into a series of short sections that prompt you to provide information for the installation. At the end of each section, you can review and change your selections before continuing. Please note: While navigating these menus, the mouse cannot
be used. If your keyboard does not have function keys, or if your
function keys do not respond, press F2_Continue F5_Exit F6_Help Select Solaris Interactive Installation This system can be upgraded, so there are two ways to install the Solaris OS software:
After you select an option and complete the tasks that follow, a summary of your actions will be displayed. If you want to install the system using a flash archive, select Initial. F2_Upgrade F3_Go Back F4_Initial F5_Exit F6_Help Select Solaris Interactive Installation (Menu 2) You'll be using the On the following screens, you can accept the defaults or you can customize how the Solaris OS software will be installed. To customize the installation, you may (1) select the type of Solaris OS software to install, (2) select disks to hold the software you've selected, and (3) specify how the file systems are laid out on the disks. After completing these tasks, a summary profile of your selections will be displayed. Here are two ways to install your Solaris OS software:
F2_Standard F3_Go Back F4_Flash F5_Exit F6_Help Select Flash Archive Installation Method In this screen, you will be choosing a flash archive installation
method, in this case select Flash Archive Retrieval Method On this screen you must select a method to retrieve the flash
archive. The retrieval method depends on where the archive is stored.
For example, if the archive is stored on a tape, select Available Retrieval Methods [ ] HTTP -> default [ ] NFS [ ] Local File [X] Local Tape -> selected [ ] Local Device F2_Continue F5_Cancel F6_Help Select Flash Archive Addition Please specify the path to the tape drive where the flash archive is located, as in the following: Tape Drive Location: syrinx:/dev/rmt/0 Location: /dev/rmt/0 ....... F2_Continue F5_Cancel F6_Help Select Preserve Data? Do you want to preserve existing data? At least one of the disks you've selected for installing the Solaris OS software has file systems or unnamed slices that you may want to save. F2_Continue F3_Go Back F4_Preserve F5_Exit F6_Help Select In the next step, you choose a disk where you want to install the OS. You can repartition the file systems in this step to meet your new requirements. File System and Disk Layout The summary that follows is your current file system and disk layout, based on the information you've supplied. Please note: If you choose to customize, you should understand file systems, their intended purpose on the disk, and how changing them may affect the operation of the system. File system/Mount point Disk/Slice Size overlap c0t11d0s2 17269 MB F2_Continue F3_Go Back F4_Customize F5_Exit F6_Help Select Mount Remote File Systems? Do you want to mount software from a remote file server? This may be necessary if you had to remove software because of disk space problems. F2_Continue F3_Go Back F4_Remote Mounts F5_Exit F6_Help Select Profile The following information is your profile for installing the Solaris OS software. It reflects the choices you've made on previous screens. Installation Option: Flash Boot Device: c1t0d0 Client Services: None Software: 1 Flash Archive File System and Disk Layout: ....... F2_Continue F4_Change F5_Exit F6_Help Select Reboot After Installation? After you've installed the Solaris OS software, the system must be
rebooted. You can have the system reboot automatically or, if you want
to run scripts or do additional customization, you may reboot manually.
To reboot manually, use the [X] Auto Reboot [ ] Manual Reboot F2_Begin_Installation F5_Cancel Select 6. After the system reboots, you can enter a new root password. The following shows the compression of the original file system layout and the recovery file system layout: The original file system layout: $ df -k Filesystem kbytes used avail capacity Mounted on /dev/md/dsk/d10 494235 55231 389581 13% / /dev/md/dsk/d20 1525647 795052 669570 55% /usr ....... /dev/md/dsk/d40 2056211 1419825 574700 72% /var /dev/dsk/c1t4d0s0 4129822 4175 4084349 1% /tmp /dev/dsk/c1t4d0s3 6194334 2280496 3851895 38% /home /dev/md/dsk/d50 10177352 8905539 1170040 89% /opt $ swap -l swapfile dev swaplo blocks free /dev/md/dsk/d30 85,30 16 4198368 4198368 The recovery file system: $ df -k Filesystem kbytes used avail capacity Mounted on /dev/dsk/c0t11d0s0 494235 54233 390579 13% / /dev/dsk/c0t11d0s1 1489367 793504 636289 56% /usr ....... /dev/dsk/c0t11d0s4 1987399 1417795 509983 74% /var /dev/dsk/c0t11d0s5 9943356 8895415 948508 91% /opt /dev/dsk/c1t4d0s3 6194334 2280496 3851895 38% /home /dev/dsk/c1t4d0s0 4129822 4173 4084351 1% /tmp $ swap -l swapfile dev swaplo blocks free /dev/dsk/c0t11d0s3 32,443 16 4099424 4099424 As you can see, the sizes of Note: A problem occurred while recovering operating systems that had been mounted as metadevices. This was because the image created included all the metadevice settings and configuration files. After the restore, all those settings and configuration files were still in the same places. If you do not remove them manually, you will have problems booting the machine. 7. To remove those metadevice entries, you can boot the machine from
a CD, mount the root file system as 8. If possible, it's preferable to remove the metadevice before you create the archive. 9. If the machine was on a network, you may have to reset some of the
recovered machine's network setting (such as the hosts, 10. If the machine is connected to external disks, you need to add
those entries into the ConclusionIn some cases, you may be recovering a machine that has different peripherals than the master machine. If you install the master system with the core, end user, developer, or entire software group, the master system supports only the peripheral devices that are attached to the master machine at the time of backup. With your disaster recovery plan, you should be able to recover a system that has different peripherals than the master machine. For this reason, you should install the Entire Plus OEM software group on the master machine. The flash archive created from the master machine with the Entire Plus OEM software group should work on any system that has peripheral devices supported by the installed release of the Solaris OS. Other Articles
Using Flash Archive in the Solaris Operating System for Disaster Recovery, Part 2
Comments (latest comments first)Discuss and comment on this resource in the BigAdmin Wiki
Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License. |
BigAdmin SubscriptionsBigAdmin Areas
BigAdmin Sun Center
BigAdmin Topics | ||||||||||