Installs an alternate disk with a mksysb install image or clones the currently running system to an alternate disk.
alt_disk_install -d device || -C [-i image.data] [-s script ] [-R resolv_conf ] [-D] [-B] [-V] [-r] [-pplatform ] [-Lmksysb_level ] [-bbundle_name ] [-I installp_flags ] [-l images_location ] [-f fix_bundle ] [-Ffixes ] [-e exclude_list ] [-w filesets ] [-n] [-P phase ] target_disks...
alt_disk_install -X
The alt_disk_install command allows users another way to update AIX to the next release or maintenance level, without taking the machine down for an extended period of time. This can be done in two ways, by installing a mksysb image on a separate disk, or by cloning the current system and then applying updates to get to the next maintenance level.
The first function, installing a mksysb, requires a 4.3 mksysb image or 4.3 mksysb tape. The alt_disk_install command is called with a disk or disks that are not currently in use, and the mksysb is restored to those disks such that, if the user chooses, the next reboot boots the system on a 4.3 system.
Note: If needed, the bootlist command can be run after the new disk has been booted, and the bootlist can be changed to boot back to the older version of AIX.
The second function, cloning the running rootvg, allows the user to create a backup copy of the root volume group. This copy could be used as a back up in case the rootvg failed, or it could be modified by installing additional updates. One scenario might be to clone a 4.2.0 system, then install updates to bring the cloned rootvg to 4.2.1.0. This would update the system while it was still running, then rebooting from the new rootvg would bring the level of the running system to 4.2.1. If there was a problem with this level, changing the bootlist back to the 4.2.0 disk and rebooting would bring the system back to 4.2.0. Other scenarios would include cloning the rootvg and applying individual fixes, rebooting the system and testing those fixes, and rebooting back to the original rootvg if there was a problem.
Currently, you can run the alt_disk_install command on 4.1.4.0 and higher systems for both of these functions. The bos.alt_disk_install.rte fileset must be installed on the system to do cloning to an alternate disk, and the bos.alt_disk_install.boot_images fileset must be installed to allow mksysb install to an alternate disk.
The mksysb image that is used must be created ahead of time and have all the necessary device and kernel support required for the system that it's going to be installed on. No new device or kernel support can be installed before the system is rebooted from the newly installed disk.
Note: The level of mksysb that you are installing must match the level of the bos.alt_disk_install.boot_images fileset. At this time, only 4.3.0 mksysb images are supported.
When cloning the rootvg volume group, a new boot image is created with the bosboot command. When installing a mksysb image, a boot image for the level of mksysb and platform type is copied to the boot logical volume for the new alternate rootvg. When the system is rebooted, the bosboot command is run in the early stage of boot, and the system is rebooted once again. This is to synchronize the boot image with the mksysb that was just restored. The system then boots in normal mode.
At the end of the install, a volume group, altinst_rootvg, is left on the target disks in the varied off state as a place holder. If varied on, it shows as owning no logical volumes, but it does indeed contain logical volumes, but they have been removed from the ODM because their names now conflict with the names of the logical volumes on the running system. It is recommended that you not vary on the altinst_rootvg volume group, but just leave the definition there as a place holder.
When the system reboots from the new disk, the former rootvg does not show up in a lspv listing. The disks that were occupied by the rootvg show up as not having a volume group. But, you can still use the bootlist command to change the bootlist to reboot from the old rootvg if necessary.
The alternate root file system is mounted as /alt_inst, so other file systems would have that prefix (/alt_inst/usr, /alt_inst/var). This is how they should be accessed if using a customization script.
Note: If you have created an alternate rootvg with alt_disk_install, but no longer wish to use it, or want to run alt_disk_install commands, do not run exportvg on altinst_rootvg.
Simply run the alt_disk_install -X command to remove the altinst_rootvg definition from the ODM database. The reason you cannot run the exportvg command (or the reducevg command) is that the logical volume names and file systems now have the real names, and exportvg removes the stanza's for the real file system from /etc/filesystems for the real rootvg.
If exportvg is run by accident, be sure to recreate the /etc/filesystems file before rebooting the system. The system will not reboot without a correct /etc/filesystems file.
This function is also available with the Network Install Manager (NIM). See the NIM Guide for more information.
The AIX 4.3.1 version of alt_disk_install allows phases in the install. The install is broken into three phases, the default being to do all three phases.
Phase 1 | Creates the altinst_rootvg volume group, the alt_logical volumes, the /alt_inst file systems, and restores the mksysb or rootvg data. |
Phase 2 | Runs any specified customization script, installs updates, new filesets, fixes or bundles (cloning only), copies a resolv.conf file if specified, and copies files over 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 volumes, names ODM and varies off the altinst_rootvg. It sets the bootlist and reboots if specified. |
You can run each phase separately, run Phases 1 and 2 together, or run Phases 2 and 3 together. Phase 2 can be run multiple times before Phase 3 is run.
You must run Phase 3 to get a volume group that is a usable rootvg. Running Phase 1 and 2 leaved the /alt_inst file systems mounted.
If you have run Phase 1 and or Phase 2, and want to start over (remove the altinst_rootvg), run the alt_disk_install-x command to clean up.
-B | Would specify not running bootlist after the mksysb or clone. If set, then -r flag cannot be used. |
-C | Clone rootvg.
Note: -d and -C are mutually exclusive. |
-d device | The value for device can be:
tape device - for example, /dev/rmt0 OR path name of mksysb image in a file system. Note: -d and -C are mutually exclusive. |
-D | Turn on debug (set -x output). |
-i image.data | Optional image.data file to use instead of default image.data from mksysb image or image.data created from rootvg. The image.date file name must be a full pathname, for example, /tmp/my_image.data. |
-p platform | This is a platform to use to create the name of the disk boot image, which may be supplied by a vendor that wanted to support this function. The default value would be the platform of the running system obtained with the bootinfo -T command on AIX version 4.1, or the bootinfo -p command in AIX version 4.2. This flag is only valid for mksysb installs (-d flag). |
-P phase | The phase to execute during this invocation of
alt_disk_install. Valid values are: 1, 2, 3, 12, 23, or all.
|
-r | Would specify to reboot from the new disk when the alt_disk_install command is complete. |
-R resolv_conf | The resolv.conf file to replace the existing one after the mksysb has been restored or the rootvg has been cloned. You must use a full pathname for resolv_conf. |
-s script | Optional customization script to run at the end of the mksysb install or the rootvg clone. This file must be executable. This script is called on the running system before the /alt_inst file systems are unmounted, so files can be copied from the running system to the /alt_inst file systems before the reboot. This is the only opportunity to copy or modify files in the alternate file system because the logical volume names will be changed to match rootvg's, and they will not be accessible until the system is rebooted with the new alternate rootvg. You must use a full pathname for script. |
-V | Turn on verbose output. This will show the files that are being backed up for rootvg clones. This flag will show files that are restored for mksysb alt_disk_installs. |
-L mksysb_level | This level will be combined with the platform type to create the boot image name to use (for example, rspc_4.3.0_boot). This must be in the form V.R.M. The default will be AIX version 4.3.0. The mksysb image will be checked against this level to verify that they are the same. |
-n | Remain NIM client. The /.rhosts and /etc/niminfo files are copied to the alternate rootvg's file system. |
The following flags are only valid for use when cloning the rootvg (-C).
-b bundle_name | Pathname of optional file with a list of packages or filesets that will be installed after a rootvg clone. The -l flag must be used with this option. |
-e exclude_list | Optional exclude.list to use when cloning rootvg. The rules for exclusion follow the pattern matching rules of the grep command. The exclude_list must be a full pathname. |
-f fix_bundle | Optional file with a list of APARs to install after a clone of rootvg. The -l flag must be used with this option. |
-F fixes | Optional list of APARs (for example, "IX123456") to install after a clone of rootvg. The -l flag must be used with this option. |
-I installp_flags | The flags to use when updating or installing new filesets into the cloned alt_inst_rootvg. Default flags: "-acgX" The -l flag must be used with this option. |
-l images_location | Location of installp images or updates to apply after a clone of rootvg. This can be a directory full pathname or device name (like /dev/rmt0). |
-w filesets | List of filesets to install after cloning a rootvg. The -l flag must be used with this option. |
target_disks | Specifies the name or names of the target disks where the alternate rootvg will be created. This disk or these disks must not currently contain any volume group definition. The lspv command should show these disks as belonging to volume group None. |
alt_disk_install -C -F 4.2.1.0_AIX_ML -l /updates hdisk3
The bootlist would then be set to boot from hdisk3 at the next reboot.
alt_disk_install -d /mksysb_images/4.3_mksysb -s /home/myscript hdisk3
/usr/sbin/alt_disk_install | Contains the alt_disk_install command |
The bootlist, nim, lspv, and bosboot commands.