AIX alt_disk_copy

Required filesets:

alt_disk_copy -d <hdisk to clone rootvg>             this will clone the rootvg to the specified disk
alt_disk_copy -e /etc/exclude.rootvg -d <hdisk>      this will use the exclude list during the cloning
alt_disk_copy -T -d <hdisk>                          it will convert jfs to jfs2 on the new target disk (from 6.1 TL4 only)
alt_rootvg_op -X <cloned rootvg to destroy>          this will destroy the cloned rootvg (alt_rootvg_op -X altinst_rootvg)
alt_rootvg_op -W -d <hdisk>                          this will wake up a disk (cloned filesystems will be mounted with prefix /alt_)
alt_rootvg_op -S -t <hdisk>                          this will put cloned rootvg to sleep (before that it will do a bosboot)
                                                     (-S: put to sleep earlier "waked up" vg, -t: rebuilds the alt. bootimage before sleep)
alt_rootvg_op -v <new cloned rootvg name> -d <hdisk> this will rename the given cloned rootvg name
                                                     (after wake-up and sleep the cloned vg name will be changed, in this case it is useful)

alt_disk_mksysb -m /mnt/aix1mksysb -d hdisk1 -k      this will resore given mksysb (aix1mksysb) to hdisk1 (-k: keep device configuration)

/var/adm/ras/alt_disk_inst.log                       alt_disk log file 

alt_disk_copy: (copy hdisk0 to hdsik1)
lv names can't be longer than 11 characters (because of alt_ prefix)
do not take out that disk which was used during boot (otherwise there will be problems with bosboot)

-unmirrorvg rootvg hdisk1    
-reducevg rootvg hdisk1        
-bosboot -ad hdisk0        
-bootlist -m normal hdisk0    
-alt_disk_copy -d hdisk1        
-bootlist -m normal hdisk0

after booting from hdisk1:
root@aix11: / # lspv
hdisk0          00cf5d8fe9c88a34                    old_rootvg
hdisk1          00cf5d8fadcaa9a9                    rootvg          active

booting from the old disk:
root@aix11: / # lspv
hdisk0          00cf5d8fe9c88a34                    rootvg          active
hdisk1          00cf5d8fadcaa9a9                    altinst_rootvg

removing the new image (keeping the old one):
-alt_rootvg_op -X altinst_rootvg         <--removing the new image from hdisk1
-chpv -c hdisk1                          <--clear that pv what contained the removed image
-extendvg -f rootvg hdisk1               <--extend the currently used rootvg with the cleared disk (hdisk1)
-mirrorvg -S rootvg hdisk1               <--mirroring rootvg to hdisk1 (checking: lsvg rootvg | grep STALE)(-S: -background sync)
-bosboot -ad hdisk0; bosboot -ad hdisk1  <--recreate the bootimage
-bootlist -m normal hdisk0 hdisk1        <--setup correct bootlist (checking: bootlist -m normal -o)


Changing lv names (to avoid 11 characters problem):
1. # mkszfile                            <--creates file of rootvg
2. # vi                       <--edit
3. # alt_disk_copy -d hdiskX -i / -B    <--give fie for alt_disk_copy



unmirrorvg rootvg hdisk1                 <--removing mirror ( check: lsvg -p rootvg)
chpv -c hdisk1                           <--clears boot record
reducevg rootvg hdisk1                   <--free up hdisk1
bosboot -ad hdisk0                       <--creates boot record
bootlist -m normal hdisk0                <--sets boot list (check: bootlist -m normal -o)

installp -s                              <--check if anything can be commited
copy new bos.rte.install                 <--will be needed for checking if update will be successful (cd to this directory)
install_all_updates -pYd .               <--preview of new bos.rte.install
install_all_updates -Yd .                <--installs new bos.rte.install

oslevel -sg 5300-09-01-0847              <--shows which fileset is greater than current service pack, it will show bos.rte.install
instfix -i | grep SP                     <--it will show where to update (53-09-020849_SP)
oslevel -sl 53-09-020849                 <--shows which filesets should be update

