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 ] [ -D B O V g k r y z T S C ]

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.

An AIX® level of the mksysb image, the mksysb tape, or the mksysb CD is required to install an mksysb system. The alt_disk_mksysb command is called with a disk or a set of disks that is currently not in use, and the mksysb image is restored to disks such that, if the user chooses, the next reboot boots the system on an AIX level of the mksysb image.

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.

Notes:
  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.
    If the pre-existing boot image in the mksysb command does not work because of additional interim fixes or updates that affect the kernel, you can use the –C flag. The -C flag uses only the alternate disk installation boot image from the current rootvg volume group. After you save a copy of the original /usr/lpp/bos.alt_disk_install.boot_images/bosboot.disk.chrp image, the image can be replaced with a new image, which is built on the source system by using the bosboot –a –b new_location command. You can build the image on another system if the software installed matches the mksysb source system. The –C flag is not supported when you run the alt_disk_mksysb command by using Network Installation Manager (NIM).

    Alternatively, if you know other interim fixes that affects the kernel on the source system, you can create the mksysb image from that system by using the –C flag. This process customizes the boot image when you create the mksysb image.

  3. The version, release, maintenance or technology level of the mksysb command 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 command was created) returns 6.1.0.0, the bos.alt_disk_install.boot_images fileset must be at 6.1.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 the AIX Version 7.1 than the version of the AIX that is installed on the system. For example, you cannot install an AIX Version 6.1 mksysb on a system that is running AIX Version 7.1 operating system. For a multibos mksysb, the version of the active AIX that is used to create the mksysb will be the AIX version of the mksysb.
  6. The current LVM limit for logical volume names is 15 characters. Because 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. The alt_disk_mksysb function is also available on NIM. The –C flag is not supported when you run the alt_disk_mksysb command by using NIM.

Flags

Item Description
-B Specifies not running bootlist after the operation. If set, then the -r flag cannot be used.
-C Specifies to use the /usr/lpp/bos.alt_disk_install/boot_images/bosboot.disk.chrp file from the current rootvg volume group only. This flag is not supported when you run the alt_disk_mksysb command by using NIM. This flag does not affect a standby multibos Base Operating System (BOS) instance of the AIX operating system. For more information about the -C flag, see the Notes section.
-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.data 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_6.1.0_boot in AIX 6.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.