alt_root_vg command

Purpose

Creates a copy of (clones) the currently running system to an alternative disk.

Syntax

alt_root_vg [-g] [-bundle ... -location ... ] [-phase ... ][-script ... ][-exclude ... ] -target ...

alt_root_vg -remove ...

Description

The alt_root_vg command allows you to copy the current root volume group to an alternative disk and to update the operating system to the next fix pack level, without taking the machine down for an extended period and mitigating outage risk. This task can be done by creating a copy of the current rootvg on an alternative disk and simultaneously applying fix pack updates. If needed, the bootlist command can be run after the new disk is booted, and the bootlist can be changed to boot back to the older level of the operating system.
Note: The target_disk cannot be a physical volume that is assigned to a shared memory pool (to be used as a paging space device by a shared memory partition).

Cloning the running rootvg, allows you to create a backup copy of the root volume group. This copy can be used as a backup in case the rootvg failed, or it can be modified by installing additional updates. One scenario might be to clone a 1.3.0.0 system, and then install updates to bring the cloned rootvg to 1.3.0.0-FP8.0. This would update the system while it was still running. Rebooting from the new rootvg would bring the level of the running system to 1.3.0.0-FP8.0. If you face a problem with this level, changing the bootlist back to the 1.3.0.0 disk and rebooting would bring the system back to 1.3.0.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 you face a problem.

At the end of the installation, a volume group, altinst_rootvg, is left on the target disks in the varied off state as a placeholder. If varied on, it indicates that it owns no logical volumes; however, the volume group does contain logical volumes. But logical volumes are removed from the Object Data Manager (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 definition there as a placeholder.

After rebooting from the new alternative disk, the former rootvg volume group is displayed in a lspv listing as old_rootvg, and it includes all disks in the original rootvg. This former rootvg volume group is set to not vary-on at restart.

If a return to the original rootvg is necessary, the bootlist command is used to restart from the original rootvg.

With VIOS version 3.1.3.20, or later, you can run the alt_root_vg command in phases. This enhancement allows the alt_root_vg command to separate the cloning phase from the update phase.

The following table lists the phases for alt_root_vg command.

Item Description
Phase 1 Creates the altinst_rootvg volume group, the alt_logical volume, and the /alt_inst file systems, and restores the rootvg data.
Phase 2 Runs any specified customization script, installs updates, new file sets, fixes, or bundles. This phase can be run multiple times with different options.
Phase 3 Unmounts the /alt_inst file systems, renames the file systems and logical volumes, removes the the alt_logical volume, names Object Data Manager (ODM), and varies off the altinst_rootvg volume group. Phase 3 option builds the boot image for the altinst_rootvg volume group and sets the bootlist.

You must run the phase 3 option to get a usable rootvg volume group. Running the phase 1 and the phase 2 option leaves the /alt_inst file systems mounted.

If you run both the phase 1 and phase 2 option at the same time, or run the phase 1 and phase 2 option separately, and want to start over (to remove the altinst_rootvg volume group), you can run the alt_root_vg-remove command to clean up the rootvg volume group.

Flags

Flag name Description
-bundle Specifies the path name of an optional file bundle_name that contains a list of packages or file sets that are installed after a rootvg clone is created. You must also specify the -location flag when you specify the -bundle option. To update all the currently installed software to the latest level that is available on the installation media, specify the update_all option instead of the bundle_name option. The update_all option updates only the currently installed software and does not install new software or bundles.
-exclude Specifies the optional exclusion file list excludelist that is used when you clone the rootvg volume group. The selected files in the exclude file list is excluded during the clone operation. The rules for exclusion follow the pattern that matches the rules of the grep command.

If you want to exclude certain files from the clone, create an excludelist and enter the patterns of the file name that you do not want to include in your system backup image. The -exclude flag must be used with only the phase 1 option.

Note: If you want to exclude certain files from the backup, create your file with an ASCII editor and then enter the patterns of the file name that you do not want include in your system backup image. The patterns in this file are the input to the pattern-matching conventions of the grep command to determine, which files are excluded from the backup. For example, to exclude all contents of the scratch directory, edit the exclude file to read as follows:
/scratch/
To exclude the contents of the /tmp directory and to avoid excluding any other directories that have /tmp in the path name, edit the exclude file to read as follows:
^./tmp/

All files are backed up relative to . (current working directory). To exclude any filename or directory, it must have a search match with the string at the beginning of the line. Use the caret character (^) as the first character in the search string, followed by the dot character (.), and then followed by the filename or directory to exclude. If the filename or directory being excluded is a substring of another filename or directory, use the caret character followed by the dot character (^.) to indicate that the search starts at the beginning of the line. Use the dollar sign character ($) to indicate that the search ends at the end of the line.

-g Skips checks to ensure that the disk can boot.
-location Specifies the location of the installation images or updates to apply after a clone of the rootvg volume group is created. The location can be a directory and full-path name or device name, such as /dev/rmt0.
-phase

The phase or phases that are executed when you execute the alt_root_vg command. Valid values of -phase flag are: 1, 2, 3, 12, 23, or all (performs all three phases).

-remove Removes the rootvg volume group. The -remove flag takes the old_rootvg parameter or altinst_rootvg parameter as an input and removes the definition from the Object Data Manager (ODM) database.

If no arguments are passed, by default, it deletes the current alternative disk operation.

-script Optional customization script that must be run during the customization phase. This script file must be an executable. This script is called on the running system before the /alt_inst file systems are unmounted, so that the files can be copied from the running system to the /alt_inst file systems before restarting the system.
-target Specifies a space-delimited list of the name or names of the target disks where the alternative rootvg clone is created. These disks must not contain any volume group definitions. The lspv command shows that these target disks belong to the volume group None.

Exit Status

See Exit status for Virtual I/O Server commands.

Examples

  1. To clone and update the new software, enter the following commands:
    $alt_root_vg -target hdisk1 hdisk2 -bundle my_bundle -location /tmp/install
    $alt_root_vg -target hdisk1 hdisk2 -bundle update_all -location /tmp/update
  2. To clone the rootvg volume group by using the -phase 1 option, enter the following command:
    $alt_root_vg -target hdisk1 hdisk2 -phase 1
  3. To install the filesets by using the -phase 2 option with the -bundle flag and the -location flag, enter the following command:
    alt_root_vg -target hdisk1 hdisk2 -phase2 -bundle my_bundle -location /home/updates
  4. To exclude the given list of directories from being cloned to the new rootvg disk by using the -phase 1 option with the -exclude flag, enter the following command:
    $alt_root_vg -target hdisk1 hdisk2 -phase 1 -exclude /home/excludelist.out
  5. To execute a user-defined script by using the -phase 2 option with the -script flag, enter the following command:
    alt_root_vg -target hdisk1 hdisk2 -phase2 -script /home/user.ksh
  6. To set the bootlist to new disk by using the -phase 3 option, enter the following command:
    $alt_root_vg -target hdisk1 hdisk2 -phase 3
  7. To remove the old rootvg volume group, enter the following command:
    $alt_root_vg -remove old_rootvg
  8. To remove the current alternate disk operation, enter the following command:
    $alt_root_vg -remove
  9. To remove the altinst_rootvg volume group, enter the following command:
    $alt_root_vg -remove altinst_rootvg