cd /mnt/5300-09-SP2                      <--go to servicepack dir
install_all_updates -pYd .               <--preview check

alt_disk_copy -d hdisk1 -b update_all -l /mnt/5300-09-SP2     <--this will do the update

shutdown -Fr                             <--new OS will boot up
smitty commit                            <--if needed

alt_rootvg_op -X old_rootvg              <--removes cloned old OS
chpv -c hdisk0                           <--clears bootrecord
extendvg -f rootvg hdisk0                <--add hdisk0 to rootvg
mirrorvg -S rootvg hdisk0                <--mirror rootvg (-S: in background)
bosboot -a                               <--creates boot record
bootlist -m normal hdisk0 hdisk1         <--set bootlist


alt_disk error during AIX update:

If you see this:
install_all_updates: Result = SUCCESS
Modifying ODM on cloned disk.
Building boot image on cloned disk.

0301-150 bosboot: Invalid or no boot device specified!
usage:  bosboot {-a | -v} [-d device] [-p proto] [-k kernel] [-l lvdev]
                [-b file] [-M primary|standby|both] [-D|-I] [-LTq]
        -a              Create boot image and write to device or file.
        -v              Verify, but do not build boot image.
        -d device       Device for which to create the boot image.
        -p proto        Use given proto file for RAM disk file system.
        -k kernel       Use given kernel file for boot image.
        -l lvdev        Target boot logical volume for boot image.
        -b file         Use given file name for boot image name.
        -D              Load kernel debugger.
        -I              Load and Invoke kernel debugger.
        -M primary|standby|both Boot mode - primary or standby.
        -T platform     Specifies the hardware platform type.
        -q              Query disk space required to create boot image.
        -L              Enable MP locks instrumentation.
0505-120 alt_disk_install: Error running bosboot in the cloned
root volume group.
Cleaning up.
forced unmount of /alt_inst/var/adm/ras/livedump
forced unmount of /alt_inst/var/adm/ras/livedump

There is a bug in alt_disk fileset in different 6.1 TL levels (for example in TL6).
Solution is to update alt_disk filesets separately before doing AIX update

1. I use these files, and copy them to a separate directory:
-rwxrwxrwx    1 root     nobody     28393472 Mar 05 13:36 bos.alt_disk_install.boot_images.
-rwxrwxrwx    1 root     nobody       709632 Mar 05 13:35 bos.alt_disk_install.rte.

2. update filesets with smitty update_all or install_all_updates -cYd /mnt/bb/alt_disk

3. try again AIX update: alt_disk_copy -d hdiskX -n -b update_all -l /mnt/AIX_new_level

0 (0)
Article Rating (No Votes)
Rate this article
There are no attachments for this article.
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
Monitoring Events with AIX Audit
Viewed 3481 times since Wed, May 30, 2018
AIX, System Admin Configuring dsh DSH
Viewed 3501 times since Fri, Apr 19, 2019
AIX, Storage, System Admin↑ Identifying a Disk Bottleneck Using filemon
Viewed 9346 times since Fri, Apr 19, 2019
Install and configure GNU watch (gwatch) on AIX
Viewed 7333 times since Thu, Feb 21, 2019
IBM AIX commands you should not leave home without
Viewed 6664 times since Mon, Jun 11, 2018
AIX, Networking Etherchannel failover testing
Viewed 1887 times since Fri, Apr 19, 2019
AIX: How to determine which application created the OS core file
Viewed 2065 times since Mon, Jun 11, 2018
Changing Ethernet Media Speed for AIX
Viewed 2865 times since Tue, Apr 16, 2019
AIX: Script to create a file with commands to remove missing & failed paths
Viewed 2729 times since Tue, Jun 12, 2018
How do I analyze and debug core files on AIX
Viewed 5105 times since Thu, Feb 21, 2019