Alternate Boot Device
Overview:
Alternate disk installation, available in AIX Version 4.3, allows installing the system while it is still up and running, allowing install or upgrade down time to be decreased considerably. It also allows large facilities to manage an upgrade because systems can be installed over a longer period of time while the systems are still running at the same version. The switch over to the new version can then happen at the same time.
Alternate disk installation can be used in one of two ways:
Both of these functions can become important in environments where down time is critical (sometimes called 7 X 24 environments).
Alternate mksysb Disk Install
Alternate mksysb install involves installing a mksysb image that has already been created from a system, onto an alternate disk of the target system. The alternate disk or disks cannot contain a volume group. In this case, the associated volume group is altinst_rootvg (see Phased Alternate Disk Installation). The mksysb image (AIX Version 4.3 or later) would be created on a system that was either the same hardware configuration as the target system, or would have all the device and kernel support installed for a different machine type or platform, and/or different devices. The installed device and kernel support would be:
When the alt_disk_install command is run, the image.data file from the mksysb image is used by default (unless a customized image.data is given) to create the logical volumes and file systems. The prefix alt_ is added to the logical volume names, and the file systems are created with a prefix of /alt_inst. For example, hd2 would be created as alt_hd2, and its file system, /usr, would be created as /alt_inst/usr. These names will be changed back to their original names at the end of the alternate disk installation process.
The mksysb is then restored into the alternate file system. A prepopulated boot image is then copied to the boot logical volume of the altinst_rootvg, and the boot record of the boot disk is modified to allow booting from the disk.
At this point, a script can be run to allow for any customization before the system is rebooted. The alternate file systems will still be mounted as /alt_inst/real_file_system (for example: /alt_inst/usr, /alt_inst/home). Files can be accessed at this point, but nothing can be installed into the alternate file system because the kernels and libraries of the mksysb image do not match those of the running system.
After the optional script is run, the file systems are unmounted, and the logical volume and file system names are changed to match the image.data file's names (for example, alt_inst_hd6 is changed to hd6 in the volume group descriptor area). The logical volumes are exported from the Object Data Manager (ODM), but the altinst_rootvg is only varied off. It is left in the ODM as a placeholder so the disk will not be accidentally overwritten. The default action of alt_disk_install would then be to set the bootlist so that the next time the system boots, it will boot from this newly installed volume group. This default action can be turned off. If specified, the system will reboot at this point, and the system will reboot from the new rootvg. The boot process proceeds to a certain point, with the new rootvg's file systems mounted, and the bosboot command is called to rebuild a "normal" boot logical volume. The system then reboots.
Once the system has booted from the new rootvg, the "old" rootvg does not appear in logical volume manager (LVM) listings, unless the alt_disk_install version is 4.3.2 or later.
Note: If you are using alt_disk_install Version 4.3.2 or later:
After rebooting from the new alternate disk, the former rootvg volume group will show up in an lspv listing as old_rootvg, and will include all disk(s) in the original rootvg. This former rootvg volume group will be set to NOT varyon at reboot, and should ONLY be removed with the -X flag. For example:
alt_disk_install -X old_rootvg
If a return to the original rootvg is necessary, the bootlist command is used to change the bootlist to reboot from the original rootvg.
Note: If you are using alt_disk_install Version 4.3.2 or later:
If it is unclear which disk is the boot disk for a specific volume group, the -q flag can be used to determine the boot disk. This can be useful when a volume group is comprised of multiple disks and a change in the bootlist is necessary.
Alternate Disk rootvg Cloning
Cloning the rootvg to an alternate disk can have many advantages. One advantage is having an online backup available, in case of disaster. Keeping an online backup would require an extra disk or disks to be available on the system. Another benefit of rootvg cloning is in applying new maintenance levels or updates. A copy of the rootvg is made to an alternate disk, then updates are applied to that copy. The system runs uninterrupted during this time. When it is rebooted, the system will boot from the newly updated rootvg for testing. If updates cause problems, the old_rootvg can be retrieved by simply resetting the bootlist and rebooting.
When the alt_disk_install command is called, it will, by default, create an image.data file based on the current rootvg's configuration. A customized image.data file can be used. An alternate rootvg (altinst_rootvg) is then created, and the logical volumes and file systems are then created with the alt_inst prefix. A backup file list is then generated from the rootvg, and if an exclude.list file is given, those files will be excluded from the list. The final list is then copied to the altinst_rootvg's file systems.
At this point, if specified, installp will install updates, fixes, or new filesets into the alternate file system. Next, bosboot will create a boot logical volume on the alternate boot disk.
If a customization script is specified, it will run at this point. The file systems are then unmounted, and the logical volumes and file systems are renamed. The logical volume definitions are exported from the system to avoid confusion with identical ODM names, but the altinst_rootvg definition will be left as an ODM placeholder.
By default, the bootlist will be set to the new cloned rootvg for the next reboot.
Phased Alternate Disk Installation
Beginning with AIX Version 4.3.1, alternate disk installation can be performed in stages. The installation itself is broken down into three phases. The default is to perform all three phases in the same invocation. The phases are:
Phase 1
Creates the altinst_rootvg volume group, the alt_ logical volumes, and the /alt_inst file systems. Also restores the mksysb or rootvg data.
Phase 2
Runs any specified customization script. For cloning only, installs updates, new filesets, fixes, or bundles. Also copies a resolv.conf file (if specified) and necessary files to remain a NIM client (if specified).
Phase 3
Unmounts the /alt_inst file systems, renames the file systems and logical volumes, removes the alt_ logical volume names from ODM, and varies off the altinst_rootvg. It also sets the bootlist and reboots (if specified).
As an alternative to running all three phases, the phases can be executed in the following ways:
Each phase separately, or
Phases 1 and 2 together, or
Phases 2 and 3 together (Phase 2 can be run multiple times before Phase 3 is run).
You must run Phase 3 to obtain a usable rootvg. Running Phases 1 and 2 will leave the /alt_inst file systems mounted. Any time during the phase process, before rebooting, the altinst_rootvg can be removed, and disk cleanup will occur, using the following command:
alt_disk_install -X
Data Access Between the Original rootvg and the New Alternate Disk
Note: If you are using alt_disk_install Version 4.3.2 or later:
If data access is necessary between the original rootvg and the new alternate disk, a volume group "wake-up" can be accomplished, on the non-booted volume group. The "wake-up" will put the volume group in a post alt_disk_install Phase 1 state. For example, the /alt_inst file systems will be mounted.
The volume group that will experience the "wake-up" will be renamed altinst_rootvg.
Limitation
The running system's version of AIX must be greater than or equal to the AIX version of the volume group that will undergo the "wake-up". This may mean that it's necessary to boot from the altinst_rootvg and "wake-up" the old_rootvg. For example, an alternate disk is created from an alt_disk_install 4.3.0 mksysb, on a AIX Version 4.1.5 system. it will be necessary to boot from the 4.3.0 alternate disk and "wake-up" the 4.1.5 old_rootvg volume group, in order to access data between the two volume groups.
This limitation is caused by a jfs (journaled file system) log entry incompatibility. It is possible to "wake-up" a volume group that contains a greater AIX version, but the volume group could not have ever been the system rootvg. If this was true, the volume group would have made jfs log entries that could not be interpreted by an older AIX version rootvg, when the volume group was experiencing a "wake-up".
The alt_disk_install command will not allow a "wake-up" to occur on a volume group with a greater AIX version, unless the FORCE environment variable is set to yes.
Warning: If a FORCE "wake-up" is attempted on a volume group that contains a version of AIX later than the running operating system, and the "waking" volume group has been a system rootvg, errors will occur.
When data access is no longer needed, the volume group can be put to sleep.
Note:The volume group that has experienced a "wake-up" MUST be put-to-sleep before it can be booted and used as the rootvg.
Filesets to Install
bos.alt_disk_install.boot_images Must be installed for alternate disk mksysb installations.
bos.alt_disk_install.rte Must be installed for rootvg cloning and alternate disk mksysb installations.