AIX Cloning a rootvg using alternate disk installation

Using this scenario, you can clone AIX® running on rootvg to an alternate disk on the same system, install a user-defined software bundle, and run a user-defined script to customize the AIX image on the alternate disk.

The information in this how-to scenario was tested using specific versions of AIX. The results you obtain might vary significantly depending on your version and level of AIX.

Because the alternate disk installation process involves cloning an existing rootvg to a target alternate disk, the target alternate disk must not be already assigned to a volume group.

In this scenario you will do the following:
  • Prepare for the alternate disk installation
  • Perform the alternate disk installation and customization
  • Boot off the alternate disk
  • Verify the operation

For information about alternate disk installation, see Installing to an alternate disk. Also, refer to the alt_disk_copy man page.

Step 1. Prepare for the alternate disk installation

  1. Check the status of physical disks on your system. Type:
    # lspvCopy
    Output similar to the following displays:
    hdisk0         0009710fa9c79877    rootvg   	active
    hdisk1         0009710f0b90db93    NoneCopy
    We can use hdisk1 as our alternate disk because no volume group is assigned to this physical disk.
  2. Check to see if the alt_disk_copy fileset has been installed by running the following:
    # lslpp -L bos.alt_disk_install.rteCopy
    Output similar to the following displays if the alt_disk_copy fileset is not installed:
    lslpp: 0504-132  Fileset bos.alt_disk_install.rte not installed.Copy
  3. Using volume 1 of the AIX installation media, install the alt_disk_copy fileset by running the following:
    # geninstall -d/dev/cd0 bos.alt_disk_install.rteCopy
    Output similar to the following displays:
    +-----------------------------------------------------------------------------+
                                    Summaries:                                     
    +-----------------------------------------------------------------------------+
                                                                                   
    Installation Summary                                                           
    --------------------                                                           
    Name                        Level           Part        Event       Result     
    -------------------------------------------------------------------------------
    bos.alt_disk_install.rte    5.3.0.0         USR         APPLY       SUCCESS    Copy
  4. Create a user-defined bundle called /usr/sys/inst.data/user_bundles/MyBundle.bnd that contains the following filesets:
    I:bos.content_list
    I:bos.gamesCopy

    For more information on how to create a user-defined software bundle, refer to Creating and installing a software bundle.

  5. Create the /home/scripts directory:
    mkdir /home/scriptsCopy
  6. Create a user-defined customization script called AddUsers.sh in the /home/scripts directory:
    touch /home/scripts/AddUsers.sh
    chmod 755 /home/scripts/AddUsers.shCopy
  7. Edit /home/scripts/AddUsers.sh to contain the following lines:
    mkuser johndoe
    touch /home/johndoe/abc.txt
    touch /home/johndoe/xyz.txtCopy

Step 2. Perform the alternate disk installation and customization

  1. To clone the rootvg to an alternate disk, type the following at the command line to open the SMIT menu :
    # smit alt_cloneCopy
  2. Select hdisk1 in the Target Disk to Install field.
  3. Select the MyBundle bundle in the Bundle to Install field.
  4. Insert volume one of the installation media.
  5. Type /dev/cd0 in the Directory or Device with images field.
  6. Type /home/scripts/AddUsers.sh in the Customization script field.
  7. Press Enter to start the alternate disk installation.
  8. Check that the alternate disk was created, by running the following:
    # lspvCopy
    Output similar to the following displays:
    hdisk0         0009710fa9c79877    rootvg             
    hdisk1         0009710f0b90db93    altinst_rootvg     Copy

Step 3. Boot from the alternate disk

  1. 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   Copy
    Output similar to the following displays:
    hdisk1Copy
  2. Reboot the system. Type:
    # shutdown -rCopy

    The system boots from the boot image on the alternate disk (hdisk1).

Step 4. Verify the operation

  1. When the system reboots, it will be running off the alternate disk. To check this, type the following:
    # lspvCopy
    Output similar to the following displays:
    hdisk0         0009710fa9c79877    old_rootvg  
    hdisk1         0009710f0b90db93    rootvg      
    Copy
  2. Verify that the customization script ran correctly, by typing the following:
    # find /home/johndoe -print       Copy
    Output similar to the following displays:
    /home/johndoe                     
    /home/johndoe/.profile            
    /home/johndoe/abc.txt             
    /home/johndoe/xyz.txt             Copy
  3. Verify that the contents of your software bundle was installed, by typing the following:
    # lslpp -Lb MyBundle                                         Copy
    Output similar to the following displays:
      Fileset                      Level  State  Description                      
      ----------------------------------------------------------------------------
      bos.content_list           5.3.0.0    C    AIX Release Content List         
      bos.games                  5.3.0.0    C    Games                            
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
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
AIX Creating a Volume Group
Viewed 2647 times since Tue, Jul 17, 2018
R2dump debug tool
Viewed 2370 times since Tue, Sep 8, 2020
Managing System Dump Devices sysdumpdev
Viewed 3667 times since Mon, Jul 9, 2018
AIX oslevel version OS
Viewed 5077 times since Wed, Apr 17, 2019
How to upgrade TL and SP in AIX using alternate disk(alt_disk_copy)
Viewed 12126 times since Sun, Jun 30, 2019
AIX: How to determine which application created the OS core file
Viewed 2595 times since Mon, Jun 11, 2018
Migrating from SDDPCM to AIXPCM (the easy way)
Viewed 2743 times since Mon, Jun 3, 2019
How To Mirror Your Root Disk On AIX (a.k.a. rootvg)
Viewed 5772 times since Mon, May 21, 2018
0516-404 allocpThis system cannot fulfill the allocation
Viewed 10200 times since Thu, Sep 20, 2018
sysdumpdev Command
Viewed 1987 times since Mon, Jul 16, 2018