alt_disk_install Command
Purpose
Syntax
- Create Alternate Disk
-
alt_disk_install { -d device | -C} [ -i image.data] [ -s script ] [ -R resolv_conf] [ -D] [ -B] [ -V] [ -r] [ -O ] [ -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 or later
-
- 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 the operating
system to the next release, maintenance level, or technology 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 or technology level.
alt
prefix. If
alt_disk_install is used on a system, the administrator should avoid having or
creating volume groups, logical volumes, special device files, or file systems with the
alt
prefix - alt_disk_install operations may inadvertently
remove, alter, or damage these items.The first function, installing a mksysb
,
requires an AIX 4.3 or later
mksysb
image, an AIX 4.3 or
later mksysb
tape, or an AIX 4.3.3 or later 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 an AIX 4.3 or
later system.
- You cannot use alt_disk_install to install an earlier version of AIX than the one currently installed on the
system. For example, you cannot install an AIX 4.3
mksysb
on an AIX 5.1 system. - 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 the operating system.
The second function, cloning the running rootvg, allows the user to create a backup copy of the root volume group. This copy might be used as a back up in case the rootvg failed, or it might 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 file set must
be installed on the system to execute the alt_disk_install command, and the
bos.alt_disk_install.boot_images file set must also be installed to perform a
mksysb
installation 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 that is 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.
mksysb
that you are
installing must match the level of the bos.alt_disk_install.boot_images file
set.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 restored. The system then boots in normal mode.
At the end of the installation, a volume group, altinst_rootvg
, is left on the
target disks in the varying 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 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 (that is, 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.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 consisted 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 want to use it, or want to run alt_disk_install commands, do not runexportvg
onaltinst_rootvg
.Simply run the alt_disk_install -X command to remove the
altinst_rootvg
definition from the ODM database. The reason that 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 stanzas for the real file system from /etc/filesystems for the real rootvg.If exportvg is run by accident, be sure to re-create 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 4.3.1 and greater version of alt_disk_install can be executed in phases. The installation is divided into three phases, and the default is to perform all three phases.
Table 1. Phases Item Description 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 file sets, 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 thebootlist
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.
Run Phase 3 to get a volume group that is a usable rootvg. Running Phase 1 and 2 leave 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.
If data access is necessary between the original rootvg and the new alternate disk, a volume groupwake-up
can be accomplished, by using the -W flag, on the non-booted volume group. Thewake-up
puts the volume group in a post alt_disk_install phase 1 state (i.e. the /alt_inst file systems are mounted).Note: The volume group that experiences thewake-up
is renamedaltinst_rootvg
.- Limitation
-
The running system's version of the operating system must be greater than or equal to the operating system version of the volume group that undergoes the
wake-up
. This may mean that it's necessary to boot from thealtinst_rootvg
andwake-up
theold_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 andwake-up
the 4.1.5old_rootvg
volume group.This limitation is caused by a
jfs
log entry incompatibility. It is possible towake-up
a volume group that contains a greater operating system version, but the volume group might not have ever been the system rootvg. If so, the volume group would have madejfs
log entries that might not be interpreted by an older operating system version rootvg, when the volume group was experiencing awake-up
. JFS log entries are 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 operating system version, unless the FORCE environment variable is set to yes.Attention: If a FORCEwake-up
is attempted on a volume group that contains a greater operating system version than the running operating system,AND
thewaking
volume group has been a system rootvg, errors occur.Note: When data access is no longer needed, the volume group can be put to sleep, by using the -S flag.Note: The volume group that has experienced awake-up
must beput-to-sleep
before it can be booted and used as the rootvg.
Flags
Item | Description |
---|---|
-B | Would specify not running bootlist after the mksysb or
clone. If set, the -r flag cannot be used. Note: The -B
and -X flags are mutually exclusive.
|
-C | Clone rootvg. Note: -d and -C are mutually
exclusive.
|
-d device | The value for device can be as
OR
Note: -d and -C are mutually exclusive.
|
-D | Turns 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.data file name
must be a full path name, 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. 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.
|
-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. Use a full path name for resolv_conf. |
-s script | Optional customization script to run at the end of the mksysb installation
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, 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 . Use a full path name 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 is combined with the platform type to create the boot image name to use (for
example, rspc_4.3.0_boot in AIX 5.1 and
earlier). This must be in the form V.R.M. The mksysb image is checked against this
level to verify that they are the same. |
-n | Remain a NIM client. The /.rhosts and /etc/niminfo files are copied to the alternate rootvg file system. |
-X | Removes 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, Note:
|
-O | Performs a device reset on the target altinst_rootvg . This
causes alt_disk_install to NOT retain any user-defined device configurations.
This flag is useful if the target disk or disks become the rootvg of a different system (such as in
the case of logical partitioning or system disk swap). |
The following flags are only valid for use when cloning the rootvg (-C).
Item | Description |
---|---|
-b bundle_name | Path name of optional file with a list of packages or file sets 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 path name. 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 Excluded 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:
For example, to exclude the contents of the directory called /tmp, and avoid excluding any other directories that have /tmp in the path name, edit the exclude file to read as follows:
All files are backed up relative to. (Current working directory). To exclude any file ordirectory
for which, it is important to have the search match the string at the beginning of the line, use
If the file name or directory being excluded is a substring of another file name or directory,
use |
-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 file sets into the cloned alt_inst_rootvg.
Default flags are -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 path name or device name (like /dev/rmt0). |
-w filesets | List of file sets 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:
Item | Description |
---|---|
-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 is renamed
altinst_rootvg . |
- Limitation
- The running system's version of the operating system must be greater than or equal to the
operating system version of the volume group that undergoes the
wake-up
. This means that it's necessary to boot from thealtinst_rootvg
andwake-up
theold_rootvg
.
Parameters
Item | Description |
---|---|
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
- 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.
- 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
- 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 might be created on those disks. - To determine the boot disk for a volume group with multiple physical volumes:
alt_disk_install -q hdisk0
The following is an example of the output:
# 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 hdisk2. Therefore, you might reset your bootlist to hdisk2 and reboot to the original rootvg volume group. - To modify an alt_disk_install volume group name:
alt_disk_install -v alt_disk_432 hdisk2
The following is an example of the output:
# 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
- To
wake_up
an original rootvg, after booting from the new alternate disk:alt_disk_install -W hdisk0
The following is an example of the output:
# lspv hdisk0 000040445043d9f3 old_rootvg hdisk1 00076443210a72ea rootvg # alt_disk_install -W hdisk0 # lspv hdisk0 000040445043d9f3 altinst_rootvg hdisk1 00076443210a72ea rootvg
The
altinst_rootvg
volume group is varied-on and the /alt_inst file systems are mounted. - To
put-to-sleep
a volume group that had experienced awake-up
:alt_disk_install -S
The following is an example of the output
# 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 thealtinst_rootvg
volume group name to be changed back toold_rootvg
, this can be done with the -v flag.
Files
Item | Description |
---|---|
/usr/sbin/alt_disk_install | Contains the alt_disk_install command |