Cloning a
rootvg using Alternate Disk Installation
AIX has the ability to copy the contents of the root Volume Group to
another physical volume (harddiskX). The disk that is being copied to will be
completely erased and must be present in the system and not assigned to a Volume Group.
#lspv
hdisk0 000573927xxxx3c6
rootvg active
hdisk1
000xxxxxeef16b88 None
As seen in the
previous step the new harddisk added is hdisk1. To clone the rootvg use the
following command:
# alt_disk_install -C -O hdisk1
Or
# alt_disk_install -C hdisk1
The -C option is to indicate that copy must be made to another
harddisk rather than a mksysb. The -O option indicates that all server specific
data (such as TCP/IP configuration) is to be removed.
Depending on the size, it might take some time to complete. Once
done, check that the alternate disk was created, by running the following:
# lspv
hdisk0
0009710fa9c79877 rootvg
hdisk1
0009710f0b90db93 altinst_rootvg
By default, the alternate-disk-installation process changes the
boot list to the alternate disk. To check this run the following:
# bootlist -m normal -o
Output similar to the
following displays:
hdisk1
Reboot the system.
Type:
# shutdown –r
When the system
reboots, it will be running off the alternate disk. To check this, type the
following:
# lspv
hdisk0
0009710fa9c79877 old_rootvg
hdisk1
0009710f0b90db93
rootvg
# alt_disk_install -X
Set the bootlist to hdisk1
# alt_disk_install –X old_rootvg Remove the old_rootvg
#lspv
hdisk0
0009710fa9c79877 None
hdisk1
0009710f0b90db93 rootvg
active
Restore LPAR1 to the original
settings
alt_disk_install moves the boot partition to the new disk e.g. hdisk1 and
has to be moved back to the original harddisk0.
# alt_rootvg_op -X This command
will revert back rootvg to hdisk0.
Note: Above command can only be used before #shutdown –r command,
otherwise it will not work.