alt_disk_mksysb Command

Purpose

Installs an alternate disk with a mksysb install base install image.

Syntax

alt_disk_mksysb -m device -d target_disks... [ -i image.data ] [ -s script ] [-R resolv_conf ] [ -p platform ] [ -L mksysb_level ] [ -n ] [ -P phase_option ] [ -c console ] [ -K ] [ -DBOVgkrxyzTS ]

Description

The alt_disk_mksysb command allows the users to install a mksysb system backup to a separate disk without taking the machine down for an extended period, thus mitigating outage risk. Using the alt_disk_mksysb command is the only method available to restore a backup containing multibos Base Operating System (BOS) instances.

Installing a mksysb requires an AIX® 4.3 or later mksysb image, mksysb tape, or mksysb CD. The alt_disk_mksysb command is called with a disk or set of disks that is 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.

The bos.alt_disk_install.rte and bos.alt_disk_install.boot_images filesets must be installed on the system to run the alt_disk_mksysb command.

The mksysb image that is used must have all the necessary device and kernel support required for the system it is installed on. You cannot install a new device or kernel support before the system is rebooted from the newly installed disk.

The alternate root file system is mounted as /alt_inst to ensure that the other file systems have a prefix, such as /alt_inst/usr, /alt_inst/var). This is the method in which the files must be accessed using a customization script.

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 indicates that it owns no logical volumes; however, it does 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. Do not vary on the altinst_rootvg volume group; instead, leave the altinst_rootvg volume group as a placeholder.

After the system reboots from the new alternate disk, the former rootvg volume group shows up in the lspv listing as old_rootvg. Do not vary on the old_rootvg volume group; instead, leave the old_rootvg volume group as a placeholder.

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:
  1. Alternate disk operations create volume groups, logical volumes, special device files, and file systems using the alt prefix. If alt_disk_copy is used on a system, the administrator must avoid having or creating volume groups, logical volumes, special device files, or file systems with the alt, prefix—alternate disk operations might inadvertently remove, alter, or damage these items.
  2. alt_disk_mksysb needs to use preexisting boot images during mksysb installation. alt_disk_mksysb first looks for the boot images in the alternate rootvg (that is, the contents of the mksysb); if boot images are not found, alt_disk_mksysb searches for them in the current rootvg.
    • The alternate disk install boot image location for altinst_rootvg is: /alt_inst/usr/lpp/bos.alt_disk_install/boot_images
    • The alternate disk install boot image location for the current rootvg is: /usr/lpp/bos.alt_disk_install/boot_images
    • The generic versions of the alternate install boot images are provided by the bos.alt_disk_install.boot_images fileset.
  3. The version release maintenance or technology level of mksysb that you are installing must match the level of the bos.alt_disk_install.boot_images fileset. For example, if the oslevel on the source system (the system where the mksysb was created) returns 5.3.0.0, the bos.alt_disk_install.boot_images fileset must be at 5.3.0.X, where X is the highest available fix level.
  4. If alt_disk_mksysb needs to use the generic boot images shipped with the bos.alt_disk_install.boot_images fileset, the system performs an additional reboot when booting from the alternate rootvg for the first time.
  5. You cannot use the alt_disk_mksysb command 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.
  6. The current LVM limit for logical volume names is 15 characters.As the alternate disk installation commands contain the 4-character alt_ prefix, the limit for the original logical volume names in the rootvg to be copied or installed is 11 characters. If an original logical volume name exceeds 11 characters, it can be shortened using a customized image.data (see the -i flag).
  7. Do not use direct LVM commands (such as exportvg, importvg, varyoffvg, and chlv) on alternate rootvg volume groups.
  8. This function is also available with the Network Installation Management (NIM). See the NIM Guide for more information.
  9. NIM alternate disk migration (upgrading version or release levels) is supported with the nimadm command in AIX 5.1 and later. See the nimadm command for more details.

Flags

Item Description
-B Specifies not running bootlist after the operation. If set, then the -r flag cannot be used.
-c console Specifies the device name to be used as the alternate rootvg's system console. This option is only valid with the -O flag.
-D Turns on debug (sets -x output).
-d target_disks Specifies a space-delimited list of the name or names of the target disks where the alternate rootvg is created. This disk or these disks must not currently contain any volume group definition. The lspv command must indicate that these disks belong to volume group None.
-g Specifies that bootable checks for the target_disks are overlooked.
-K Specifies that the 64 - bit kernel must be used, if possible.
-k Specifies that mksysb devices be kept (formally the ALT_KEEP_MDEV variable).
-i image_data Optional image.data file to use instead of the default image.data file from mksysb image. The image.date file name must be a full path name (for example, /tmp/my_image.data).
-L mksysb_level This level is combined with the platform type to create the boot image name (for example, rspc_5.1.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.
-m device The value for device can be:
  • Tape device (for example, /dev/rmt0)
  • Path name of mksysb image in a file system
-n Remain NIM client. The /.rhosts and /etc/niminfo files are copied to the alternate rootvg's file system.
-P Phases The phase or phases to execute during this invocation of the alt_disk_mksysb command. 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.
-p platform Platform used to create the name of the disk boot image, which might be supplied by a vendor that wanted to support this function.
-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).
-R resolv_conf The resolv.conf file that replaces the existing one after the mksysb has been restored. You must use a full path name for resolv_conf.
-r Specifies to reboot from the new disk when the alt_disk_mksysb command is complete.
-s script Optional customization script to run at the end of the mksysb install. 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 using the alt_rootvg_op command. You must use a full path name for the script.
-S Indicates that you want to skip space-checking on target disks before you start performing the cloning or installation operations.
Important : JFS2 file systems contain more metadata than JFS file systems. When you use the -S flag with the -T flag, it skips space-checking. In this situation, it does not verify that there is enough space in the newly created JFS2 file system to store the contents of the file system plus the additional metadata.
-T Indicates that you want to convert JFS file systems to JFS2 file systems during the process of recreating the rootvg volume group on target disks.
-V Turn on verbose output. This shows the files that are restored during the alt_disk_mksysb operation.
-y Looks for and imports (if found) mksysb volume groups. This flag causes alt_disk_install to import the data VGs known to the mksysb and to not import the local data VGs known at install time (the default). The imports are performed with the following script: /usr/lpp/bos.alt_disk_install/bin/alt_import_oldvgs.
-z Does not import any type of non-rootvg volume groups. This flag overrides the -y flag.

Exit Status

Item Description
0 All alt_disk_mksysb related operations completed successfully.
>0 An error occurred.

Examples

  1. To install a mksysb image on hdisk3 and hdisk4 , then run a customized script (/tmp/script) to copy some user files over to the alternate rootvg file systems before reboot:
         alt_disk_mksysb -m /mksysb_images/my_mksysb -d "hdisk3 hdisk4" -s /tmp/script
  2. To install a mksysb image on hdisk2 and stop after phase 1:
         alt_disk_mksysb -m /mksysb_images/my_mksysb -d hdisk2 -P1
    Attention : Do not change the bootlist to use the cloned rootvg.
  3. To execute phases 2 and 3 on an existing alternate rootvg on hdisk4 and reboot the system upon successful completion:
         alt_disk_mksysb -d hdisk4 -m /mksysb_images/my_mksysb -P23 -r
  4. To install a mksysb image on hdisk1, and to convert the file system from a JFS file system to a JFS2 file system, run the following command:
    alt_disk_mksysb -B -T -m  /mksysb_images/my_mksysb -d hdisk1

Location

/usr/sbin/alt_disk_mksysb

Files

Item Description
/usr/sbin/alt_disk_mksysb Contains the alt_disk_mksysb command.