[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Commands Reference, Volume 1

alt_disk_install Command

Purpose

Installs an alternate disk with a mksysb install image or clones the currently running system to an alternate disk.

Syntax

Create Alternate Disk:
alt_disk_install {-d device | -C} [-i image.data] [-s script ] [-R resolv_conf] [-D] [-B] [-V] [-r]
[-p platform ] [-L mksysb_level ]
[-b bundle_name ] [-I installp_flags ]
[-l images_location ] [-f fix_bundle ]
[-F fixes ] [-e exclude_list ] [-w filesets ]
[-n] [-P phase_option ] target_disks...
Clean Up Alternate Disk Volume Group:
alt_disk_install -X

For alt_disk_install 4.3.2 or greater:

Determine Volume Group Boot Disk:
alt_disk_install -q disk
Put-to-sleep Volume Group:
alt_disk_install -S
Rename Alternate Disk Volume Group:
alt_disk_install -v new_volume_group_name disk
Wake-up Volume Group:
alt_disk_install -W disk
Clean Up Alternate Disk Volume Group:
alt_disk_install-X [ volume_group]

Description

The alt_disk_install command allows users a 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, a 4.3 mksysb tape, or a 4.3.3 mksysb CD. 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 execute the alt_disk_install command, and the bos.alt_disk_install.boot_images fileset must also be installed to perform a 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 version release maintainence level of mksysb that you are installing must match the level of the bos.alt_disk_install.boot_images fileset.

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.

After the system reboots from the new alternate disk, the former rootvg volume group does not show up in a lspv listing, unless the alt_disk_install version is 4.3.2 or higher.

For alt_disk_install 4.3.2 or greater:

After rebooting from the new alternate disk, the former rootvg volume group shows up in a lspv listing as "old_rootvg", and includes all disk(s) in the original rootvg. This former rootvg volume group is set to NOT varyon at reboot, and should ONLY be removed with the -X flag (i.e. 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.

For alt_disk_install 4.3.2 or greater:

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.

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.

Attention: 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 Installation Management (NIM). See the NIM Guide for more information.

The AIX Version 4.3.1 and greater version of alt_disk_install can be executed in phases. The install is divided into three phases, and the default is to perform 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.

For alt_disk_install 4.3.2 or greater:

If data access is necessary between the original rootvg and the new alternate disk, a volume group "wake-up" can be accomplished, using the -W flag, on the non-booted volume group. The "wake-up" puts the volume group in a post alt_disk_install phase 1 state (i.e. the /alt_inst file systems will be mounted).
Note: The volume group that experiences 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 undergoes 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.3 mksysb, on a 4.1.5 running system. To access data between the two volume groups, it is necessary to boot from the 4.3.3 alternate disk and "wake-up" the 4.1.5 "old_rootvg" volume group.

This limitation is caused by a jfs 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 so, 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". JFS log entries are usually present for file systems that were not unmounted before a reboot, for example, /,/usr.

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".

Attention: If a FORCE "wake-up" is attempted on a volume group that contains a greater AIX version then the running OS, 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, using the -S flag.

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.

Flags

-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.

For alt_disk_install 4.3.2 or greater:

If certain logical volumes need to be placed on a specific target disk, this should be annotated in the logical volume LV_SOURCE_DISK_LIST field of the user specified image.data file.
-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).
-Pphase The phase to execute during this invocation of alt_disk_install. Valid values are: 1, 2, 3, 12, 23, or all.
  • 12 - performs phases 1 and 2.
  • 23 - performs phases 2 and 3.
  • all - performs all three phases
-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, or a "wake-up" is performed on the altinst_rootvg. You must use a full pathname for script.
-V Turn on verbose output. This shows the files that are being backed up for rootvg clones. This flag shows 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. 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.
-X To remove the altinst_rootvg volume group definition from the ODM database. This returns the lspv listing for the volume group to "None". This will not remove actual data from the volume group. Therefore, you can still reboot from that volume group, if you reset your bootlist.
For alt_disk_install 4.3.2 or greater, the flag allows for specified volume group name ODM database definition removal, for example, -X old_rootvg.

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.
Note: If you want to exclude certain files from the backup, create the /etc/exclude.rootvg file, with an ASCII editor, and enter the patterns of file names that you do not want included in your system backup image. The patterns in this file are input to the pattern matching conventions of the grep command to determine which files will be excluded from the backup. If you want to exclude files listed in the /etc/exclude.rootvg file, select the Exclude Files field and press the Tab key once to change the default value to yes.

For example, to exclude all the contents of the directory called scratch, edit the exclude file to read as follows:

     /scratch/

For example, to exclude the contents of the directory called /tmp, and avoid excluding any other directories that have /tmp in the pathname, edit the exclude file to read as follows:

     ^./tmp/

All files are backed up relative to . (current working directory). To exclude any file or directory for which the it is important to have the search match the string at the beginning of the line, use ^ (caret character) as the first character in the search string, followed by . (dot character), followed by the filename or directory to be excluded.

If the filename or directory being excluded is a substring of another filename or directory, use ^. (caret character followed by dot character) to indicate that the search should begin at the beginning of the line and/or use $ (dollar sign character) to indicate that the search should end at the end of the line.

-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.

The following flags are available for alt_disk_install version 4.3.2 or greater:

-q disk Used to return the volume group boot disk name. This is especially useful when trying to determine the boot disk from several disks in the "old_rootvg" volume group, after rebooting from the alternate disk.
-S Will "put-to-sleep" the volume group. This is used after a volume group "wake-up". (-W).
-v new_volume_group_name disk Used to rename the alternate disk volume group. This is especially useful when creating multiple alternate disks, on multiple volume groups, and name identification is necessary.
-W disk Used to "wake-up" a volume group for data access between the rootvg and the alternate disk rootvg.
Note: The volume group that experiences 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 undergoes the "wake-up". This may mean that it's necessary to boot from the "altinst_rootvg" and "wake-up" the "old_rootvg".

Parameters

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.

Examples

  1. To clone the running 4.2.0 rootvg to hdisk3, then apply updates from /updates to bring the cloned rootvg to a 4.2.1 level:
    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.

  2. To install a 4.3 mksysb image on hdisk3, then run a customized script (/home/myscript) to copy some user files over to the alternate rootvg file systems before reboot:
    alt_disk_install -d /mksysb_images/4.3_mksysb -s /home/myscript hdisk3
  3. To remove the original rootvg ODM database entry, after booting from the new alternate disk:
    alt_disk_install -X old_rootvg

    The lspv listing for the original rootvg will be changed to "None". Therefore, a new volume group could be created on those disks.

  4. To determine the boot disk for a volume group with multiple physical volume:
    alt_disk_install -q hdisk0

    Illustrated Example

    # lspv
    hdisk0          00006091aef8b687     old_rootvg
    hdisk1          00076443210a72ea     rootvg
    hdisk2          0000875f48998649     old_rootvg
    # alt_disk_install -q hdisk0
    hdisk2

    In this case, the boot disk for "old_rootvg" is actually hdisk2. Therefore, you could reset your bootlist to hdisk2 and reboot to the original rootvg volume group.

  5. To modify an alt_disk_install volume group name:
    alt_disk_install -v alt_disk_432 hdisk2

    Illustrated Example

    # lspv
    hdisk0          00006091aef8b687     rootvg
    hdisk1          00000103000d1a78     rootvg
    hdisk2          000040445043d9f3     altinst_rootvg
    hdisk3          00076443210a72ea     altinst_rootvg
    hdisk4          0000875f48998649     None
    hdisk5          000005317c58000e     None
    # alt_disk_install -v alt_disk_432   hdisk2
    #lspv
    hdisk0          00006091aef8b687     rootvg
    hdisk1          00000103000d1a78     rootvg
    hdisk2          000040445043d9f3     alt_disk_432
    hdisk3          00076443210a72ea     alt_disk_432
    hdisk4          0000875f48998649     None
    hdisk5          000005317c58000e     None
  6. To "wake_up" an original rootvg, after booting from the new alternate disk:
    alt_disk_install -W hdisk0

    Illustrated Example

    # lspv
    hdisk0          000040445043d9f3     old_rootvg
    hdisk1          00076443210a72ea     rootvg
    # alt_disk_install -W hdisk0
    # lspv
    hdisk0          000040445043d9f3     altinst_rootvg
    hdisk1          00076443210a72ea     rootvg

    At this point, the "altinst_rootvg" volume group is varied-on and the /alt_inst file systems will be mounted.

  7. To "put-to-sleep" a volume group that had experienced a "wake-up":
    alt_disk_install -S

    Illustrated Example

    # lspv
    hdisk0          000040445043d9f3     altinst_rootvg
    hdisk1          00076443210a72ea     rootvg
    # alt_disk_install -S
    # lspv
    hdisk0          000040445043d9f3     altinst_rootvg
    hdisk1          00076443210a72ea     rootvg

    The "altinst_rootvg" is no longer varied-on and the /alt_inst file systems are no longer mounted. If it's necessary for the "altinst_rootvg" volume group name to be changed back to "old_rootvg", this can be done with the "-v" flag.

Files

/usr/sbin/alt_disk_install Contains the alt_disk_install command

Related Information

The bootlist, nim, lspv, and bosboot commands.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]