![]() |
![]() |
![]() |
![]() |
CHAPTER 16 Disaster Recovery: BareMetal for Sun Solaris
16.1 Introduction
It's not a question of if it happens. It's a question of when it happens. Disasters happen at the worst possible time and no matter how easy a system is to restore, the pressures to get it running again can cause you to make mistakes, and become very irritating. Disaster recovery is available for Backup Professional (BP) clients and servers and is referred to as BareMetal for Sun Solaris. This product is formally known as Sun Solar Shield. In this manual, the product will mostly be referred to as Solar Shield. BP disaster recovery is intended to be used with systems whose hard-drive(s) have failed or for any other reason that you would have to reload the operating system.
FIGURE 82.![]()
This chapter covers the steps required to restore a BP server or client running on a Sun Solaris SPARC only. For Intel Solaris machines, refer to the chapter "BareMetal Disaster Recovery: Intel® Platforms" on page 263.
For SCO Unix Backup Professional clients and servers, a separate Airbag utility is supplied. The documentation for the SCO Unix Airbag can be found in "Disaster Recovery: BareMetal for SCO® Unix" on page 257.
Disaster recovery for Backup Professional clients and servers is implemented through BP utilities and supporting operating system boot methods. The premise is to create an Sun Solar Shield diskette or tape which contains BP programs and utilities along with gathering system specific information. The data is placed on a tape, file, or mountable floppy diskette to be used to aid in recovery of a crashed system. The crashed system is booted from the operating system installation media (CD-ROM) or bootable tape and the Sun Solar Shield utility is made available and executed. Solar Shield is only intended to restore your root/primary disk! It will not prepare a secondary disk for recovery. If you have to recover a secondary disk, you can do so using the normal BP restore while the system is booted on the primary disk.
You are responsible for the means to boot your system and the availability of the Sun Solar Shield utility. The supported operating systems all have means of alternate booting. Sun Solaris can boot from the installation CD, and the IBM RS6000 can boot from the CD as well as create a bootable tape. See "Boot Procedures for floppy or tape Solar Shield media." on page 236 for more information on alternate boot procedures.
You have to test the Solar Shield! It is imperative that you become familiar with these alternate boot procedures and prove to yourself that you can make the machine boot in case of a disk failure. Once you have generated your Solar Shield, you must test the operation of booting the machine and test the Solar Shield utility by running it and selecting the Test Solar Shield menu option.
16.2 Solar Shield License
Sun Solar Shield is licensed as a feature of BP. You will not be able to create Solar Shield media without this feature in your license. However, a temporary evaluation license is available so that you may see for yourself the benefits of the Solar Shield. To invoke the temporary evaluation license, run the following command from the shell:
$BPDIR/bin/lmbrand -install -fp $BPDIR/bin/mksolarshield
This will give you a 30-day demo license for the Solar Shield. Distributions of Backup Professional purchased after February 20, 2002 do not require the command shown above. The temporary license is already implemented there. Once the 30 days has elapsed, the Solar Shield feature must be present in your BP license for you to make new Solar Shield media or use any existing Solar Shields's. Upon purchasing the Solar Shield feature, you will have to create a new Solar Shield.
16.3 Restrictions
Following is a list of things to be aware of before you need to recover a crashed BP server.
· Can you read the tape? You must be able to read a BP tape. It is possible that the booted kernel cannot read a tar block size greater than 20.You should always preform the Test option of the Solar Shield.
The following should be noted before you attempt to recover a crashed BP client.
· The client must have all necessary network support in the booted kernel. The network is available on all supported platforms when booted from the alternate boot media.
· The server must use the default BP service of 1743. This is because the client may not be able to modify it's service file in /etc./services when booted from the alternate boot media.
These items can be tested by booting from the alternate media, running the Sun Solar Shield utility and performing the Test option.
16.4 Generating the Solar Shield
Generating the Solar Shield takes only a few minutes and must be done from the specific client or server. There are a few ways to create the BP server and client Sun Solar Shield. The BP server Sun Solar Shield is created with the mksolarshield program or through the [Routines->Bare Metal-> Server] menu of the BP Administration utility. The BP client Solar Shield is created by running the mksolarshield utility on the client. The Solar Shield may be created automatically and placed on a normal backup tape. See "Automatically Generating a Solar Shield" on page 245 for instructions on how this can be done.
The Solar Shield creation utility can be found in $BPDIR/bin/mksolarshield on the server and clients. The creation utility is invoked from the shell with:
$BPDIR/bin/mksolarshield [-q] [-a] [-d <device | file | floppy>]
Running this utility without any arguments invokes an interactive question and answer session. The -q option remains quiet except for any errors. The -a option adds a client to a multi-client Sun Solar Shield. The -d option allows you to specify where you want to put the Solar Shield files and will not invoke the interactive option. The argument to the -d option can be one of:
· device - the path to a tape device, etc.
· file - the path to a regular file.
· floppy - this keyword (lowercase) causes the files to be placed on a mountable floppy.
FIGURE 83. Mksolarshield menu when running without arguments.
It may seem restrictive to require a floppy or tape for your clients to have Solar Shield support, but the cost of a floppy drive is minimal, and an external SCSI tape drive can be easily moved.
The Solar Shield files are put on the media (other than floppy) in tar format with a block factor of 20.
Solar Shield version 2.0.0 and higher has the ability to generate also bootable Solar Shield CDROM, that can be used on computers which don't have floppy or tape device. To generate the CDROM you should start $BPDIR/bin/mksolarshield without options, or from BP Administration utility. Then choose item #4, the creation of bootable CDROM image on the hard drive. Use this image for burning your CDROM. The creation process requires at least 1.2 Gigabytes of free space on the hard drive. During the creation you will be prompted to insert the installation CD for Solaris 8. This is necessary to grab a number of system files from it. Instead of Solaris 8 installation CD you can insert any other CDROM with Solar Shield on it.
Backup Professional v. 1.5.2d and higher has powerful facility that allows to create a single CDROM for many clients.
FIGURE 84. Create Bare Metal CDROM for many clients.![]()
Select [Routines -> Bare Metal -> Clients] in administration menu and start the interface. Choose one or more clients that you wish to add to your CD and press "Create" button.
16.4.1 Mirrored Drives
Common practice in mirroring a drive is to mirror standard OS filesystems such as root, /usr, and /etc. Sun Solar Shield will only restore to the primary mirror disk and as such will go into great detail to determine the physical device path with respect to the mounted mirror device. After the restore, you must perform the actions required to restart the mirror.
Sun Solar Shield has support for Solstice Online Disk Suite (ODS) mirrors. When creating the Sun Solar Shield media, if a filesystem on the main disk is mounted from a device such as /dev/md/dsk/d1, then the ODS map is consulted to determine the physical device, i.e. /dev/dsk/c0t3d0s0. This will be the device that is mounted for the filesystem before performing a restore. ODS mirroring system has a configuration file md.cf. The full path to this file is different from system to system, depending on OS release. So if your computer has ODS mirrors the default path will be shown to you. Then you can confirm that path or change it.
16.4.2 Non-Supported Mirror Systems
Sun Solar Shield has support for other mirror systems not automatically supported. This is handled by means of a map file that maps mirror device entries to physical device entries. The file must be created by you for your individual system and must contain entries that map the mounted filesystem device to the standard physical device. The map file is found in $BPDIR/bpinit/abmnt.map. If it does not exist, you must create it.
On a Solaris machine for example, the df command may report the following:
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/mirror/m1 940414 787271 104558 88% /
/dev/dsk/c0t5d0s2 4783577 1950711 2585278 43% /share
/dev/mirror/m2 4783609 261043 4274976 76% /usr
/dev/mirror/m3 9543990 6707232 2341605 74% /opt
You must create the map file ($BPDIR/bpinit/abmnt.map) adding the following entries to specify the physical devices for m1, m2, and m3:
/dev/mirror/m1 /dev/dsk/c0t3d0s0
/dev/mirror/m2 /dev/dsk/c0t3d0s3
/dev/mirror/m3 /dev/dsk/c0t3d0s3
If you began creating the Sun Solar Shield media on a mirrored system and map file does not exist, you have an opportunity to enter all the necessary information in a dialog mode. It will be saved as file $BPDIR/bpinit/abmnt.map automatically. You also can review and edit this file during a creation of the Sun Solar Shield media.
If the map file exists when creating the Sun Solar Shield, the map will be consulted to determine the physical device. If the resulting device does not appear like /dev/dsk/c?t?d?s?, the device/filesystem will not be valid for use with the Sun Solar Shield.
IMPORTANT. File $BPDIR/bpinit/abmnt.map has the highest priority. So if your system has both files abmnt.map and md.cf (see previous chapter), only abmnt.map will be used! The abmnt.map should not be present on your system if you have no mirroring!
16.4.3 Veritas Volume Manager Support
Some adjustments need to be made in your settings in order to successfully restore a system with Veritas Volume Manager.
· The root disk must be encapsulated
· The file abmnt.map must be created manaually. See "16.4.2 Non-Supported Mirror Systems".
· A a special Veritas Slice should be included in your backup.
Veritas Slice Example
Assume your root drive is /dev/rdsk/c2t1d0
Run this command:
prtvtoc /dev/rdsk/c2t1d0s2
You will see output that looks like this:
The special slice is partition with Tag=15. In our example, the special slice is partition number four. It's size is 2160 blocks. The full device name will be /dev/rdsk/c2t1d0s4.
Perform the master backup and include this special partition. Start the backup utility, press the Raw Devices button and specify the slice by name and size in this manner:
16.5 Solar Shield Files
Table 15 on page 234 describes the individual files that comprise the Sun Solar Shield media. Multiple client configurations of the same architecture can be placed on one Sun Solar Shield and are stored in the nodes/client directory, where client is the hostname of the client. The filenames are listed relative to their mount point.
16.6 Deploying the Sun Solar Shield
16.6.1 Boot Procedures for floppy or tape Solar Shield media.
When the time comes to use the Solar Shield to recover a crashed machine, locate the Solar Shield and alternate boot media. Boot the machine from the alternate boot media (Table 16 on page 237) and get access to a command shell. For Solaris 2.5 and Solaris 2.7 this can be done from the root menu by clicking the right mouse button and selecting [Command Tool...] or [Utilities->Command Tool]
If you use Solaris 2.8 you should:
1. Boot from installation CDROM
To do this enter string "boot cdrom" when you see the prompt "Ok".
1.1 Some of distributions could ask you:
"Select the language to use to run the installer"
1.2 Some of distributions could show you selection:
Choose "1. Initial Install" here.
2. When you see the prompt "Do you want to format <disk>? [y,n,?,q]" press "q" end exit to command shell.
3. Now you need to start X Windows. Use following commands:
PATH=/usr/openwin/bin:$PATH
export PATH
xinit
Note: Using of X windows is not absolutely necessary. You can run restore in text only mode. Read below for more information.
TABLE 16. Alternate Boot Procedures Machine Type Device Command Sun Sparc Solaris CD-ROM "b sd(0,6,2)" or "b cdrom" From the command shell, mount the Sun Solar Shield floppy (See Table 17 on page 237) or extract the Sun Solar Shield data from a tape using the following command where device is the path to the Sun Solar Shield media:
tar -xvf device /tmp/bpab
cd /tmp/bpab
If mounting the Sun Solar Shield floppy, change to the mount directory (ex. /mnt) after the floppy is mounted.
TABLE 17. Floppy Mount Commands Machine Type Floppy Device Command Solaris /dev/diskette0 mount /dev/diskette0 /mnt 16.6.2 Boot procedures for CDROM version of Solar Shield
Boot your computer from Solar Shield CDROM. Depending on your hardware this will take from 2 to 10 minutes. Then you will see the prompt:
Solar Shield restore facility is ready to start in X Windows
environment. This is a default mode. Alternatively you can:
1. Run Solar Shield in text only mode
2. Run Solar Shield in extended graphic mode. In this case your server
should allow you to use "rcp" and "rsh" commands.
3. Exit to command shell
Please make your choice entering the number, or just press ENTER
to run Solar Shield menu in default mode:
Default mode is recommended. This will start X windows and color text interface in X environment.
Text only mode is useful if you don't have console on your machine and work on remote text terminal, attached to serial port.
The extended graphic mode is the most powerful, but it requires some extra adjustments. Your server must allow you to use "rcp" and "rsh" commands.
If you need to do something specific on your system, you can get command shell. If you've exit to command shell you will not be able to return back to the menu. So you need to start Solarshield manually.
xinit -e /solarshield/solarshield for default mode
/solarshield/solarshield -q for text only mode
xinit -e /solarshield/solarshield -g for extended graphic mode.
See also next chapter "Usage".
16.6.3 Usage
The Solarshield utility options are:
-h : Shows the version number and usage.
-n : Native mode i.e. without color xterm.
-g : X-window mode. Requires X windows to run. If running on client requires access to rcp and rsh services on a server.
-q : Native, text only mode. Same as -n
Normally you should run solarshield without any arguments. This will start the utility in a new color window. If you are restoring a client machine but server does not allow access to rcp and (or) rch, do not use -g option.
Run ./solarshield to initiate the Solar Shield utility. This will display a menu to help you restore the machine.
16.6.4 Testing
The first thing you need to do after creation the solarshield floppy is test it Boot from installation CDROM as shown above. Start solarshield and select item #1 in the Main Menu. Server's version of the utility tries to mount/unmount your hard drive, attempts to access the tape device, reads the tape. Client's version tries to mount/unmount your hard drive, tests a network connection to the server, starts TCP/IP listener (daemon) and checks if it's ready. Then the program tests a remote shell and remote copy to the server. At the end the program it starts the xclock X Window application on the server and sends the output to a client's screen. If all the tests passed you will see a message "SUCCESS: Sun Solar Shield tests completed". Otherwise the program will show you some error message.
If you test server's version of Solar Shield and tape test fails it is very possible that the kernel from CDROM sees the tape drive as a different number. For example /dev/rmt/3n might be the name when normally running, but when using Solar Shield it is /dev/rmt/1n. That's why when you perform your test or restore the default device is shown to you and you confirm it or change. If tape test fails try another device.
If you are in hurry or cannot shut down your system for testing you can perform brief test being booted from a hard drive. In this case you need only to mount Sun Solar Shield floppy:
mount /dev/diskette0 /mnt
/mnt/solarshield
and choose item #1 in the Main Menu.
It is strongly suggested to perform the tests with installation CDROM.
After you made sure that you floppy is good, make a copy of it and keep in a safe place.
For testing of CD-version of Solar Shield, simply boot from you CDROM and choose item #1 from main menu.
FIGURE 85. Sun Solar Shield Main Menu
16.7 Preparing the Main Disk
If you are recovering after crash and use same disk as it was before, all you need to do is to select choice #2 [Totally automated restore].
There is also another easy way to restore the same disk. Select choice #3 [Format partitions, automated]. This will prepare your disk fully automated. Then press choice #5 [Restore System] and all filesystems are mounted and the data is restored. Here you can see every step the Solar Shield is doing. Also you need to confirm most of steps.
If you wish to merge filesystems or customize the layout (if you replaced a hard-disk with a larger one), you can specify a custom partition table using #4 [Format partitions, customizable]. In this case you should proceed with [Utilities] menu to create the filesystems and then select choice #5 [Restore System] from the main menu to restore the data.
FIGURE 86. Sun Solar Shield Utilities Menu
If you have changed a root disk for a bigger one or don't want to remake all the filesystems as they
were, select [Utilities] and prepare your disk manually.Option #3 [Format partitions, customizable] of main menu allows you to specify the partition layout for the disk. You may want to look at the old partition table before you partition the disk. You can do this from the [View recorded configuration] menu. Jot this information down, and proceed to the format menu. If you make any changes to the layout of the filesystems, you will need to reformat a disk with option #4[Format disk, customizable] of Main Menu and to recreate filesystems with option #2 [Create filesystems] of Utilities menu, which prompts you to create the filesystems specified in the partition table. If the root filesystem is created, the boot-code will be stamped to the drive to ensure that your machine will be bootable. You can also stamp the boot-code onto the drive using the [Make Drive Bootable] menu option. As your disk is prepared select #5 [Restore System].
16.7.1 Viewing Recorded Information
Using this menu you can review important system settings which were saved during the creation of Sun Solar Shield floppy.
FIGURE 87. View Recorded Information Menu
16.8 BP Server Restore
To restore the BP server, insert the tape with the last master backup of the server into the tape drive and choose [Restore System] from the main menu. The disk drive is then mounted and you are shown the fileset labels as the tape is being read. You must choose the proper fileset to use to do the restore. After the proper fileset has been selected, the Solar Shield will restore your system.
You must reboot your system after the restore has completed. Once rebooted, you will want to import the tape that you restored your system from using the initttape utility and then restore the last incremental backup to the server.
16.9 BP Client Restore
A BP client restore is a bit more complicated due to the network connection with the BP server. The Sun Solar Shield will start the network and the BP client daemon. You must prepare the disk by creating it's partition table. The option #2 [Format partitions, automated] of Main Menu is used for this purpose. This allows you to partition the disk and make the filesystems for the partitions (from bp/mounts).
Once the drive has been prepared, choose [Restore System] from the Main Menu. The filesystems are mounted and the network and bpclientd are started automatically. The Sun Solar Shield will then prompt you for any files or directories to include or exclude from the restore and then connect to BP server using a remote command (rsh, rcmd, etc.) to start the restore.
The Sun Solar Shield will do the work of selecting the last master backup for the client and setting any options. This option is only available if your system currently has X Windows running; if not See "Initiate Client Restore From Server" on page 243. You must have remote command privileges on the BP server machine. This means you have to have an entry in the /.rhosts file on the BP server like:
client_name root
On-screen directions will give you the information to add this item. The restore facility is displayed on the client screen up to the point of pressing the [OK] button to do the restore. If you are satisfied with the options, press [OK] to continue.
If the remote command failed due to permission, etc. you can initiate the restore from the BP server. See "Initiate Client Restore From Server" on page 243 for information on how this can be done.
NOTE: Filesystems not mounted from the main disk will be excluded during the restore. If you need to restore other filesystems, you can do so after the system has been rebooted.
16.9.1 Initiate Client Restore From Server
You can start the client restore from the BP server by running bpmenu and selecting the restore utility.
FIGURE 88. Starting the Restore Utility![]()
From the restore utility, select the client name, the date of the last master, and the last master backup item from the list. You can then specify any files to include and exclude from the restore. The next points are very important and must be completed or the restore will fail.
· Make sure that the Set Target Directory option is set
· Make sure that the Target Directory is set to /tmp/root.mnt. This directory is where the Sun Solar Shield mounted the root filesystem on the BP client.
Press the Restore button to connect to the client and restore the data. When the restore has completed, exit the Sun Solar Shield on the BP client and reboot the machine.
16.10 Sun Solar Shield Environment Variables
The following environment variables may be set to control the behavior of Sun Solar Shield at run-time. These variables can help you determine the reasons for any errors you may get during a restore.
16.11 Can't Find Your Sun Solar Shield Floppy?
You can generate one from another BP client or server and massage the data to make it work. The main items that would need to be changed are:
· The values for RootDisk, DeviceRewind, DeviceNoRewind, and IsClient in bp/nodes/client/config
· Changes to bp/nodes/client/mounts to reflect the devices to mount
This procedure is not covered under normal technical support and requires an extra fee to help get you through it.
16.12 Automatically Generating a Solar Shield
You can automatically generate an Solar Shield by using the Before Command for the machine in a BP group schedule. This will create the Solar Shield for the machine and back it up to the tape so you always have easy access to it. To do this, select a schedule from the BP Administration utility and a particular client of the schedule. Add the following to the Before Command:
$BPDIR/bin/mksolarshield -q -d /tmp/bpsolarshield.tar
The command will be run before the backup on the specified client.
Now getting to the Solar Shield when you need it is not as simple. For a BP client, you will have to restore the Solar Shield file /tmp/bpsolarshield.tar onto the server and copy it to some media (like a floppy) so it can be taken to the client. For a BP server, you will have to issue multiple tape positioning commands to get to the proper dataset and restore /tmp/bpsolarshield.tar.
This is not the recommended method because it involves a lot of effort and may not even work if you need special drivers for your tape when restoring a BP server. But it is nice to know at least you have multiple Solar Shield backups and can get to one (from a working machine) when it is needed. Since this is not the recommended procedure, technical support may have a special fee to help you with this service.
16.13 Some common problems with bootable Solar Shield CD-ROMs
In order to build the ISO image of bootable CDROM, your should have installed lofiadm package on your computer. Normally this package is already included to basic installation of Solaris 2.8 and Solaris 2.9, but earliest versions of Solaris' OS may not have it installed. So if you are going to create bootable CD on Solaris 2.5 or Solaris 2.6, first of all try command
lofiadm
If you see the error message like "command not found" you won't be able to proceed. Please install lofiadm utility first.
Another case. The creation of CDROM failed with message:
lofiadm: /dev/lofi/1 was not created: No such file or directory
This mean that lofiadm utility was not installed and configured properly. If you see such kind of message, you need to perform following steps:
a. As root change directory to /devices/pseudo
cd /devices/pseudo
b. Look for filenames, beginning with 'lofi'
ls -l lofi*
You will see single string like this:
crw-r--r-- 1 root sys 147, 0 Aug 18 13:19 lofi@0:ctl
c. Now create 4 additional files:
mknod lofi@0:1 b 147 1
mknod lofi@0:1,raw c 147 1
mknod lofi@0:2 b 147 2
mknod lofi@0:2,raw c 147 2
One more common problem. Mksolarshield utility ask you to insert installation CD for Solaris 2.8, then does not realize that the CD is in the drive and keeps telling you "CD is not in the drive".
This could happened if your CD device is not fully configured. Try following commands:
cd /dev
ls -l ./sr0
You should see output like this:
lrwxrwxrwx 1 root 13 Jun 11 2002 /dev/sr0 -> dsk/c0t3d0s2
If file /dev/sr0 is not found on your system, you need to create it manually, for example:
cd /dev
ln -s dsk/c0t3d0s2 /dev/sr0
ln -s rdsk/c0t3d0s2 /dev/rsr0
Use real filenames which are associated with you CD drive, partition #2.
When you try to boot your Solaris computer from solarshield CDROM, boot process is waiting for a minute then fails with message:
fatal SCSI error at script address 8 Illegal instruction
This means that your CD is not in proper format and cannot be read by your CD drive. Your burner or burning software produce CD's with record's size of 512 bytes.But the drive on your Solaris machine can read only 2048 bytes records. It is not critical when you mount your CD or read it. But the computer cannot use this CD as boot media.
First make sure that you are able to boot your machine from regular installation CD for Solaris. Then try one of following.
1. Setup your burner and burning software to use record's size 2048. The information about how to do this should be in documents for your hardware and software.
2.Setup you CD drive on Solaris to understand 512 bytes records. Some devices have switch for this. But, again, it should be described in the documentation. The worst solution is to replace your drive which is obviously new with something older. Of course it is not recommended.
In both cases you don't need to regenerate your CD image. It's fine. You should only to setup your burning equipment.
Some notes for burning CD's on Windows OS
1. Start up your Nero5 software, press "Multi session" button and select "No Multi session"
2. Go to "ISO" section and setup as shown on picture below.
3. Press "Burn" button and change Write Method to "Disc-At-Once".
5. Make sure the Write Method still has "Disc-At-Once".
FIGURE 89. Nero5 settings.
16.14 Quick Reference Guide For Disaster Recovery.
This is brief guide about how to restore your system after crash. See above for detail and suggestions.
Restore with bootable Solar Shield CDROM is really easy. Simply boot your computer from that CD and select "Totally automated restore".
![]() |
![]() |
![]() |
![]() |