Sunday, October 7, 2007

alternate disk operation in AIX

alt_disk_install AIX 4.3.2 or later:

" Determine Volume Group Boot Disk:"
alt_disk_install -q disk

"Put-to-sleep Volume Group:"
alt_disk_install -S

"Rename Alternate Disk Volume Group:"
alt_disk_install -v new_volume_group_name disk

"Wake-up Volume Group:"
alt_disk_install -W disk

"Clean Up Alternate Disk Volume Group:"
alt_disk_install -X [ volume_group]

Examples

1. To clone the running 4.2.0 rootvg to hdisk3, then apply updates from
/updates to bring the cloned rootvg to a 4.2.1 level:

alt_disk_install -C -F 4.2.1.0_AIX_ML -l /updates hdisk3

The bootlist would then be set to boot from hdisk3 at the next reboot.
2. To install a 4.3 mksysb image on hdisk3, then run a customized script
(/home/myscript) to copy some user files over to the alternate rootvg file
systems before reboot:

alt_disk_install -d /mksysb_images/4.3_mksysb -s /home/myscript hdisk3

3. To remove the original rootvg ODM database entry, after booting from the
new alternate disk:

alt_disk_install -X old_rootvg

The lspv listing for the original rootvg will be changed to "None".
Therefore, a new volume group could be created on those disks.
4. To determine the boot disk for a volume group with multiple physical
volume:

alt_disk_install -q hdisk0

Illustrated Example

# lspv

hdisk0 00006091aef8b687 old_rootvg

hdisk1 00076443210a72ea rootvg

hdisk2 0000875f48998649 old_rootvg

# alt_disk_install -q hdisk0

hdisk2

In this case, the boot disk for "old_rootvg" is actually hdisk2. Therefore,
you could reset your bootlist to hdisk2 and reboot to the original rootvg
volume group.
5. To modify an alt_disk_install volume group name:

alt_disk_install -v alt_disk_432 hdisk2

Illustrated Example

# lspv

hdisk0 00006091aef8b687 rootvg

hdisk1 00000103000d1a78 rootvg

hdisk2 000040445043d9f3 altinst_rootvg

hdisk3 00076443210a72ea altinst_rootvg

hdisk4 0000875f48998649 None

hdisk5 000005317c58000e None

# alt_disk_install -v alt_disk_432 hdisk2

#lspv

hdisk0 00006091aef8b687 rootvg

hdisk1 00000103000d1a78 rootvg

hdisk2 000040445043d9f3 alt_disk_432

hdisk3 00076443210a72ea alt_disk_432

hdisk4 0000875f48998649 None

hdisk5 000005317c58000e None

6. To "wake_up" an original rootvg, after booting from the new alternate disk:

alt_disk_install -W hdisk0

Illustrated Example

# lspv

hdisk0 000040445043d9f3 old_rootvg

hdisk1 00076443210a72ea rootvg

# alt_disk_install -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 will be mounted.
7. To "put-to-sleep" a volume group that had experienced a "wake-up":

alt_disk_install -S

Illustrated Example

# lspv

hdisk0 000040445043d9f3 altinst_rootvg

hdisk1 00076443210a72ea rootvg

# alt_disk_install -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 it's necessary for the "altinst_rootvg" volume
group name to be changed back to "old_rootvg", this can be done with the
"-v" flag.

No comments: