Clones (makes a copy of) the currently running system to an alternate disk.
To copy rootvg to Alternate Disk:
alt_disk_copy -d targetdisks... [-i image.data] [-s script [-b bundlename] [-I installpflags] [-l imageslocation] [-f fixbundle] [-F fixes] [-e excludelist] [-w filesets] [-n] [-P phaseoption] [-c console] [ -x first boot script ] [-R resolveconf] [-DBOVgrTS] [ -u ]
The alt_disk_copy command allows users to copy the current rootvg to an alternate disk and to update the operating system to the next maintenance or technology level, without taking the machine down for an extended period of time and mitigating outage risk. This can be done by creating a copy of the current rootvg on an alternate disk and simultaneously applying software updates. 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 maintenance or technology level of the operating system.
Cloning the running rootvg, allows the user to create a backup copy of the root volume group. This copy can be used as a back up in case the rootvg failed, or it can be modified by installing additional updates. One scenario might be to clone a 5300-00 system, and then install updates to bring the cloned rootvg to 5300-01. This would update the system while it was still running. Rebooting from the new rootvg would bring the level of the running system to 5300-01. If there was a problem with this level, changing the bootlist back to the 5300-00 disk and rebooting would bring the system back to 5300-00. 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.
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, the volume group 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 definition there as a placeholder.
After rebooting from the new alternate disk, the former rootvg volume group shows up 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 reboot, and it should only be removed with the alt_rootvg_op -X old_rootvg or alt_disk_install -X old_rootvg commands.
If a return to the original rootvg is necessary, the bootlist command is used to change the bootlist to reboot from the original rootvg.
Item | Description |
---|---|
-b bundlename | Path name of optional file with a list of packages or filesets that are installed after a rootvg clone. The -l flag must be used with this option. |
-B | Would specify not running bootlist after the mksysb or clone. If set, then the -r flag cannot be used. |
-c Console | The device name to be used as the alternate rootvg's system console. This option is only valid with the -O flag. |
-d targetdisks | Specifies a space-delimited list of the name or names of the target disks where the alternate rootvg will be created. However, when specifying multiple disks, the list must be enclosed in quotes (" "). These disks must not currently contain any volume group definition. The lspv command should show these disks as belonging to volume group None. |
-D | Turns on debug (sets -x output). |
-e excludelist | Optional exclude.list to use when cloning
rootvg. The rules for exclusion follow the pattern-matching rules
of the grep command. The excludelist 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 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 scratch directory, edit the exclude file to read as follows:
For example, to exclude the contents
of the /tmp directory, 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 or directory for which it is important to have the search
match 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 (.), 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 the caret character followed by the dot
character (^.) to indicate that the search should start at the beginning
of the line, and use the dollar sign character ($) to indicate that
the search should end at the end of the line. |
-f fixbundle | 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. |
-g | Skips disk bootability checks. |
-i image.data | Optional image.data file to use instead of the default image.data file created from rootvg. The image.data file name must be a full path name (such as /tmp/my_image.data). |
-I installpflags | The flags to use when updating or installing new filesets into the cloned altinst_rootvg. The default flag is -acgX. The -l flag must be used with this option. |
-l imageslocation | Location of installp images or updates to apply after a clone of rootvg. This can be a directory full path name or device name (such as /dev/rmt0). |
-n | Remain NIM client. The /.rhosts and /etc/niminfo files are copied to the file system of the alternate rootvg. |
-O | Performs a device reset on the target altinst_rootvg. This causes the alternate 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). |
-P phases | The phase or phases to execute during this invocation
of alt_disk_copy. Valid values are: 1, 2, 3, 12, 23, or all
(default).
|
-r | Specifies to reboot from the alternate disk when the alt_disk_copy command finishes. |
-R resolvconf | The resolv.conf file to replace the existing one after the rootvg has been cloned. You must specify a full path name. |
-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. |
-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 in conjunction 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. |
-u | Copies file systems that belong to a workload partition (WPAR) in the defined state
in the alternate system. Note: To be included in the alternate disk,
all file systems that belong to a WPAR in the defined state
need to be in the rootvg volume group.
|
-V | Turn on verbose output. This shows the files that are being backed up for rootvg clones. |
-w filesets | List of filesets to install after cloning a rootvg. The -l flag must be used with this option. |
-x script | Optional customization script to run during the initial boot of the alternate rootvg, after all file systems are mounted. |
Item | Description |
---|---|
0 | All alt_disk_copy related operations completed successfully. |
>0 | An error occurred. |
alt_disk_copy -d hdisk3 -F 5300-01_AIX_ML -l /updates
The bootlist would then be set to boot from hdisk3 at
the next reboot. alt_disk_copy -d "hdisk3 hdisk4" -b update_all -l /updates
The bootlist would then be set to boot from hdisk3 at
the next reboot. alt_disk_copy -d hdisk1 -P1
alt_disk_copy -d hdisk1 -P23 -r
alt_disk_copy -B -T -d "hdisk1 hdisk2"
/usr/sbin/alt_disk_copy
Item | Description |
---|---|
/usr/sbin/alt_disk_copy | Contains the alt_disk_copy command. |