Most system backup, dump, and storage-management solutions depend on I/O devices. On a partitioned system, I/O devices (such as tape or CD-ROM) are not always available to all partitions. This chapter offers recommended solutions to minimize transfer of I/O devices among partitions.
A system backup is a copy of the root volume group (rootvg) of your system and is often referred to as a mksysb, in reference to the command used to create the system backup. The root volume group contains the following:
All mounted JFS (Journaled File Systems) and JFS2 (Enhanced Journaled File Systems) in the rootvg are backed up. Paging space and logical volume information is saved so that the rootvg will be recreated as it was when the system backup is reinstalled. If there are JFS or JFS2 file systems that are not to be backed up, you can use an exclude list or you can unmount them before the backup is made.
The following table describes the methods you can use to back up a system.
Backup Method | Considerations |
NIM* | Allows fast backup and recovery of a partition. Because all images are backed up to one system (NIM master), you should also back up that system and images to other physical media (tape, CD-RW, DVD-RAM). |
mkcd command | Allows creation of a bootable system backup to CD-ROM or DVD-RAM. You can provide an existing mksysb image from another partition if the backup device is not available at the partition being backed up. The mkcd -r command allows backup (not bootable) of images and files to a CD-RW or DVD-RAM. |
mksysb command with a tape device | Creates a bootable backup only on the partition the
drive is connected to. Must boot from CD or tape to reinstall.
Remote tape drives are supported with Sysback (for more information, see http://sysback.services.ibm.com). |
* Recommended Method
For more information regarding system backups, refer to the AIX 5L Version 5.2 Installation Guide and Reference. Other options offered during backup creation are excluding file or directories, as well as creating map files so that the system is restored to exactly the same physical partitions on the disk.
You can create a system backup by using one of the following methods:
With the NIM environment, you can create a system backup that is a selectable resource. That selectable resource can be used to reinstall the partition on which it was created, or it can be cloned to another partition. Because of its flexibility, NIM is the recommended method to back up and reinstall your partitions.
To use NIM to create a system backup, do the following:
# lsnim -t standalone
# smitty niminit
# smitty nim_mkmac
# smitty nim_mkres
Define a Resource
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
[Entry Fields]
* Resource Name [P1_backup]
* Resource Type mksysb
* Server of Resource [master]
* Location of Resource [/export/nim/mksysb/P1_backup]
Comments []
Source for Replication []
-OR-
System Backup Image Creation Options:
CREATE system backup image? yes
NIM CLIENT to backup [system1]
PREVIEW only? no
IGNORE space requirements? no
EXPAND /tmp if needed? no
Create MAP files? no
Number of BLOCKS to write in a single output []
(leave blank to use system default)
Use local EXCLUDE file? no
(specify no to include all files in backup)
-OR-
EXCLUDE_FILES resource []
(leave blank to include all files in backup)
If you have a CD-RW or DVD-RAM connected to one of your partitions, you can create bootable system backups. You can use the mkcd command to create a bootable image on or mount a mksysb image to another partition or system that has the device to create and burn the bootable image. Therefore, the device can be assigned to only one partition when creating backup CDs from multiple partitions. To reinstall the systems, you must assign a CD device to the partition being reinstalled.
To create a backup to CD media, do the following:
# smitty mkcd
To burn the CD or DVD at a later time (or to burn additional media), run the following:
# burn_cd /dev/cd1 /mkcd/cd_images/cd_image_12510
The image name cd_image_12510 includes the process ID. The process ID displays when the mkcd command executes.
For further information about creating system backups on CD or DVD, see the AIX 5L Version 5.2 Installation Guide and Reference, as well as the /usr/lpp/bos.sysmgt/mkcd.README.txt file.
If you have a tape drive assigned to your partition, you can create a system backup to tape. To create a backup to tape, type the following:
smitty mksysb
If you want to back up to a file, you can use a separate file system (ensure that you exclude that file system when you create the backup) or a file in a user volume group. For further information about creating a root volume group backup to tape or file, see the AIX 5L Version 5.2 Installation Guide and Reference.
You can use the NIM environment to install a system backup onto one or more of your partitions. NIM is recommended because of its flexibility and customizing options for installation and system management. Also, NIM allows for multiple installations at the same time. When you install a system backup onto a partition other than the original partition, you are cloning a partition system image onto a target partition.
Before you can use NIM to install a system backup, make sure that the following conditions are met:
Select a TARGET for the operation
Move cursor to desired item and press Enter.
lpar1 machines standalone
lpar2 machines standalone
lpar3 machines standalone
Install the Base Operating System on Standalone Clients Type or select values in entry fields. Press Enter AFTER making all desired changes. [TOP] [Entry Fields] * Installation Target lpar1 * Installation TYPE mksysb * SPOT 520spot_res LPP_SOURCE [] MKSYSB 520mksysb BOSINST_DATA to use during installation [] + IMAGE_DATA to use during installation [] + RESOLV_CONF to use for network configuration [] + Customization SCRIPT to run after installation [] + Customization FB Script to run at first reboot [] + ACCEPT new license agreements? [no] + Remain NIM client after install? [yes] + [MORE...35]
The Install the Base Operating System on Standalone Clients menu looks similar to the following:
Install the Base Operating System on Standalone Clients Type or select values in entry fields. Press Enter AFTER making all desired changes. [TOP] [Entry Fields] * Installation Target lpar1 * Installation TYPE mksysb * SPOT 520spot_res LPP_SOURCE [] MKSYSB 520mksysb BOSINST_DATA to use during installation [bosinst_ow] + IMAGE_DATA to use during installation [] + RESOLV_CONF to use for network configuration [resolv_res] + Customization SCRIPT to run after installation [] + Customization FB Script to run at first reboot [] + ACCEPT new license agreements? [yes] + Remain NIM client after install? [yes] + PRESERVE NIM definitions for resources on [yes] + this target? FORCE PUSH the installation? [no] + Initiate reboot and installation now? [yes] + -OR- Set bootlist for installation at the [no] + next reboot? Additional BUNDLES to install [] + -OR- Additional FILESETS to install [] + (bundles will be ignored) [MORE...20]
If your machine has more than 4 GB of real memory, a dedicated dump device is created at installation time. Otherwise, the /dev/hd6 paging space is used as the dump device. If a system crash occurs and paging space was used as the dump device, the dump is copied to the /var/adm/ras/vmcore.n file by default, where n is a sequence number. If there is not enough space to perform the copy, the user is prompted during reboot to save the dump to some other media.
To avoid losing a dump due to a lack of a tape drive configured to the partition, always create a separate dump device that is the same size as your paging space, given that paging space is currently your dump device.
To verify your dump device, type smitty dump, and select Show Current Dump Devices. If paging space is your dump device, the output will be similar to the following:
COMMAND STATUS Command: OK stdout: yes stderr: no Before command completion, additional instructions may appear below. primary /dev/hd6 secondary /dev/sysdumpnull copy directory /var/adm/ras forced copy flag TRUE always allow dump FALSE dump compression OFF
To create and change to a dedicated dump device, do the following:
# lsvg -l rootvg
The output will be similar to the following:
rootvg: LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT hd5 boot 2 2 1 closed/syncd N/A hd6 paging 53 53 1 open/syncd N/A hd8 jfslog 1 1 1 open/syncd N/A hd4 jfs 9 9 1 open/syncd / hd2 jfs 130 130 1 open/syncd /usr hd9var jfs 2 2 1 open/syncd /var hd3 jfs 8 8 1 open/syncd /tmp hd1 jfs 1 1 1 open/syncd /home hd10opt jfs 5 5 1 open/syncd /optIn the preceding example, the paging space is 53 LPs (logical partitions) in size.
smitty mklvWhen you are prompted for the volume group, type rootvg.
Add a Logical Volume Type or select values in entry fields. Press Enter AFTER making all desired changes. [Entry Fields] Logical volume NAME [dumplv] * VOLUME GROUP name rootvg * Number of LOGICAL PARTITIONS [53] # PHYSICAL VOLUME names [hdisk0] + Logical volume TYPE [dump] POSITION on physical volume middle + RANGE of physical volumes minimum + MAXIMUM NUMBER of PHYSICAL VOLUMES [] # to use for allocation Number of COPIES of each logical 1 + partition Mirror Write Consistency? active + Allocate each logical partition copy yes + on a SEPARATE physical volume? RELOCATE the logical volume during yes + reorganization? Logical volume LABEL [] MAXIMUM NUMBER of LOGICAL PARTITIONS [512] # Enable BAD BLOCK relocation? yes + SCHEDULING POLICY for reading/writing parallel + logical partition copies Enable WRITE VERIFY? no + File containing ALLOCATION MAP [] Stripe Size? [Not Striped] +
smitty dumpchgp
You will be prompted for the new dump device.
Change Primary Dump Device Type or select values in entry fields. Press Enter AFTER making all desired changes. [Entry Fields] * Primary dump device [/dev/dumplv]
smitty dumpSelect Show Current Dump Devices. The output will be similar to the following:
COMMAND STATUS Command: OK stdout: yes stderr: no Before command completion, additional instructions may appear below. primary /dev/dumplv secondary /dev/sysdumpnull copy directory /var/adm/ras forced copy flag TRUE always allow dump FALSE dump compression OFF
If you have multiple mksysb images stored on a NIM master (or on some other partition), you can use the mkcd -r command to store them to CD-R or DVD-RAM. The images to be written to CD-R or DVD-RAM must be in one directory structure, so that a directory can be passed to the mkcd command as the starting point of the backup.
Use the mkcd command as follows:
mkcd {-d cd_device} [-r directory] [-R | -S] [-I cd_image_dir] [-D] [-L]
Where:
For example, to back up the stored mksysb images in the /export/nim/mksysbs directory to a DVD-RAM device (/dev/cd1), and use a temporary file system mounted on the /largefilesystem directory to use as temporary CD image storage, type the following:
# mkcd -d /dev/cd1 -r /export/nim/mksysbs -I /largefilesystem -L
To verify the mksysb, run the following commands:
# mount -o ro /dev/cd0/mnt # cd /mnt # ls