Examples: Installing an alternate disk
Examples of alternate disk installation are shown.
To install an alternate disk, perform one of the following procedures:
- To clone the rootvg running a lower technology level to
hdisk1
and update that clone with the latest maintenance level that is oncd0
, run the following command:alt_disk_copy -b update_all -l /dev/cd0 -d hdisk1
In SMIT, use the smit alt_clone fast path and select hdisk1 from the listing for Target Disk(s) to install, select the update_all bundle from the listings in the Bundle to Install field, and /dev/cd0 from the listing in the Directory or Device with images field.
- To clone the rootvg running 7.1.0 to
hdisk3
, then update to the latest fixes that are mounted from another system on/710fixes
, and run a customized script named /tmp/finish_alt_install, run the following command:alt_disk_copy -b update_all -l /710fixes \ -s /tmp/finish_alt_copy -d hdisk3
In SMIT, use the smit alt_clone fast path and select hdisk3 from the listing for Target Disk(s) to install, select the update_all bundle from the listings in the Bundle to Install field, type /710fixes in the Directory or Device with images field, and type
/tmp/finish_alt_copy
in the Customization script field. - To install an AIX® mksysb tape
that was created from a machine with the same hardware configuration
as the target, to
hdisk1
, run the following command:alt_disk_mksysb -m /dev/rmt0 -d hdisk1
In SMIT, use the smit alt_mksysb fast path and select hdisk1 from the listing for Target Disk(s) to install field and select /dev/rmt0 from the listing for Device or image name field.
- To install an AIX mksysb image
that is NFS mounted on file system /mksysbs to the alternate
disk
hdisk2
using a customized image.data file and an exclude file containing ^./tmp/, type the following command:alt_disk_mksysb -m /mksysbs/my_71_mksysb -i /mksysbs/my_71_image.data \ -e /mksysbs/my_exclude_file -d hdisk2
Using the ^./tmp/ pattern does not backup files in the /tmp directory, but does backup files in the /var/tmp directory.
Note: All files are backed up relative to the current directory. This directory is represented by a . (dot character). If it is important that the search match the string at the beginning of the line when excluding a file or directory, it is necessary to use a ^. (caret followed by a dot character) as the first part of the search string, followed by the filename or directory to be excluded. The form is as follows:
^./filename
If the file name or directory being excluded is a substring of another file name or directory, use a ^. (caret followed by a dot character) for the search to start at the beginning of the line and the $ (dollar symbol) to have the search finish at the end of the line.
In SMIT, use the smit alt_mksysb fast path and select hdisk2 in the Target Disk(s) to install field. Next, type /mksysbs/my_71_mksysb in the Device or image name field, /mksysbs/my_71_image.data in the image.data file field, and /mksysbs/my_exclude_file in the Exclude list field.
- To "wake-up" an original rootvg, after booting from the new alternate
disk, run the following command:
alt_rootvg_op -W -d hdisk0
The following example illustrates the output that might display when running the command discussed above:
# lspv hdisk0 000040445043d9f3 old_rootvg hdisk1 00076443210a72ea rootvg # alt_rootvg_op -W hdisk0 # lspv hdisk0 000040445043d9f3 altinst_rootvg hdisk1 00076443210a72ea rootvg
At this point, the altinst_rootvg volume group is varied-on and the /alt_inst file systems are mounted.
- To "put-to-sleep" a volume group that had experienced a "wake-up,"
type the following command:
alt_rootvg_op -S
The following example illustrates the output that might display when running the command previously discussed:
# lspv hdisk0 000040445043d9f3 altinst_rootvg hdisk1 00076443210a72ea rootvg # alt_rootvg_op -S # lspv hdisk0 000040445043d9f3 altinst_rootvg hdisk1 00076443210a72ea rootvg
The altinst_rootvg is no longer varied on and the /alt_inst file systems are no longer mounted. If necessary for the altinst_rootvg volume group name to be changed back to old_rootvg, do this task with the -v flag.